treewide: Assume FMAP_SECTION_FLASH_START = 0

Now that we require the FMAP to start at offset 0 in the flash, we can
assume this across the entire codebase and therefore simplify it on
several ends.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Ieb1a23f9c0ae8c0e1c91287d7eb6f7f0abbf0c2c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86771
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
This commit is contained in:
Maximilian Brune 2025-03-09 00:02:00 +01:00 committed by Matt DeVillier
commit 2efe4df522
9 changed files with 6 additions and 33 deletions

View file

@ -639,16 +639,6 @@ int amdfwtool_getopt(int argc, char *argv[], amd_cb_config *cb_config, context *
printf(" AMDFWTOOL Using ROM size of %dKB\n", ctx->rom_size / 1024);
if (ctx->rom_size <= MAX_MAPPED_WINDOW) {
uint32_t rom_base_address;
rom_base_address = 0xFFFFFFFF - ctx->rom_size + 1;
if (cb_config->efs_location & ~MAX_MAPPED_WINDOW_MASK)
cb_config->efs_location = cb_config->efs_location - rom_base_address;
if (cb_config->body_location & ~MAX_MAPPED_WINDOW_MASK)
cb_config->body_location = cb_config->body_location - rom_base_address;
}
/* If the flash size is larger than 16M, we assume the given
addresses are already relative ones. Otherwise we print error.*/
if (cb_config->efs_location && cb_config->efs_location > ctx->rom_size) {