coreboot/src/lib
Julius Werner 82d16b150c memlayout: Store region sizes as separate symbols
This patch changes the memlayout macro infrastructure so that the size
of a region "xxx" (i.e. the distance between the symbols _xxx and _exxx)
is stored in a separate _xxx_size symbol. This has the advantage that
region sizes can be used inside static initializers, and also saves an
extra subtraction at runtime. Since linker symbols can only be treated
as addresses (not as raw integers) by C, retain the REGION_SIZE()
accessor macro to hide the necessary typecast.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Ifd89708ca9bd3937d0db7308959231106a6aa373
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49332
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2021-02-19 08:39:26 +00:00
..
gnat lib/gnat/i-c.ads: Add uintptr_t type 2020-11-16 12:13:31 +00:00
asan.c lib/asan.c: Update SPDX license 2021-02-01 08:53:22 +00:00
b64_decode.c treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
bmp_logo.c drivers/intel/fsp1_1,fsp2_0: Refactor logo display 2021-02-09 07:52:31 +00:00
boot_device.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bootblock.c src/lib/bootblock.c: make bootblock_main_with_timestamp public 2020-09-22 07:00:34 +00:00
bootmem.c lib/bootmem.c: Improve bootmem_allocate_buffer algorithm 2020-07-30 17:13:28 +00:00
bootmode.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
bootsplash.c cbfs: Simplify load/map API names, remove type arguments 2020-12-02 22:13:17 +00:00
cb.ads Hook up Kconfig Ada spec file 2019-02-06 16:20:35 +00:00
cbfs.c cbfs: Allow mcache to be found after the first lookup 2020-12-09 17:44:52 +00:00
cbmem_common.c src: Remove unused 'include <bootstate.h>' 2020-06-02 07:40:35 +00:00
cbmem_console.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
cbmem_stage_cache.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
compute_ip_checksum.c src/lib: Wrap lines at 80 columns 2017-03-13 17:21:02 +01:00
coreboot_table.c coreboot_table: Use precision when printing lb_gpio name 2021-02-10 07:27:38 +00:00
crc_byte.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
decompressor.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
delay.c src/lib: Add space before ( 2017-03-09 17:30:21 +01:00
device_tree.c lib/device_tree.c: Remove repeated word 2021-01-18 07:38:49 +00:00
dimm_info_util.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
edid.c lib/edid: Add missing name descriptor presence flag 2020-10-26 13:28:41 +00:00
edid_fill_fb.c lib/edid_fill_fb: Relax bits_per_pixel constraint 2021-01-24 11:18:23 +00:00
espi_debug.c espi_debug: Use switch case instead of if-else 2020-05-13 08:37:59 +00:00
ext_stage_cache.c src/lib: Remove unused function parameters in imd.c 2020-08-04 07:13:59 +00:00
fallback_boot.c coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
fit.c fit: Swap compat matching priorities for board-revX and board-skuY 2020-05-29 20:47:54 +00:00
fit_payload.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
fmap.c lib/fmap: Add null parameters handling 2020-12-11 19:15:25 +00:00
fw_config.c fw_config: Use UNDEFINED_FW_CONFIG to mean unprovisioned 2020-12-11 16:59:35 +00:00
gcc.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
gcov-glue.c lib/gcov: Remove assert(0) 2020-08-03 10:36:00 +00:00
gcov-io.c src/lib: Use tabs instead of spaces 2017-03-13 15:46:02 +01:00
gcov-io.h Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
gcov-iov.h
gpio.c gpio: Pull down HiZ pins after reading tristate GPIO strapping 2020-08-06 23:54:41 +00:00
halt.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
hardwaremain.c ACPI: Clean up GNVS initialisation 2021-01-24 19:57:17 +00:00
hexdump.c treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
hexstrtobin.c treewide: Convert more license headers to SPDX style 2020-05-11 19:37:19 +00:00
hw-time-timer.adb treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
imd.c lib/imd: move struct definitions to a new header file 2020-10-19 06:55:03 +00:00
imd_cbmem.c lib/imd_cbmem.c: Add a helper function to indicate that cbmem is ready 2020-08-17 06:22:58 +00:00
jpeg.c src/lib/jpeg.c: Drop dead code 2020-07-09 23:50:51 +00:00
jpeg.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
Kconfig src/lib: Add Kconfig option for SPD cache in FMAP 2020-12-14 08:23:41 +00:00
Kconfig.cbfs_verification src/lib/: Remove "this file is part of" line 2021-01-25 09:06:37 +00:00
libgcc.c treewide: Replace CONFIG(ARCH_xx) tests 2020-06-17 21:13:09 +00:00
libgcov.c lib/libgcov.c: Do not redefine alloca 2020-07-29 09:27:33 +00:00
list.c treewide: replace GPLv2 long form headers with SPDX header 2020-05-06 22:20:57 +00:00
lzma.c Remove MAYBE_STATIC_BSS and ENV_STAGE_HAS_BSS_SECTION 2020-05-26 15:04:08 +00:00
lzmadecode.c src/{include,arch,cpu,lib}: Add missing 'include <types.h>' 2019-05-29 20:27:18 +00:00
lzmadecode.h src/lib: Wrap lines at 80 columns 2017-03-13 17:21:02 +01:00
Makefile.inc drivers/intel/fsp1_1,fsp2_0: Refactor logo display 2021-02-09 07:52:31 +00:00
malloc.c lib/malloc: Drop <cpu/x86/smm.h> include 2020-06-16 08:09:13 +00:00
memchr.c
memcmp.c src/lib: Add space before ( 2017-03-09 17:30:21 +01:00
memcpy.c
memmove.c src/lib: Add space before ( 2017-03-09 17:30:21 +01:00
memrange.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
memset.c
metadata_hash.c src: Remove unused <cbmem.h> 2021-02-03 08:56:35 +00:00
nhlt.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
primitive_memtest.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
prog_loaders.c stage_cache: Add resume_from_stage_cache() 2021-01-29 10:53:33 +00:00
prog_ops.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
program.ld memlayout: Store region sizes as separate symbols 2021-02-19 08:39:26 +00:00
ramdetect.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
ramtest.c src: Remove useless comments in "includes" lines 2021-02-04 10:18:49 +00:00
reg_script.c lib/reg_script: Add cast to fix compilation on x86_64 2020-12-01 16:00:57 +00:00
region_file.c region_file_update_data_arr: Modify region_file with array of buffers 2020-09-16 16:02:54 +00:00
reset.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
rmodule.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
rmodule.ld src: Fix typo 2018-08-10 21:25:53 +00:00
romstage_handoff.c ACPI S3: Replace stashed acpi_slp_typ value 2021-01-23 20:19:47 +00:00
rtc.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
selfboot.c lib/selfboot.c: Fix indentation and drop one newline 2021-02-11 10:19:17 +00:00
spd_bin.c lib: Add DDR5 DRAM type 2021-02-18 22:47:59 +00:00
spd_cache.c Remove new additions of "this file is part of" lines 2020-05-18 07:12:03 +00:00
stack.c symbols.h: Add macro to define memlayout region symbols 2019-02-22 06:44:02 +00:00
string.c lib/string: Add standard strstr() function 2020-08-03 05:12:23 +00:00
thread.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
timer.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
timer_queue.c src: Remove unused 'include <stddef.h> 2020-08-18 12:15:44 +00:00
timestamp.c symbols: Change implementation details of DECLARE_OPTIONAL_REGION() 2020-08-27 22:11:17 +00:00
ubsan.c lib/ubsan.c: Remove GCC 5.x workaround 2020-10-05 16:18:24 +00:00
uuid.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
version.c ACPI: Correct asl_compiler_revision value 2019-02-21 19:07:31 +00:00
wrdd.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00