u-boot/common
Alper Nebi Yasak 367ecbf2d3 spl: binman: Check at runtime if binman symbols were filled in
Binman lets us declare symbols in SPL/TPL that refer to other entries in
the same binman image as them. These symbols are filled in with the
correct values while binman assembles the images, but this is done
in-memory only. Symbols marked as optional can be filled with
BINMAN_SYM_MISSING as an error value if their referred entry is missing.

However, the unmodified SPL/TPL binaries are still available on disk,
and can be used by people. For these files, nothing ensures that the
symbols are set to this error value, and they will be considered valid
when they are not.

Empirically, all symbols show up as zero in a sandbox_vpl build when we
run e.g. tpl/u-boot-tpl directly. On the other hand, zero is a perfectly
fine value for a binman-written symbol, so we cannot say the symbols
have wrong values based on that.

Declare a magic symbol that binman always fills in with a fixed value.
Check this value as an indicator that symbols were filled in correctly.
Return the error value for all symbols when this magic symbol has the
wrong value.

For binman tests, we need to make room for the new symbol in the mocked
SPL/TPL data by extending them by four bytes. This messes up some test
image layouts. Fix the affected values, and check the magic symbol
wherever it makes sense.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-06-28 03:09:52 +01:00
..
eeprom SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
init bootstage: Add SPL support 2021-10-31 12:26:44 -06:00
spl spl: binman: Check at runtime if binman symbols were filled in 2022-06-28 03:09:52 +01:00
autoboot.c env: Move the doc comment to the code 2022-04-07 16:50:53 -04:00
avb_verify.c avb: Fix error when partition not found 2021-03-17 12:50:19 -04:00
bloblist.c bloblist: Update to use conditional value 2022-02-08 23:07:59 -05:00
board_f.c microblaze: Add support for run time relocation 2022-06-24 14:15:01 +02:00
board_info.c board-info: Call sysinfo_detect() before sysinfo_get_str() 2021-07-14 16:48:00 -04:00
board_r.c common/board_r.c: drop legacy and unused bi_enetaddr 2022-06-06 18:01:21 -04:00
bootstage.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
bouncebuf.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cli.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
cli_hush.c cli: slighly more clear error messages 2021-05-17 17:06:42 -04:00
cli_readline.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
cli_simple.c cli: Support macro processing with a fixed-size buffer 2020-12-04 16:10:01 -05:00
command.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
console.c common/console.c: use CONFIG_VAL() with PRE_CON_BUF_* variables 2022-05-11 09:22:24 -04:00
cros_ec.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ddr_spd.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dfu.c dfu: add support for the dfu_alt_info reintialization from the flashed script 2021-01-31 14:08:56 +01:00
dlmalloc.c malloc: Annotate allocator for valgrind 2022-04-11 10:00:30 -04:00
dlmalloc.src Consolidate bool type 2013-04-01 16:33:52 -04:00
edid.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
event.c event: fix static events for CONFIG_NEEDS_MANUAL_RELOC 2022-06-06 18:01:20 -04:00
exports.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
fdt_simplefb.c common: add fdt_simplefb_enable_and_mem_rsv function 2021-11-30 16:43:28 +01:00
fdt_support.c fdt: Add U-Boot version to chosen node 2022-06-03 11:15:24 -04:00
flash.c mtd: cfi: introduce CFI_FLASH_BANKS 2022-01-21 14:01:35 -05:00
hash.c doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
hwconfig.c hwconfig: Allow to compile it without env support 2022-04-26 17:18:39 +05:30
iomux.c IOMUX: Fix buffer overflow in iomux_replace_device() 2021-04-27 08:05:30 -04:00
iotrace.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
kallsyms.c global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
Kconfig Convert CONFIG_SYS_BOOTPARAMS_LEN to Kconfig 2022-06-06 12:09:00 -04:00
kgdb.c common: board_r: drop initr_kgdb wrapper 2022-01-18 08:31:02 -05:00
kgdb_stubs.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
lcd.c video: Drop CONFIG_LCD_BMP_RLE8 2022-03-28 20:30:33 +02:00
lcd_console.c WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
lcd_console_rotation.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
log.c event: Add basic support for events 2022-03-10 08:28:36 -05:00
log_console.c log: Allow padding of the function name 2021-07-21 10:27:35 -06:00
log_syslog.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
main.c efi_loader: split efi_init_obj_list() into two stages 2022-04-23 22:05:41 +02:00
Makefile avb: Don't build in SPL 2022-05-02 09:58:13 -04:00
malloc_simple.c malloc: Annotate allocator for valgrind 2022-04-11 10:00:30 -04:00
memsize.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
menu.c bootmenu: factor out the user input handling 2022-05-07 23:17:26 +02:00
miiphyutil.c Convert CONFIG_PHY_RESET_DELAY to Kconfig 2022-03-25 12:01:15 +00:00
qfw.c x86: qemu: move QFW to its own uclass 2021-04-12 17:44:55 -04:00
s_record.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
scp03.c common: SCP03 control (enable and provision of keys) 2021-03-13 13:14:52 -05:00
splash.c video: Convert CONFIG_VIDEO_LOGO to Kconfig 2021-12-26 23:24:46 +01:00
splash_source.c video: Support virtio devices with the splash screen 2021-12-26 23:33:24 +01:00
stackprot.c Add support for stack-protector 2021-04-20 07:31:12 -04:00
stdio.c video: Drop references to CONFIG_VIDEO et al 2022-03-28 20:17:07 +02:00
system_map.c Add support for Linux-like kallsysms 2009-06-12 20:45:48 +02:00
update.c mtd: cfi: introduce CFI_FLASH_BANKS 2022-01-21 14:01:35 -05:00
usb.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
usb_hub.c usb: hub: Fix usb_get_port_status() for big-endian platforms 2021-04-06 16:38:57 +02:00
usb_kbd.c console: usb: kbd: Limit poll frequency to improve performance 2022-02-11 00:03:48 +01:00
usb_storage.c bootstd: usb: Add a bootdev driver 2022-04-25 10:00:04 -04:00
xyzModem.c xyz-modem: Allow to cancel transfer also by CTRL+C 2021-09-03 14:32:41 -04:00