diff options
author | Aaron Durbin <adurbin@chromium.org> | 2019-11-18 12:35:21 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-11-20 13:27:44 +0000 |
commit | fe338e2319f40a22f1c64aef3df95e015ab8b90b (patch) | |
tree | ae58f62632c6df74719b1c6ae13607c90d0805de /src/security/vboot | |
parent | aeb652a4a04226f467eb8e850b2096d772c6e31e (diff) |
cbfs: switch to region_device for location APIs
Drop struct cbfs_props and replace with struct region_device object.
The goal of the cbfs locator APIs are to determine the correct region
device to find the cbfs files. Therefore, start directly using struct
region_device in the cbfs location paths. Update the users of the API
and leverage the default boot region device implementation for
apollolake.
Change-Id: I0158a095cc64c9900d8738f8ffd45ae4040575ea
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36939
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/security/vboot')
-rw-r--r-- | src/security/vboot/vboot_loader.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/security/vboot/vboot_loader.c b/src/security/vboot/vboot_loader.c index 3903f18f6b..3e491a7200 100644 --- a/src/security/vboot/vboot_loader.c +++ b/src/security/vboot/vboot_loader.c @@ -14,6 +14,7 @@ */ #include <arch/early_variables.h> +#include <boot_device.h> #include <cbfs.h> #include <console/console.h> #include <ec/google/chromeec/ec.h> @@ -71,10 +72,9 @@ void vboot_run_logic(void) } } -static int vboot_locate(struct cbfs_props *props) +static int vboot_locate(struct region_device *rdev) { const struct vb2_context *ctx; - struct region_device fw_main; /* Don't honor vboot results until the vboot logic has run. */ if (!vboot_logic_executed()) @@ -85,13 +85,7 @@ static int vboot_locate(struct cbfs_props *props) if (ctx->flags & VB2_CONTEXT_RECOVERY_MODE) return -1; - if (vboot_locate_firmware(ctx, &fw_main)) - return -1; - - props->offset = region_device_offset(&fw_main); - props->size = region_device_sz(&fw_main); - - return 0; + return vboot_locate_firmware(ctx, rdev); } const struct cbfs_locator vboot_locator = { |