summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/security/vboot/vbnv_flash.c3
-rw-r--r--src/security/vboot/vboot_common.c10
-rw-r--r--src/security/vboot/vboot_common.h6
-rw-r--r--src/security/vboot/vboot_logic.c5
4 files changed, 5 insertions, 19 deletions
diff --git a/src/security/vboot/vbnv_flash.c b/src/security/vboot/vbnv_flash.c
index 908846fe70..86c43cd302 100644
--- a/src/security/vboot/vbnv_flash.c
+++ b/src/security/vboot/vbnv_flash.c
@@ -16,6 +16,7 @@
#include <arch/early_variables.h>
#include <commonlib/region.h>
#include <console/console.h>
+#include <fmap.h>
#include <string.h>
#include <vb2_api.h>
#include <security/vboot/vboot_common.h>
@@ -67,7 +68,7 @@ static int init_vbnv(void)
int offset;
int i;
- if (vboot_named_region_device_rw("RW_NVRAM", rdev) ||
+ if (fmap_locate_area_as_rdev_rw("RW_NVRAM", rdev) ||
region_device_sz(rdev) < BLOB_SIZE) {
printk(BIOS_ERR, "%s: failed to locate NVRAM\n", __func__);
return 1;
diff --git a/src/security/vboot/vboot_common.c b/src/security/vboot/vboot_common.c
index 2d35c6be05..a24b220a9c 100644
--- a/src/security/vboot/vboot_common.c
+++ b/src/security/vboot/vboot_common.c
@@ -24,16 +24,6 @@
#include <security/vboot/vbnv.h>
#include <vb2_api.h>
-int vboot_named_region_device(const char *name, struct region_device *rdev)
-{
- return fmap_locate_area_as_rdev(name, rdev);
-}
-
-int vboot_named_region_device_rw(const char *name, struct region_device *rdev)
-{
- return fmap_locate_area_as_rdev_rw(name, rdev);
-}
-
/* Check if it is okay to enable USB Device Controller (UDC). */
int vboot_can_enable_udc(void)
{
diff --git a/src/security/vboot/vboot_common.h b/src/security/vboot/vboot_common.h
index 42b4a6b59b..a20ab62bd4 100644
--- a/src/security/vboot/vboot_common.h
+++ b/src/security/vboot/vboot_common.h
@@ -20,12 +20,6 @@
#include <vboot_api.h>
#include <vboot_struct.h>
-/* Locate vboot area by name. Returns 0 on success and -1 on error. */
-int vboot_named_region_device(const char *name, struct region_device *rdev);
-
-/* Like vboot_named_region_device() but provides a RW region device. */
-int vboot_named_region_device_rw(const char *name, struct region_device *rdev);
-
/*
* Function to check if there is a request to enter recovery mode. Returns
* reason code if request to enter recovery mode is present, otherwise 0.
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c
index 5facd283ee..71371cdb75 100644
--- a/src/security/vboot/vboot_logic.c
+++ b/src/security/vboot/vboot_logic.c
@@ -19,6 +19,7 @@
#include <cbmem.h>
#include <console/console.h>
#include <console/vtxprintf.h>
+#include <fmap.h>
#include <string.h>
#include <timestamp.h>
#include <vb2_api.h>
@@ -78,7 +79,7 @@ vb2_error_t vb2ex_read_resource(struct vb2_context *ctx,
return VB2_ERROR_EX_READ_RESOURCE_INDEX;
}
- if (vboot_named_region_device(name, &rdev))
+ if (fmap_locate_area_as_rdev(name, &rdev))
return VB2_ERROR_EX_READ_RESOURCE_SIZE;
if (rdev_readat(&rdev, buf, offset, size) != size)
@@ -265,7 +266,7 @@ static int locate_firmware(struct vb2_context *ctx,
else
name = "FW_MAIN_B";
- return vboot_named_region_device(name, fw_main);
+ return fmap_locate_area_as_rdev(name, fw_main);
}
/**