From f7c6d489ae28af611811515c1df96cfb10c79e9f Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Wed, 6 Feb 2013 15:47:31 -0600 Subject: rmodule: add ramstage support Coreboot's ramstage defines certain sections/symbols in its fixed static linker script. It uses these sections/symbols for locating the drivers as well as its own program information. Add these sections and symbols to the rmodule linker script so that ramstage can be linked as an rmodule. These sections and symbols are a noop for other rmodule-linked programs, but they are vital to the ramstage. Also add a comment in coreboot_ram.ld to mirror any changes made there to the rmodule linker script. Change-Id: Ib9885a00e987aef0ee1ae34f1d73066e15bca9b1 Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/2786 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones --- src/include/rmodule.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/include/rmodule.h') diff --git a/src/include/rmodule.h b/src/include/rmodule.h index 30eee0ea05..5300c63766 100644 --- a/src/include/rmodule.h +++ b/src/include/rmodule.h @@ -27,6 +27,7 @@ enum { RMODULE_TYPE_SMM, RMODULE_TYPE_SIPI_VECTOR, + RMODULE_TYPE_STAGE, }; struct rmodule; @@ -58,8 +59,8 @@ int rmodule_load_alignment(const struct rmodule *m); .module_entry_point = FIELD_ENTRY(entry_), \ .parameters_begin = FIELD_ENTRY(_module_params_begin), \ .parameters_end = FIELD_ENTRY(_module_params_end), \ - .bss_begin = FIELD_ENTRY(_bss_begin), \ - .bss_end = FIELD_ENTRY(_bss_end), \ + .bss_begin = FIELD_ENTRY(_bss), \ + .bss_end = FIELD_ENTRY(_ebss), \ } #define DEFINE_RMODULE_HEADER(name_, entry_, type_) \ @@ -119,8 +120,8 @@ extern char _relocations_begin_offset[]; extern char _relocations_end_offset[]; extern char _payload_end_offset[]; extern char _payload_begin_offset[]; -extern char _bss_begin[]; -extern char _bss_end[]; +extern char _bss[]; +extern char _ebss[]; extern char _module_program_size[]; extern char _module_link_start_addr[]; extern char _module_params_begin[]; -- cgit v1.2.3