summaryrefslogtreecommitdiff
path: root/src/security
diff options
context:
space:
mode:
Diffstat (limited to 'src/security')
-rw-r--r--src/security/vboot/Kconfig6
-rw-r--r--src/security/vboot/Makefile.inc5
-rw-r--r--src/security/vboot/vbnv.c9
-rw-r--r--src/security/vboot/vbnv_ec.c17
4 files changed, 5 insertions, 32 deletions
diff --git a/src/security/vboot/Kconfig b/src/security/vboot/Kconfig
index 04770c94eb..06f9e93485 100644
--- a/src/security/vboot/Kconfig
+++ b/src/security/vboot/Kconfig
@@ -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
diff --git a/src/security/vboot/Makefile.inc b/src/security/vboot/Makefile.inc
index 52f374ec82..2caeb17434 100644
--- a/src/security/vboot/Makefile.inc
+++ b/src/security/vboot/Makefile.inc
@@ -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
diff --git a/src/security/vboot/vbnv.c b/src/security/vboot/vbnv.c
index 7e92401e55..26946fd335 100644
--- a/src/security/vboot/vbnv.c
+++ b/src/security/vboot/vbnv.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;
diff --git a/src/security/vboot/vbnv_ec.c b/src/security/vboot/vbnv_ec.c
deleted file mode 100644
index fcae37a910..0000000000
--- a/src/security/vboot/vbnv_ec.c
+++ /dev/null
@@ -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);
-}