From 8c09377deab1b5a5120889bb6c689ad460381c29 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 9 Feb 2016 16:09:15 -0800 Subject: timestamp: Remove HAS_PRECBMEM_TIMESTAMP_REGION Kconfig This patch generalizes the approach previously used for ARM32 TTB_SUBTABLES to "auto-detect" whether a certain region was defined in memlayout.ld. This allows us to get rid of the explicit Kconfig for the TIMESTAMP region, reducing configuration redundancy and avoiding confusion when setting up future boards. (Removing armv4/bootblock_simple.c because it references this Kconfig and it is a dead file that I just forgot to remove in CL:12076.) BRANCH=None BUG=None TEST=Booted Oak and confirmed that all pre-RAM timestamps are still there. Built Nyan and Falco. Change-Id: I557a4b263018511d17baa4177963130a97ea310a Signed-off-by: Julius Werner Reviewed-on: https://review.coreboot.org/13652 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/include/symbols.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/include/symbols.h') diff --git a/src/include/symbols.h b/src/include/symbols.h index 4276176398..a36392f125 100644 --- a/src/include/symbols.h +++ b/src/include/symbols.h @@ -84,4 +84,11 @@ extern u8 _framebuffer[]; extern u8 _eframebuffer[]; #define _framebuffer_size (_eframebuffer - _framebuffer) +/* Put this into a .c file accessing a linker script region to mark that region + * as "optional". If it is defined in memlayout.ld (or anywhere else), the + * values from that definition will be used. If not, start, end and size will + * all evaluate to 0. (We can't explicitly assign the symbols to 0 in the + * assembly due to https://sourceware.org/bugzilla/show_bug.cgi?id=1038.) */ +#define DECLARE_OPTIONAL_REGION(name) asm (".weak _" #name ", _e" #name ) + #endif /* __SYMBOLS_H */ -- cgit v1.2.3