[coreboot] global variables in romstage
Kevin O'Connor
kevin at koconnor.net
Sun Aug 15 17:49:25 CEST 2010
On Thu, Aug 12, 2010 at 09:27:39PM +0200, Patrick Georgi wrote:
> Two possible solutions, both need to be added to
> src/arch/i386/init/ldscript_fallback_cbfs.lb:
>
> 1. _bogus = ASSERT((SIZEOF(.bss) + SIZEOF(.data)) == 0, "Do not use
> global variables in romstage");
[...]
> 2. Add .bss and .data to /DISCARD/.
Just as a point of reference, SeaBIOS has been using method 2.
(SeaBIOS needs to ensure the 16bit code doesn't use any regular global
variables.)
-Kevin
More information about the coreboot
mailing list