ChromeOS: Use CHROMEOS_NVS guard

Replace CONFIG(CHROMEOS) with CONFIG(CHROMEOS_NVS) for cases where
the conditional and dependency are clearly about the presence of
an ACPI NVS table specified by vendorcode. For couple locations also
CONFIG(HAVE_ACPI_TABLES) changes to CONFIG(CHROMEOS_NVS).

This also helps find some of the CONFIG(CHROMEOS) cases that might
be more FMAP and VPD related and not about ChromeOS per-se, as
suggested by followup works.

Change-Id: Ife888ae43093949bb2d3e397565033037396f434
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50611
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Lance Zhao
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki
2021-02-10 17:53:34 +02:00
committed by Patrick Georgi
parent 307be997d1
commit 84d10cc5d3
15 changed files with 21 additions and 16 deletions

View File

@ -12,6 +12,7 @@ config CHROMEOS
select ELOG if BOOT_DEVICE_SUPPORTS_WRITES
select COLLECT_TIMESTAMPS
select VBOOT
select CHROMEOS_NVS if ACPI_SOC_NVS
select VPD
select VBOOT_SLOTS_RW_AB
help
@ -87,5 +88,9 @@ config CHROMEOS_DRAM_PART_NUMBER_IN_CBI
Some boards declare the DRAM part number in the CBI instead of the SPD. This option
allows those boards to declare that their DRAM part number is stored in the CBI.
config CHROMEOS_NVS
bool
depends on ACPI_SOC_NVS
endif # CHROMEOS
endmenu

View File

@ -1,7 +1,7 @@
## SPDX-License-Identifier: GPL-2.0-only
ramstage-$(CONFIG_ELOG) += elog.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += gnvs.c
ramstage-$(CONFIG_CHROMEOS_NVS) += gnvs.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
ramstage-$(CONFIG_CHROMEOS_RAMOOPS) += ramoops.c
ramstage-y += vpd_mac.c vpd_serialno.c vpd_calibration.c

View File

@ -38,7 +38,7 @@ static void ramoops_alloc(void *arg)
return;
}
if (CONFIG(HAVE_ACPI_TABLES))
if (CONFIG(CHROMEOS_NVS))
set_ramoops(ram_oops, size);
}