diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2021-07-25 10:40:53 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-07-28 08:19:30 +0000 |
commit | ac522f1cd7e955bcb7bcd2fe6942d5a09223a509 (patch) | |
tree | fa63cb6c6d6e1111945fd27bff073c554ac5f8bf /src/vendorcode | |
parent | de3859d53856b7fcbc32df897a6afa5144e743ff (diff) |
src/vendorcode/eltan: Don't reference CONFIG_CBFS_SIZE
This symbol is only used in generating a default fmap.
Change-Id: I8d92eba9978cdad5795b0f5755e1d75db7b3cb2d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56592
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Diffstat (limited to 'src/vendorcode')
-rw-r--r-- | src/vendorcode/eltan/security/verified_boot/vboot_check.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vendorcode/eltan/security/verified_boot/vboot_check.c b/src/vendorcode/eltan/security/verified_boot/vboot_check.c index 0de2f0af55..ed20af5076 100644 --- a/src/vendorcode/eltan/security/verified_boot/vboot_check.c +++ b/src/vendorcode/eltan/security/verified_boot/vboot_check.c @@ -4,6 +4,7 @@ #include <bootmem.h> #include <bootmode.h> #include <cbfs.h> +#include <fmap_config.h> #include <vboot_check.h> #include <vboot_common.h> #include <vb2_internals_please_do_not_use.h> @@ -177,6 +178,12 @@ static void verified_boot_check_buffer(const char *name, void *start, size_t siz } } +#if FMAP_SECTION_COREBOOT_START < (0xffffffff - CONFIG_ROM_SIZE + 1) +#define COREBOOT_CBFS_START (0xffffffff - CONFIG_ROM_SIZE + 1 + FMAP_SECTION_COREBOOT_START) +#else +#define COREBOOT_CBFS_START FMAP_SECTION_COREBOOT_START +#endif + void verified_boot_check_cbfsfile(const char *name, uint32_t type, uint32_t hash_index, void **buffer, uint32_t *filesize, int32_t pcr) { @@ -189,7 +196,7 @@ void verified_boot_check_cbfsfile(const char *name, uint32_t type, uint32_t hash if (!ENV_ROMSTAGE_OR_BEFORE && (type & VERIFIED_BOOT_COPY_BLOCK)) { if ((buffer) && (*buffer) && (*filesize >= size) && - ((uint32_t) start > (uint32_t)(~(CONFIG_CBFS_SIZE-1)))) { + ((uint32_t) start > COREBOOT_CBFS_START)) { /* Use the buffer passed in if possible */ printk(BIOS_DEBUG, "%s: move buffer to memory\n", __func__); |