aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Expand)AuthorFilesLines
2020-11-06board: Rename uclass to sysinfoSimon Glass1-7/+8
2020-11-06x86: zimage: Add a little more loggingSimon Glass1-0/+1
2020-11-06x86: Use CONFIG_CHROMEOS_VBOOT for verified bootSimon Glass1-0/+17
2020-11-01Merge tag 'efi-2020-01-rc2-2' of https://gitlab.denx.de/u-boot/custodians/u-b...WIP/01Nov2020Tom Rini4-4/+97
2020-10-30Merge tag 'dm-pull-30oct20' of https://gitlab.denx.de/u-boot/custodians/u-boo...Tom Rini1-10/+9
2020-10-30log: Add filter flag to match greater than a log levelSean Anderson1-3/+9
2020-10-30log: Add filter flag to deny on matchSean Anderson1-2/+10
2020-10-30log: Add function to create a filter with flagsSean Anderson1-2/+4
2020-10-30log: Expose some helper functionsSean Anderson1-20/+3
2020-10-30log: Add additional const qualifier to arraysSean Anderson1-2/+2
2020-10-30log: Fix missing negation of ENOMEMSean Anderson1-1/+1
2020-10-30efi_loader: add option to initialise EFI subsystem earlyAKASHI Takahiro1-0/+6
2020-10-30common: update: add a generic interface for FIT imageAKASHI Takahiro3-2/+87
2020-10-30dfu: modify an argument type for an addressAKASHI Takahiro1-1/+2
2020-10-30dfu: rename dfu_tftp_write() to dfu_write_by_name()AKASHI Takahiro1-2/+3
2020-10-29dm: Avoid using #ifdef for CONFIG_OF_LIVESimon Glass1-10/+9
2020-10-29Merge tag 'xilinx-for-v2021.01-v2' of https://gitlab.denx.de/u-boot/custodian...Tom Rini5-21/+22
2020-10-28dm: board: complete the initialization of the muxes in initr_dm()Jean-Jacques Hiblot1-0/+12
2020-10-27log: correct and check array size of log categoriesHeinrich Schuchardt1-2/+8
2020-10-27log: allow for message continuationHeinrich Schuchardt1-5/+18
2020-10-27log: move processing_msg to global dataHeinrich Schuchardt1-4/+3
2020-10-27spl: fdt: Record load/entry fit-images entries in 64bit formatMichal Simek2-12/+8
2020-10-27spl: Use standard FIT entriesMichal Simek4-11/+16
2020-10-26eb_cpu5282: fix CONFIG_DM_VIDEO build warningsAnatolij Gustschin1-1/+3
2020-10-23bootm: fix wrong conditions about images overlapJaehoon Chung1-3/+5
2020-10-22Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-sunxiWIP/22Oct2020Tom Rini2-4/+17
2020-10-22Remove default value of CONFIG_PREBOOT for CONFIG_USB_STORAGEPatrick Delaunay1-1/+1
2020-10-22common: rename getc() to getchar()Heinrich Schuchardt5-15/+15
2020-10-22cli_hush.c: remove broken sanity checkRasmus Villemoes1-8/+0
2020-10-22common, autoboot: sync functionality with Kconfig descriptionHeiko Schocher1-1/+2
2020-10-22cosmetic: image: Fix comments and the order of definitionsNaoki Hayama1-10/+10
2020-10-22image: Add a function to modify category informationNaoki Hayama1-0/+18
2020-10-22Kconfig: Use hex values for CONFIG_{SPL,TPL}_SIZE_LIMITOvidiu Panait1-4/+4
2020-10-22board: Show memory for frame buffersSimon Glass1-0/+2
2020-10-22bloblist: Place on a 4KB boundarySimon Glass1-1/+3
2020-10-22log: Add missing category namesSimon Glass1-0/+5
2020-10-22spl: fit: Minimally parse OS properties with FIT_IMAGE_TINYSamuel Holland2-4/+17
2020-10-21Revert "Fix data abort caused by mis-aligning FIT data"Marek Vasut1-5/+2
2020-10-14spl: Add SPL_SERIAL as requirement for SDP_USB_SDPOtavio Salvador1-0/+1
2020-10-14spl: Avoid printing boot device if silent console is enabledOtavio Salvador1-1/+3
2020-10-14cmd: Fixup DT to pass PStore Ramoops parametersFrédéric Danis1-0/+4
2020-10-12fit: cipher: aes: allow to read the IV in the FIT imagePhilippe Reynes1-7/+15
2020-10-12vboot: add DTB policy for supporting multiple required conf keysThirupathaiah Annapureddy1-3/+29
2020-10-10log: syslog: Handle errors in net_initSean Anderson1-1/+3
2020-10-10log: Disable the syslog driver by defaultSimon Glass1-1/+0
2020-10-10log: Add a way to enable/disable a log deviceSimon Glass1-0/+38
2020-10-10log: Add a flag to enable log driversSimon Glass3-1/+5
2020-10-10log: Allow LOG_DEBUG to always enable log outputSimon Glass1-1/+5
2020-10-09Kconfig: Move BOARD_TYPES under init optionsSimon Glass1-8/+8
2020-10-09Kconfig: Move BOUNCE_BUFFER under driver optionsSimon Glass1-11/+0
ss="hl opt">, '\0', &res, ENV_SIZE); if (len < 0) { error("Cannot export environment: errno = %d\n", errno); return 1; } env_new.crc = crc32(0, env_new.data, ENV_SIZE); #ifdef CONFIG_ENV_OFFSET_REDUND if (gd->env_valid == 1) { off = CONFIG_ENV_OFFSET_REDUND; off_red = CONFIG_ENV_OFFSET; } env_new.flags = ACTIVE_FLAG; #endif rc = eeprom_bus_write(CONFIG_SYS_DEF_EEPROM_ADDR, off, (uchar *)&env_new, CONFIG_ENV_SIZE); #ifdef CONFIG_ENV_OFFSET_REDUND if (rc == 0) { eeprom_bus_write(CONFIG_SYS_DEF_EEPROM_ADDR, off_red + offsetof(env_t,flags), (uchar *)&flag_obsolete, 1); if (gd->env_valid == 1) gd->env_valid = 2; else gd->env_valid = 1; } #endif return rc; } /* * Initialize Environment use * * We are still running from ROM, so data use is limited. * Use a (moderately small) buffer on the stack */ #ifdef CONFIG_ENV_OFFSET_REDUND int env_init(void) { ulong len; ulong crc[2], crc_tmp; unsigned int off, off_env[2]; uchar buf[64]; int crc_ok[2] = {0,0}; unsigned char flags[2]; int i; eeprom_init(); /* prepare for EEPROM read/write */ off_env[0] = CONFIG_ENV_OFFSET; off_env[1] = CONFIG_ENV_OFFSET_REDUND; for (i = 0; i < 2; i++) { /* read CRC */ eeprom_bus_read(CONFIG_SYS_DEF_EEPROM_ADDR, off_env[i] + offsetof(env_t,crc), (uchar *)&crc[i], sizeof(ulong)); /* read FLAGS */ eeprom_bus_read(CONFIG_SYS_DEF_EEPROM_ADDR, off_env[i] + offsetof(env_t,flags), (uchar *)&flags[i], sizeof(uchar)); crc_tmp = 0; len = ENV_SIZE; off = off_env[i] + offsetof(env_t,data); while (len > 0) { int n = (len > sizeof(buf)) ? sizeof(buf) : len; eeprom_bus_read(CONFIG_SYS_DEF_EEPROM_ADDR, off, buf, n); crc_tmp = crc32(crc_tmp, buf, n); len -= n; off += n; } if (crc_tmp == crc[i]) crc_ok[i] = 1; } if (!crc_ok[0] && !crc_ok[1]) { gd->env_addr = 0; gd->env_valid = 0; return 0; } else if (crc_ok[0] && !crc_ok[1]) { gd->env_valid = 1; } else if (!crc_ok[0] && crc_ok[1]) { gd->env_valid = 2; } else { /* both ok - check serial */ if (flags[0] == ACTIVE_FLAG && flags[1] == OBSOLETE_FLAG) gd->env_valid = 1; else if (flags[0] == OBSOLETE_FLAG && flags[1] == ACTIVE_FLAG) gd->env_valid = 2; else if (flags[0] == 0xFF && flags[1] == 0) gd->env_valid = 2; else if(flags[1] == 0xFF && flags[0] == 0) gd->env_valid = 1; else /* flags are equal - almost impossible */ gd->env_valid = 1; } if (gd->env_valid == 2) gd->env_addr = off_env[1] + offsetof(env_t,data); else if (gd->env_valid == 1) gd->env_addr = off_env[0] + offsetof(env_t,data); return (0); } #else int env_init(void) { ulong crc, len, new; unsigned off; uchar buf[64]; eeprom_init(); /* prepare for EEPROM read/write */ /* read old CRC */ eeprom_bus_read(CONFIG_SYS_DEF_EEPROM_ADDR, CONFIG_ENV_OFFSET+offsetof(env_t,crc), (uchar *)&crc, sizeof(ulong)); new = 0; len = ENV_SIZE; off = offsetof(env_t,data); while (len > 0) { int n = (len > sizeof(buf)) ? sizeof(buf) : len; eeprom_bus_read(CONFIG_SYS_DEF_EEPROM_ADDR, CONFIG_ENV_OFFSET + off, buf, n); new = crc32(new, buf, n); len -= n; off += n; } if (crc == new) { gd->env_addr = offsetof(env_t,data); gd->env_valid = 1; } else { gd->env_addr = 0; gd->env_valid = 0; } return (0); } #endif