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>
This commit is contained in:
@ -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);
|
||||
|
||||
/**
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user