security/vboot: Deprecate VBOOT_VBNV_EC
Boards using VBOOT_VBNV_EC (nyan, daisy, veyron, peach_pit) are all ChromeOS devices and they've reached the end of life since Feb 2022. Therefore, remove VBOOT_VBNV_EC for them, each with different replacement. - nyan (nyan, nyan_big, nyan_blaze): Add RW_NVRAM to their FMAP (by reducing the size of RW_VPD), and replace VBOOT_VBNV_EC with VBOOT_VBNV_FLASH. - veyron: Add RW_NVRAM to their FMAP (by reducing the size of SHARED_DATA), and replace VBOOT_VBNV_EC with VBOOT_VBNV_FLASH. Also enlarge the OVERLAP_VERSTAGE_ROMSTAGE section for rk3288 (by reducing the size of PRERAM_CBMEM_CONSOLE), so that verstage won't exceed its allotted size. - daisy: Because BOOT_DEVICE_SPI_FLASH is not set, which is required for VBOOT_VBNV_FLASH, disable MAINBOARD_HAS_CHROMEOS and VBOOT configs. - peach_pit: As VBOOT is not set, simply remove the unused VBOOT_VBNV_EC option. Remove the VBOOT_VBNV_EC Kconfig option as well as related code, leaving VBOOT_VBNV_FLASH and VBOOT_VBNV_CMOS as the only two backend options for vboot nvdata (VBNV). Also add a check in read_vbnv() and save_vbnv() for VBNV options. BUG=b:178689388 TEST=util/abuild/abuild -t GOOGLE_NYAN -x -a TEST=util/abuild/abuild -t GOOGLE_VEYRON_JAQ -x -a TEST=util/abuild/abuild -t GOOGLE_DAISY -a TEST=util/abuild/abuild -t GOOGLE_PEACH_PIT -a BRANCH=none Change-Id: Ic67d69e694cff3176dbee12d4c6311bc85295863 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65012 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
parent
e399aa8c9c
commit
6b0d085164
16 changed files with 21 additions and 52 deletions
|
|
@ -58,12 +58,6 @@ config VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
|
|||
Vboot non-volatile storage data will be backed up from CMOS to flash
|
||||
and restored from flash if the CMOS is invalid due to power loss.
|
||||
|
||||
config VBOOT_VBNV_EC
|
||||
bool
|
||||
default n
|
||||
help
|
||||
VBNV is stored in EC
|
||||
|
||||
config VBOOT_VBNV_FLASH
|
||||
bool
|
||||
default n
|
||||
|
|
|
|||
|
|
@ -72,11 +72,6 @@ verstage-$(CONFIG_VBOOT_VBNV_CMOS_BACKUP_TO_FLASH) += vbnv_flash.c
|
|||
romstage-$(CONFIG_VBOOT_VBNV_CMOS_BACKUP_TO_FLASH) += vbnv_flash.c
|
||||
ramstage-$(CONFIG_VBOOT_VBNV_CMOS_BACKUP_TO_FLASH) += vbnv_flash.c
|
||||
|
||||
bootblock-$(CONFIG_VBOOT_VBNV_EC) += vbnv_ec.c
|
||||
verstage-$(CONFIG_VBOOT_VBNV_EC) += vbnv_ec.c
|
||||
romstage-$(CONFIG_VBOOT_VBNV_EC) += vbnv_ec.c
|
||||
ramstage-$(CONFIG_VBOOT_VBNV_EC) += vbnv_ec.c
|
||||
|
||||
bootblock-$(CONFIG_VBOOT_VBNV_FLASH) += vbnv_flash.c
|
||||
verstage-$(CONFIG_VBOOT_VBNV_FLASH) += vbnv_flash.c
|
||||
romstage-$(CONFIG_VBOOT_VBNV_FLASH) += vbnv_flash.c
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <types.h>
|
||||
#include <security/vboot/vbnv.h>
|
||||
|
|
@ -61,10 +62,10 @@ void read_vbnv(uint8_t *vbnv_copy)
|
|||
{
|
||||
if (CONFIG(VBOOT_VBNV_CMOS))
|
||||
read_vbnv_cmos(vbnv_copy);
|
||||
else if (CONFIG(VBOOT_VBNV_EC))
|
||||
read_vbnv_ec(vbnv_copy);
|
||||
else if (CONFIG(VBOOT_VBNV_FLASH))
|
||||
read_vbnv_flash(vbnv_copy);
|
||||
else
|
||||
dead_code();
|
||||
|
||||
/* Check data for consistency */
|
||||
if (!verify_vbnv(vbnv_copy))
|
||||
|
|
@ -79,10 +80,10 @@ void save_vbnv(const uint8_t *vbnv_copy)
|
|||
{
|
||||
if (CONFIG(VBOOT_VBNV_CMOS))
|
||||
save_vbnv_cmos(vbnv_copy);
|
||||
else if (CONFIG(VBOOT_VBNV_EC))
|
||||
save_vbnv_ec(vbnv_copy);
|
||||
else if (CONFIG(VBOOT_VBNV_FLASH))
|
||||
save_vbnv_flash(vbnv_copy);
|
||||
else
|
||||
dead_code();
|
||||
|
||||
/* Clear initialized flag to force cached data to be updated */
|
||||
vbnv_initialized = 0;
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#include <types.h>
|
||||
#include <ec/google/chromeec/ec.h>
|
||||
#include <security/vboot/vbnv.h>
|
||||
#include <security/vboot/vbnv_layout.h>
|
||||
|
||||
void read_vbnv_ec(uint8_t *vbnv_copy)
|
||||
{
|
||||
google_chromeec_vbnv_context(1, vbnv_copy, VBOOT_VBNV_BLOCK_SIZE);
|
||||
}
|
||||
|
||||
void save_vbnv_ec(const uint8_t *vbnv_copy)
|
||||
{
|
||||
google_chromeec_vbnv_context(0, (uint8_t *)vbnv_copy,
|
||||
VBOOT_VBNV_BLOCK_SIZE);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue