aboutsummaryrefslogtreecommitdiff
path: root/src/lib/coreboot_table.c
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2019-11-18 12:35:21 -0700
committerPatrick Georgi <pgeorgi@google.com>2019-11-20 13:27:44 +0000
commitfe338e2319f40a22f1c64aef3df95e015ab8b90b (patch)
treeae58f62632c6df74719b1c6ae13607c90d0805de /src/lib/coreboot_table.c
parentaeb652a4a04226f467eb8e850b2096d772c6e31e (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/lib/coreboot_table.c')
-rw-r--r--src/lib/coreboot_table.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c
index 241d8e1550..7245a63893 100644
--- a/src/lib/coreboot_table.c
+++ b/src/lib/coreboot_table.c
@@ -261,12 +261,12 @@ static void lb_board_id(struct lb_header *header)
static void lb_boot_media_params(struct lb_header *header)
{
struct lb_boot_media_params *bmp;
- struct cbfs_props props;
const struct region_device *boot_dev;
+ struct region_device cbfs_dev;
boot_device_init();
- if (cbfs_boot_region_properties(&props))
+ if (cbfs_boot_region_device(&cbfs_dev))
return;
boot_dev = boot_device_ro();
@@ -277,8 +277,8 @@ static void lb_boot_media_params(struct lb_header *header)
bmp->tag = LB_TAG_BOOT_MEDIA_PARAMS;
bmp->size = sizeof(*bmp);
- bmp->cbfs_offset = props.offset;
- bmp->cbfs_size = props.size;
+ bmp->cbfs_offset = region_device_offset(&cbfs_dev);
+ bmp->cbfs_size = region_device_sz(&cbfs_dev);
bmp->boot_media_size = region_device_sz(boot_dev);
bmp->fmap_offset = get_fmap_flash_offset();