diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2016-03-12 16:18:17 -0800 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2016-03-15 20:53:38 +0100 |
commit | 821844534c78c60041402e732892f79865636650 (patch) | |
tree | 256f6e998d63f985fd6e632233d64929b4548ee6 /payloads/libpayload/arch | |
parent | 347a7529aa7bf58ac58c3e0e3e563697a4d3f846 (diff) | |
download | coreboot-821844534c78c60041402e732892f79865636650.tar.xz |
libpayload: Move base address, stack and heap size to Kconfig
This will allow more payloads to use the standard linker script
instead of implementing their own.
Change-Id: Ie60120769829f427ceb722109d85859b61dbde31
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14074
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'payloads/libpayload/arch')
-rw-r--r-- | payloads/libpayload/arch/arm/libpayload.ldscript | 11 | ||||
-rw-r--r-- | payloads/libpayload/arch/arm64/libpayload.ldscript | 13 | ||||
-rw-r--r-- | payloads/libpayload/arch/mips/libpayload.ldscript | 10 | ||||
-rw-r--r-- | payloads/libpayload/arch/x86/libpayload.ldscript | 11 |
4 files changed, 13 insertions, 32 deletions
diff --git a/payloads/libpayload/arch/arm/libpayload.ldscript b/payloads/libpayload/arch/arm/libpayload.ldscript index 5f65bd7f1a..492bd0c373 100644 --- a/payloads/libpayload/arch/arm/libpayload.ldscript +++ b/payloads/libpayload/arch/arm/libpayload.ldscript @@ -28,19 +28,14 @@ * SUCH DAMAGE. */ -BASE_ADDRESS = 0x4000000; - OUTPUT_FORMAT("elf32-littlearm","elf32-littlearm", "elf32-littlearm") OUTPUT_ARCH(arm) ENTRY(_entry) -HEAP_SIZE = 2*64*1024; -STACK_SIZE = 16384; - SECTIONS { - . = BASE_ADDRESS; + . = CONFIG_LP_BASE_ADDRESS; . = ALIGN(16); _start = .; @@ -74,12 +69,12 @@ SECTIONS . = ALIGN(16); _heap = .; - . += HEAP_SIZE; + . += CONFIG_LP_HEAP_SIZE; . = ALIGN(16); _eheap = .; _estack = .; - . += STACK_SIZE; + . += CONFIG_LP_STACK_SIZE; . = ALIGN(16); _stack = .; } diff --git a/payloads/libpayload/arch/arm64/libpayload.ldscript b/payloads/libpayload/arch/arm64/libpayload.ldscript index 50c82dce9b..5c807cef17 100644 --- a/payloads/libpayload/arch/arm64/libpayload.ldscript +++ b/payloads/libpayload/arch/arm64/libpayload.ldscript @@ -28,19 +28,14 @@ * SUCH DAMAGE. */ -BASE_ADDRESS = 0x80100000; - OUTPUT_FORMAT("elf64-littleaarch64","elf64-littleaarch64", "elf64-littleaarch64") OUTPUT_ARCH(arm64) ENTRY(_entry) -HEAP_SIZE = 2*64*1024; -STACK_SIZE = 16384; - SECTIONS { - . = BASE_ADDRESS; + . = CONFIG_LP_BASE_ADDRESS; . = ALIGN(16); _start = .; @@ -74,12 +69,12 @@ SECTIONS . = ALIGN(16); _heap = .; - . += HEAP_SIZE; + . += CONFIG_LP_HEAP_SIZE; . = ALIGN(16); _eheap = .; _estack = .; - . += STACK_SIZE; + . += CONFIG_LP_STACK_SIZE; . = ALIGN(16); _stack = .; @@ -88,7 +83,7 @@ SECTIONS */ _exc_estack = .; - . += STACK_SIZE; + . += CONFIG_LP_STACK_SIZE; . = ALIGN(16); _exc_stack = .; } diff --git a/payloads/libpayload/arch/mips/libpayload.ldscript b/payloads/libpayload/arch/mips/libpayload.ldscript index 28a741293b..351c2254fb 100644 --- a/payloads/libpayload/arch/mips/libpayload.ldscript +++ b/payloads/libpayload/arch/mips/libpayload.ldscript @@ -20,15 +20,11 @@ OUTPUT_ARCH(mips) -BASE_ADDRESS = 0x00000000; ENTRY(_entry) -HEAP_SIZE = 2*64*1024; -STACK_SIZE = 16*1024; - SECTIONS { - . = BASE_ADDRESS; + . = CONFIG_LP_BASE_ADDRESS; . = ALIGN(16); _start = .; @@ -68,12 +64,12 @@ SECTIONS . = ALIGN(16); _heap = .; - . += HEAP_SIZE; + . += CONFIG_LP_HEAP_SIZE; . = ALIGN(16); _eheap = .; _estack = .; - . += STACK_SIZE; + . += CONFIG_LP_STACK_SIZE; . = ALIGN(16); _stack = .; } diff --git a/payloads/libpayload/arch/x86/libpayload.ldscript b/payloads/libpayload/arch/x86/libpayload.ldscript index 3e7d4cc318..bcb2165a2f 100644 --- a/payloads/libpayload/arch/x86/libpayload.ldscript +++ b/payloads/libpayload/arch/x86/libpayload.ldscript @@ -27,19 +27,14 @@ * SUCH DAMAGE. */ -BASE_ADDRESS = 0x100000; - OUTPUT_FORMAT(elf32-i386) OUTPUT_ARCH(i386) ENTRY(_entry) -HEAP_SIZE = 2*64*1024; -STACK_SIZE = 16384; - SECTIONS { - . = BASE_ADDRESS; + . = CONFIG_LP_BASE_ADDRESS; . = ALIGN(16); _start = .; @@ -73,12 +68,12 @@ SECTIONS . = ALIGN(16); _heap = .; - . += HEAP_SIZE; + . += CONFIG_LP_HEAP_SIZE; . = ALIGN(16); _eheap = .; _estack = .; - . += STACK_SIZE; + . += CONFIG_LP_STACK_SIZE; . = ALIGN(16); _stack = .; } |