Kyösti Mälkki has submitted this change. ( https://review.coreboot.org/c/coreboot/+/63290 )
Change subject: ChromeOS: Drop filling ECFW_RW/RO state in CNVS ......................................................................
ChromeOS: Drop filling ECFW_RW/RO state in CNVS
This field was never meant to be filled out by coreboot, because it can't know what the right value for this will be by the time the OS is running, so anything coreboot could fill in here is premature.
This field is only read by the chromeos-specific `crossystem` utility, not by kernel code, so if one does not run through depthcharge there'll be many more broken assumptions in CNVS anyway.
Change-Id: Ia56b3a3fc82f1b8247a6ee512fe960e9d3d87585 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/63290 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com Reviewed-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/include/bootmode.h M src/mainboard/google/butterfly/chromeos.c M src/mainboard/google/parrot/chromeos.c M src/mainboard/google/stout/chromeos.c M src/mainboard/samsung/lumpy/chromeos.c M src/vendorcode/google/chromeos/gnvs.c 6 files changed, 0 insertions(+), 38 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, but someone else must approve Tim Wawrzynczak: Looks good to me, approved
diff --git a/src/include/bootmode.h b/src/include/bootmode.h index e2d1cb9..12c9f58 100644 --- a/src/include/bootmode.h +++ b/src/include/bootmode.h @@ -14,7 +14,6 @@ int get_wipeout_mode_switch(void); int get_lid_switch(void); int get_ec_is_trusted(void); -bool mainboard_ec_running_ro(void);
/* Return 1 if display initialization is required. 0 if not. */ int display_init_required(void); diff --git a/src/mainboard/google/butterfly/chromeos.c b/src/mainboard/google/butterfly/chromeos.c index fb249d4..b4bd5fe 100644 --- a/src/mainboard/google/butterfly/chromeos.c +++ b/src/mainboard/google/butterfly/chromeos.c @@ -48,15 +48,6 @@ return 0; }
-bool mainboard_ec_running_ro(void) -{ - // TODO: MLR - // The firmware read/write status is a "virtual" switch and - // will be handled elsewhere. Until then hard-code to - // read/write instead of read-only for developer mode. - return false; -} - static const struct cros_gpio cros_gpios[] = { CROS_GPIO_REC_AH(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME), CROS_GPIO_WP_AL(WP_GPIO, CROS_GPIO_DEVICE_NAME), diff --git a/src/mainboard/google/parrot/chromeos.c b/src/mainboard/google/parrot/chromeos.c index e0bc0b0..4efcb4c 100644 --- a/src/mainboard/google/parrot/chromeos.c +++ b/src/mainboard/google/parrot/chromeos.c @@ -46,11 +46,6 @@ return !get_gpio(GPIO_REC_MODE); }
-bool mainboard_ec_running_ro(void) -{ - return get_recovery_mode_switch(); -} - static const struct cros_gpio cros_gpios[] = { CROS_GPIO_REC_AH(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME), CROS_GPIO_WP_AL(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME), diff --git a/src/mainboard/google/stout/chromeos.c b/src/mainboard/google/stout/chromeos.c index fcbbc8a..2fbddc2 100644 --- a/src/mainboard/google/stout/chromeos.c +++ b/src/mainboard/google/stout/chromeos.c @@ -74,11 +74,6 @@ return ec_in_rec_mode; }
-bool mainboard_ec_running_ro(void) -{ - return !!get_recovery_mode_switch(); -} - static const struct cros_gpio cros_gpios[] = { CROS_GPIO_REC_AH(CROS_GPIO_VIRTUAL, CROS_GPIO_DEVICE_NAME), CROS_GPIO_WP_AL(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME), diff --git a/src/mainboard/samsung/lumpy/chromeos.c b/src/mainboard/samsung/lumpy/chromeos.c index 1b9c7c4..f8b0afc 100644 --- a/src/mainboard/samsung/lumpy/chromeos.c +++ b/src/mainboard/samsung/lumpy/chromeos.c @@ -85,11 +85,6 @@ pci_s_write_config32(dev, SATA_SP, flags); }
-bool mainboard_ec_running_ro(void) -{ - return !ec_read(0xcb); -} - static const struct cros_gpio cros_gpios[] = { CROS_GPIO_REC_AL(GPIO_REC_MODE, CROS_GPIO_DEVICE_NAME), CROS_GPIO_WP_AH(GPIO_SPI_WP, CROS_GPIO_DEVICE_NAME), diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c index b1090a4..33389b4e 100644 --- a/src/vendorcode/google/chromeos/gnvs.c +++ b/src/vendorcode/google/chromeos/gnvs.c @@ -32,8 +32,6 @@ return region_device_sz(&vpd); }
-__weak bool mainboard_ec_running_ro(void) { return true; } - void chromeos_init_chromeos_acpi(void) { size_t vpd_size; @@ -58,17 +56,6 @@ chromeos_acpi->vpd_rw_base = vpd_base; chromeos_acpi->vpd_rw_size = vpd_size; } - - /* EC can override to ECFW_RW. */ - chromeos_acpi->vbt2 = ACTIVE_ECFW_RO; - - if (CONFIG(EC_GOOGLE_CHROMEEC)) { - if (!google_ec_running_ro()) - chromeos_acpi->vbt2 = ACTIVE_ECFW_RW; - } else { - if (!mainboard_ec_running_ro()) - chromeos_acpi->vbt2 = ACTIVE_ECFW_RW; - } }
void chromeos_set_me_hash(u32 *hash, int len)