Attention is currently required from: Julius Werner. Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63433 )
Change subject: [WIP] Remaining ENV_ROMSTAGE cases ......................................................................
[WIP] Remaining ENV_ROMSTAGE cases
Change-Id: I5a1ba7ca9f5e757f062f80827d72be878e0411de Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/include/rules.h M src/lib/cbfs.c M src/mainboard/google/cyan/chromeos.c M src/mainboard/google/rambi/chromeos.c 4 files changed, 9 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/63433/1
diff --git a/src/include/rules.h b/src/include/rules.h index 58e656a..b3d4632 100644 --- a/src/include/rules.h +++ b/src/include/rules.h @@ -296,6 +296,9 @@ #define ENV_STAGE_CREATES_CBMEM ENV_ROMSTAGE #define ENV_STAGE_HAS_CBMEM (ENV_ROMSTAGE | ENV_POSTCAR | ENV_RAMSTAGE)
+/* FIXME */ +#define ENV_FIRST_CBMEM_STAGE ENV_ROMSTAGE + #if ENV_X86 #define STAGE_HAS_SPINLOCKS !ENV_ROMSTAGE_OR_BEFORE #elif ENV_RISCV diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 36561b0..8bcb023 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -134,11 +134,13 @@ if (fspm_env() && CONFIG(FSP_COMPRESS_FSP_M_LZMA)) return true; /* We assume here romstage and postcar are never compressed. */ + if (ENV_FIRST_CBMEM_STAGE && !CONFIG(POSTCAR_STAGE) && CONFIG(COMPRESS_RAMSTAGE)) + return true; if (ENV_BOOTBLOCK || ENV_SEPARATE_VERSTAGE) return false; - if (ENV_ROMSTAGE && CONFIG(POSTCAR_STAGE)) + if (ENV_FIRST_CBMEM_STAGE && CONFIG(POSTCAR_STAGE)) return false; - if ((ENV_ROMSTAGE || ENV_POSTCAR) && !CONFIG(COMPRESS_RAMSTAGE)) + if ((ENV_FIRST_CBMEM_STAGE || ENV_POSTCAR) && !CONFIG(COMPRESS_RAMSTAGE)) return false; if (ENV_SMM) return false; diff --git a/src/mainboard/google/cyan/chromeos.c b/src/mainboard/google/cyan/chromeos.c index 6ecab94..408352e 100644 --- a/src/mainboard/google/cyan/chromeos.c +++ b/src/mainboard/google/cyan/chromeos.c @@ -35,7 +35,7 @@ * Configuring this GPIO as input so that there isn't any ambiguity * in the reading. */ -#if ENV_ROMSTAGE +#if ENV_FIRST_CBMEM_STAGE if (CONFIG(BOARD_GOOGLE_CYAN)) { write32((void *)(COMMUNITY_GPEAST_BASE + WP_STATUS_PAD_CFG0), (PAD_PULL_UP_20K | PAD_GPIO_ENABLE | PAD_CONFIG0_GPI_DEFAULT)); diff --git a/src/mainboard/google/rambi/chromeos.c b/src/mainboard/google/rambi/chromeos.c index eae2357..b577cb6 100644 --- a/src/mainboard/google/rambi/chromeos.c +++ b/src/mainboard/google/rambi/chromeos.c @@ -31,7 +31,7 @@ * there is a 10K pullup. Disable the internal pull in romstage so that * there isn't any ambiguity in the reading. */ - if (ENV_ROMSTAGE) + if (ENV_FIRST_CBMEM_STAGE) ssus_disable_internal_pull(WP_STATUS_PAD);
/* WP is enabled when the pin is reading high. */