Split MAYBE_STATIC to _BSS and _NONZERO variants
These are required to cover the absensce of .data and .bss sections in some programs, most notably ARCH_X86 in execute-in-place with cache-as-ram. Change-Id: I80485ebac94b88c5864a949b17ad1dccdfda6a40 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35003 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
uint32_t board_id(void)
|
||||
{
|
||||
MAYBE_STATIC uint32_t id = BOARD_ID_INIT;
|
||||
MAYBE_STATIC_NONZERO uint32_t id = BOARD_ID_INIT;
|
||||
|
||||
if (id == BOARD_ID_INIT) {
|
||||
if (google_chromeec_get_board_version(&id))
|
||||
|
@@ -401,7 +401,7 @@ void google_chromeec_ioport_range(uint16_t *out_base, size_t *out_size)
|
||||
|
||||
int google_chromeec_command(struct chromeec_command *cec_command)
|
||||
{
|
||||
MAYBE_STATIC int command_version = 0;
|
||||
MAYBE_STATIC_BSS int command_version = 0;
|
||||
|
||||
if (command_version <= 0)
|
||||
command_version = google_chromeec_command_version();
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
uint32_t board_id(void)
|
||||
{
|
||||
MAYBE_STATIC uint32_t id = BOARD_ID_INIT;
|
||||
MAYBE_STATIC_NONZERO uint32_t id = BOARD_ID_INIT;
|
||||
|
||||
if (id == BOARD_ID_INIT) {
|
||||
uint8_t ec_id;
|
||||
|
Reference in New Issue
Block a user