On 27/05/08 21:58 +0200, Peter Stuge wrote:
On Tue, May 27, 2008 at 01:46:52PM -0600, Jordan Crouse wrote:
libpayload: Add PAYLOAD_PARAM macro
Adds the PAYLOAD_PARAM macro to store payload information in a data section in the ELF which can be consumed by other entities.
Great!
Signed-off-by: Jordan Crouse jordan.crouse@amd.com
Per discussion on IRC, if the macro name is changed to PAYLOAD_INFO (and the other patches I acked updated to follow suit) then this is:
Acked-by: Peter Stuge peter@stuge.se
r3354 with PAYLOAD_PARAM renamed to PAYLOAD_INFO.
Index: libpayload/include/libpayload.h
--- libpayload.orig/include/libpayload.h 2008-05-15 10:05:02.000000000 -0600 +++ libpayload/include/libpayload.h 2008-05-15 11:34:20.000000000 -0600 @@ -55,6 +55,18 @@
#define RAND_MAX 0x7fffffff
+/* Payload information parameters - these are used to pass information
- to the entity loading the payload
- Usage: PAYLOAD_PARAM(key, value)
- Example: PAYLOAD_PARAM(name, "CoreInfo!")
- */
+#define _pstruct(key) __pinfo_ ##key +#define PAYLOAD_PARAM(key, value) \ +static const char _pstruct(key)[] \
- __attribute__((__used__)) \
- __attribute__((section(".note.pinfo"),unused)) = #key "=" value
/* Some NVRAM byte definitions */ #define NVRAM_RTC_SECONDS 0 #define NVRAM_RTC_MINUTES 2 Index: libpayload/lib/libpayload.ldscript =================================================================== --- libpayload.orig/lib/libpayload.ldscript 2008-05-15 10:49:33.000000000 -0600 +++ libpayload/lib/libpayload.ldscript 2008-05-15 11:34:05.000000000 -0600 @@ -81,5 +81,5 @@
_end = .;
- /DISCARD/ : { *(.comment) *(.note) *(.note.*) }
- /DISCARD/ : { *(.comment) }
}
-- coreboot mailing list coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot