fmap: Map full FMAP for verification in fallback path
The rarely-used fallback path for accessing the FMAP without a cache currently only maps the FMAP header for the initial verify_fmap() call. This used to be fine when we were just checking the magic number, but with CBFS verification we may need to hash the entire FMAP. Since this path is so rarely used anyway and the size difference only has a practical impact on a few platforms, lets keep things simple and just always map the whole FMAP. Change-Id: Ie780a3662bf89637de93a36ce6e23f77fed86265 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78914 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
f976470746
commit
5bc5b1d024
|
@ -122,7 +122,7 @@ static int find_fmap_directory(struct region_device *fmrd)
|
|||
if (boot == NULL)
|
||||
return -1;
|
||||
|
||||
fmap = rdev_mmap(boot, offset, sizeof(struct fmap));
|
||||
fmap = rdev_mmap(boot, offset, FMAP_SIZE);
|
||||
|
||||
if (fmap == NULL)
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue