summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2021-11-02 18:16:32 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2022-04-06 09:21:46 +0000
commite50bb8fc9efe25edf1ab27c7b6a88dfb7293ce06 (patch)
tree3151a5fc6969f68e027f005f2a58ae2367ac7ba0 /src/vendorcode
parent487d04540b551f2b3253b6f9042c723e5472023f (diff)
ChromeOS: Add legacy mainboard_ec_running_ro()
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 <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58896 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/google/chromeos/chromeos.h1
-rw-r--r--src/vendorcode/google/chromeos/gnvs.c19
2 files changed, 10 insertions, 10 deletions
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 <acpi/acpi.h>
#include <acpi/acpigen.h>
+#include <bootmode.h>
#include <types.h>
#include <string.h>
#include <stdlib.h>
@@ -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)