summaryrefslogtreecommitdiff
path: root/src/include/symbols.h
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2016-02-18 15:46:15 -0800
committerJulius Werner <jwerner@chromium.org>2016-02-22 21:38:07 +0100
commit862c385f9a6a5b92fa6b694136854d84b471ed8e (patch)
treef8c55588b28ce827a4e79bb8ca158e9e04c4a874 /src/include/symbols.h
parentf7c01aa7748ecd22832ded41e7e2ec0cc186c813 (diff)
downloadcoreboot-862c385f9a6a5b92fa6b694136854d84b471ed8e.tar.xz
memlayout: Add symbols for stage bounds
Stages are inconsistent with other memlayout regions in that they don't have _<name> and _e<name> symbols defined. We have _program and _eprogram, but that always only refers to the current stage and _eprogram marks the actual end of the executable's memory footprint, not the end of the area allocated in memlayout. Both of these are sometimes useful to know, so let's add another set of symbols that allow the stage areas to be treated more similarly to other regions. Change-Id: I9e8cff46bb15b51c71a87bd11affb37610aa7df9 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/13737 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/include/symbols.h')
-rw-r--r--src/include/symbols.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/include/symbols.h b/src/include/symbols.h
index a36392f125..d7cb35c0ef 100644
--- a/src/include/symbols.h
+++ b/src/include/symbols.h
@@ -62,6 +62,24 @@ extern u8 _program[];
extern u8 _eprogram[];
#define _program_size (_eprogram - _program)
+/* _<stage>_size is always the maximum amount allocated in memlayout, whereas
+ * _program_size gives the actual memory footprint *used* by current stage. */
+extern u8 _bootblock[];
+extern u8 _ebootblock[];
+#define _bootblock_size (_ebootblock - _bootblock)
+
+extern u8 _romstage[];
+extern u8 _eromstage[];
+#define _romstage_size (_eromstage - _romstage)
+
+extern u8 _ramstage[];
+extern u8 _eramstage[];
+#define _ramstage_size (_eramstage - _ramstage)
+
+extern u8 _verstage[];
+extern u8 _everstage[];
+#define _verstage_size (_everstage - _verstage)
+
/* Arch-specific, move to <arch/symbols.h> if they become too many. */
extern u8 _ttb[];