coreboot/src/lib
Julius Werner 7e0dea6317 symbols.h: Add macro to define memlayout region symbols
When <symbols.h> was first introduced, it only declared a handful of
regions and we didn't expect that too many architectures and platforms
would need to add their own later. However, our amount of platforms has
greatly expanded since, and with them the need for more special memory
regions. The amount of code duplication is starting to get unsightly,
and platforms keep defining their own <soc/symbols.h> files that need
this as well.

This patch adds another macro to cut down the definition boilerplate.
Unfortunately, macros cannot define other macros when they're called, so
referring to region sizes as _name_size doesn't work anymore. This patch
replaces the scheme with REGION_SIZE(name).

Not touching the regions in the x86-specific <arch/symbols.h> yet since
they don't follow the standard _region/_eregion naming scheme. They can
be converted later if desired.

Change-Id: I44727d77d1de75882c72a94f29bd7e2c27741dd8
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31539
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-02-22 06:44:02 +00:00
..
gnat lib/gnat: Drop Restriction No_Exception_Propagation 2018-05-19 20:39:09 +00:00
b64_decode.c src/lib: Add "int" following "unsigned" 2017-03-09 17:24:17 +01:00
boot_device.c lib/boot_device: Add API for write protect a region 2019-01-21 13:25:46 +00:00
bootblock.c symbols.h: Add macro to define memlayout region symbols 2019-02-22 06:44:02 +00:00
bootmem.c symbols.h: Add macro to define memlayout region symbols 2019-02-22 06:44:02 +00:00
bootmode.c buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
cb.ads Hook up Kconfig Ada spec file 2019-02-06 16:20:35 +00:00
cbfs.c cbfs: Alert if something goes wrong in cbfs_boot_locate() 2018-12-07 11:34:54 +00:00
cbmem_common.c symbols.h: Add macro to define memlayout region symbols 2019-02-22 06:44:02 +00:00
cbmem_console.c symbols.h: Add macro to define memlayout region symbols 2019-02-22 06:44:02 +00:00
cbmem_stage_cache.c lib/stage_cache: Add save/get raw storage 2018-02-07 16:22: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 Move compiler.h to commonlib 2018-10-08 16:57:27 +00:00
debug.c src: Get rid of device_t 2018-06-14 09:30:24 +00:00
decompressor.c Introduce bootblock self-decompression 2018-05-22 02:44:14 +00:00
delay.c src/lib: Add space before ( 2017-03-09 17:30:21 +01:00
device_tree.c device_tree/fit: Constify data structures 2018-08-24 11:38:28 +00:00
dimm_info_util.c src/*: normalize Google copyright headers 2018-09-28 07:13:00 +00:00
edid.c src: Remove duplicated round up function 2018-11-29 12:17:45 +00:00
edid_fill_fb.c lib/edid: Split out fill_lb_framebuffer() 2017-05-30 18:32:44 +02:00
ext_stage_cache.c buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
fallback_boot.c Move compiler.h to commonlib 2018-10-08 16:57:27 +00:00
fit.c lib/fit: Normalize spaces in board names to dashes 2018-12-19 05:18:45 +00:00
fit_payload.c device_tree/fit: Constify data structures 2018-08-24 11:38:28 +00:00
fmap.c lib/fmap: provide RW region device support 2016-08-19 18:17:04 +02:00
gcc.c src/lib: Move asmlinkage before type 2017-03-13 17:21:26 +01:00
gcov-glue.c src/lib: add IS_ENABLED() around Kconfig symbol references 2017-07-06 00:19:37 +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
generic_dump_spd.c src/lib: Add space before ( 2017-03-09 17:30:21 +01:00
gpio.c Move compiler.h to commonlib 2018-10-08 16:57:27 +00:00
halt.c src/lib: Fix brace positions 2017-03-13 17:21:16 +01:00
hardwaremain.c lib/hardwaremain: Fix typo ACPI 2019-01-30 02:30:22 +00:00
hexdump.c lib/hexdump: Refactor to skip lines with all ones as well 2016-01-22 14:10:28 +01:00
hexstrtobin.c hexstrtobin: Add a library function to decode ASCII hex into binary 2016-05-21 05:58:51 +02:00
hw-time-timer.adb Hook up libhwbase in ramstage 2016-11-29 23:45:40 +01:00
imd.c Move compiler.h to commonlib 2018-10-08 16:57:27 +00:00
imd_cbmem.c buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
jpeg.c src/lib: Fix checkpatch warning: no spaces at the start of a line 2017-07-25 14:26:07 +00:00
jpeg.h src/lib: Wrap lines at 80 columns 2017-03-13 17:21:02 +01:00
Kconfig reset: Provide new single-function reset API 2018-10-22 08:34:00 +00:00
libgcc.c riscv: Add initial support for 32bit boards 2019-02-13 04:49:14 +00:00
libgcov.c {src,util}: Use NULL instead of 0 for pointer 2018-06-11 08:52:08 +00:00
list.c lib/devicetree: Integrate flattened devicetree support 2018-04-30 09:33:32 +00:00
lzma.c lib/lzma: Respect dstn argument 2018-03-26 10:19:11 +00:00
lzmadecode.c lib/lzmadecode.c: : Avoid static analysis error for unused value 2018-08-14 23:24:58 +00:00
lzmadecode.h src/lib: Wrap lines at 80 columns 2017-03-13 17:21:02 +01:00
Makefile.inc Hook up Kconfig Ada spec file 2019-02-06 16:20:35 +00:00
malloc.c src/lib: add IS_ENABLED() around Kconfig symbol references 2017-07-06 00:19:37 +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 lib/memrange: Introduce method to clone memrange 2018-04-11 15:11:04 +00:00
memset.c
nhlt.c lib/nhlt: Use common function to set NHLT version 2018-08-27 15:54:34 +00:00
primitive_memtest.c src/lib: Add space before ( 2017-03-09 17:30:21 +01:00
prog_loaders.c selfload: check target memory type in selfload_check 2019-01-30 11:04:49 +00:00
prog_ops.c Move compiler.h to commonlib 2018-10-08 16:57:27 +00:00
program.ld Introduce bootblock self-decompression 2018-05-22 02:44:14 +00:00
ramtest.c {device,drivers,lib,mb,nb}: Use only one space after 'if' 2018-05-09 13:11:04 +00:00
reg_script.c src: Get rid of device_t 2019-01-04 12:11:18 +00:00
region_file.c src/lib: Fix typo 2018-08-09 15:56:42 +00:00
reset.c reset: Finalize move to new API 2018-10-31 15:29:42 +00:00
rmodule.c src: Remove unneeded include <lib.h> 2018-11-16 09:50:51 +00:00
rmodule.ld src: Fix typo 2018-08-10 21:25:53 +00:00
romstage_handoff.c buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
romstage_stack.c intel post-car: Increase stacktop alignment 2016-11-18 20:59:12 +01:00
rtc.c src/{ec,include,lib}: Use "foo *bar" instead of "foo* bar" 2018-07-09 09:28:35 +00:00
selfboot.c selfload: check target memory type in selfload_check 2019-01-30 11:04:49 +00:00
spd_bin.c intel/common/smbus: increase spd read performance 2017-10-31 15:49:55 +00:00
stack.c symbols.h: Add macro to define memlayout region symbols 2019-02-22 06:44:02 +00:00
string.c string: move strdup() & strconcat() to lib/string.c 2019-01-30 11:05:20 +00:00
thread.c src/lib: Wrap lines at 80 columns 2017-03-13 17:21:02 +01:00
timer.c Move compiler.h to commonlib 2018-10-08 16:57:27 +00:00
timer_queue.c src/lib: Fix spacing 2017-03-13 17:16:08 +01:00
timestamp.c symbols.h: Add macro to define memlayout region symbols 2019-02-22 06:44:02 +00:00
trace.c src/lib: Fix checkpatch warnings 2016-09-07 22:28:00 +02:00
ubsan.c complier.h: add __noreturn and use it in code base 2018-09-10 15:02:51 +00:00
version.c ACPI: Correct asl_compiler_revision value 2019-02-21 19:07:31 +00:00
wrdd.c Move compiler.h to commonlib 2018-10-08 16:57:27 +00:00