From e50bb8fc9efe25edf1ab27c7b6a88dfb7293ce06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Tue, 2 Nov 2021 18:16:32 +0200 Subject: ChromeOS: Add legacy mainboard_ec_running_ro() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Motivation is to have mainboard_chromeos_acpi_generate() do nothing else than fill ACPI \OIPG package. Change-Id: I3cb95268424dc27f8c1e26b3d34eff1a7b8eab7f Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/58896 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Julius Werner --- src/vendorcode/google/chromeos/chromeos.h | 1 - src/vendorcode/google/chromeos/gnvs.c | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/vendorcode/google') diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h index abdd6c2a77..da25617121 100644 --- a/src/vendorcode/google/chromeos/chromeos.h +++ b/src/vendorcode/google/chromeos/chromeos.h @@ -25,7 +25,6 @@ void mainboard_prepare_cr50_reset(void); void cbmem_add_vpd_calibration_data(void); void chromeos_set_me_hash(u32*, int); void chromeos_set_ramoops(void *ram_oops, size_t size); -void chromeos_set_ecfw_rw(void); void chromeos_init_chromeos_acpi(void); /** diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c index 7821786979..b1090a44e9 100644 --- a/src/vendorcode/google/chromeos/gnvs.c +++ b/src/vendorcode/google/chromeos/gnvs.c @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -31,6 +32,8 @@ static size_t chromeos_vpd_region(const char *region, uintptr_t *base) return region_device_sz(&vpd); } +__weak bool mainboard_ec_running_ro(void) { return true; } + void chromeos_init_chromeos_acpi(void) { size_t vpd_size; @@ -59,8 +62,13 @@ void chromeos_init_chromeos_acpi(void) /* EC can override to ECFW_RW. */ chromeos_acpi->vbt2 = ACTIVE_ECFW_RO; - if (CONFIG(EC_GOOGLE_CHROMEEC) && !google_ec_running_ro()) - chromeos_acpi->vbt2 = ACTIVE_ECFW_RW; + 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) @@ -83,13 +91,6 @@ void chromeos_set_ramoops(void *ram_oops, size_t size) chromeos_acpi->ramoops_len = size; } -void chromeos_set_ecfw_rw(void) -{ - if (!chromeos_acpi) - return; - chromeos_acpi->vbt2 = ACTIVE_ECFW_RW; -} - void smbios_type0_bios_version(uintptr_t address) { if (!chromeos_acpi) -- cgit v1.2.3