summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/armv7/romstage.ld37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/arch/armv7/romstage.ld b/src/arch/armv7/romstage.ld
index 14c5bde3a6..11a91cf0af 100644
--- a/src/arch/armv7/romstage.ld
+++ b/src/arch/armv7/romstage.ld
@@ -60,9 +60,25 @@ SECTIONS
_erom = .;
}
+ /* bss does not contain data, it is just a space that should be zero
+ * initialized on startup. (typically uninitialized global variables)
+ * crt0.S fills between _bss and _ebss with zeroes.
+ */
+ .bss . : {
+ . = ALIGN(8);
+ _bss = .;
+ *(.bss)
+ *(.sbss)
+ *(COMMON)
+ }
+
+ _ebss = .;
+
.car.data . (NOLOAD) : {
+ . = ALIGN(8);
_car_data_start = .;
*(.car.global_data);
+ . = ALIGN(8);
/* The cbmem_console section comes last to take advantage of
* a zero-sized array to hold the memconsole contents that
* grows to a bound of CONFIG_CONSOLE_CAR_BUFFER_SIZE. However,
@@ -73,20 +89,17 @@ SECTIONS
_car_data_end = .;
}
- /* bss does not contain data, it is just a space that should be zero
- * initialized on startup. (typically uninitialized global variables)
- * crt0.S fills between _bss and _ebss with zeroes.
- */
- .bss . : {
- . = ALIGN(8);
- _bss = .;
- *(.bss)
- *(.sbss)
- *(COMMON)
- }
- _ebss = .;
_end = .;
+ /* TODO: check if we are running out of SRAM. Below check is not good
+ * enough though because SRAM has different size on different CPUs
+ * and not all SRAM is available to the romstage. On Exynos, some is
+ * used for BL1, the bootblock and the stack.
+ *
+ * _bogus = ASSERT((_end - _start + EXPECTED_CBMEM_CONSOLE_SIZE <= \
+ * 0x54000), "SRAM area is too full");
+ */
+
/* Discard the sections we don't need/want */
/DISCARD/ : {
*(.comment)