diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-03-28 23:56:22 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2015-05-26 22:33:53 +0200 |
commit | 0424c95a6dafdb65070538d6c5aa394b75eb9850 (patch) | |
tree | f5bd9f485a1a44eece1662a29c1435a44ab5c58a /src/vendorcode/google/chromeos/vboot_common.c | |
parent | b6981c0f9c4ce89c4209c14fb326a414096f2ff1 (diff) |
fmap: new API using region_device
Instead of being pointer based use the region infrastrucutre.
Additionally, this removes the need for arch-specific compilation
paths. The users of the new API can use the region APIs to memory
map or read the region provided by the new fmap API.
Change-Id: Ie36e9ff9cb554234ec394b921f029eeed6845aee
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9170
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/vendorcode/google/chromeos/vboot_common.c')
-rw-r--r-- | src/vendorcode/google/chromeos/vboot_common.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/vendorcode/google/chromeos/vboot_common.c b/src/vendorcode/google/chromeos/vboot_common.c index f593c7b43b..1db9d96aea 100644 --- a/src/vendorcode/google/chromeos/vboot_common.c +++ b/src/vendorcode/google/chromeos/vboot_common.c @@ -22,27 +22,19 @@ #include <cbmem.h> #include <console/cbmem_console.h> #include <console/console.h> +#include <fmap.h> #include <reset.h> #include <stddef.h> #include <string.h> #include "chromeos.h" -#include "fmap.h" #include "vboot_common.h" #include "vboot_handoff.h" void vboot_locate_region(const char *name, struct region *region) { - const struct fmap_area *area; - - region->size = 0; - - area = find_fmap_area(fmap_find(), name); - - if (area != NULL) { - region->offset = area->offset; - region->size = area->size; - } + if (fmap_locate_area(name, region)) + region->size = 0; } void *vboot_get_region(size_t offset, size_t size, void *dest) |