From 117cf2bdcbbadb3b30c9c250130f82f5e6edc236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Tue, 20 Aug 2019 06:01:57 +0300 Subject: Split MAYBE_STATIC to _BSS and _NONZERO variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/35003 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/ec/google/chromeec/ec_boardid.c | 2 +- src/ec/google/chromeec/ec_lpc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ec/google/chromeec') diff --git a/src/ec/google/chromeec/ec_boardid.c b/src/ec/google/chromeec/ec_boardid.c index 01e3c90e3a..1307ce17b6 100644 --- a/src/ec/google/chromeec/ec_boardid.c +++ b/src/ec/google/chromeec/ec_boardid.c @@ -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)) diff --git a/src/ec/google/chromeec/ec_lpc.c b/src/ec/google/chromeec/ec_lpc.c index feea9dd483..1d7e7ee7c8 100644 --- a/src/ec/google/chromeec/ec_lpc.c +++ b/src/ec/google/chromeec/ec_lpc.c @@ -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(); -- cgit v1.2.3