diff options
Diffstat (limited to 'util/amdfwtool/amdfwtool.c')
-rw-r--r-- | util/amdfwtool/amdfwtool.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index cd2922359d..b946a1bf54 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -2496,18 +2496,8 @@ int main(int argc, char **argv) } memset(ctx.rom, 0xFF, ctx.rom_size); - if (efs_location) { - if (efs_location != body_location) { - romsig_offset = efs_location; - set_current_pointer(&ctx, body_location); - } else { - romsig_offset = efs_location; - set_current_pointer(&ctx, romsig_offset + sizeof(embedded_firmware)); - } - } else { - romsig_offset = AMD_ROMSIG_OFFSET; - set_current_pointer(&ctx, romsig_offset + sizeof(embedded_firmware)); - } + romsig_offset = efs_location ? efs_location : AMD_ROMSIG_OFFSET; + set_current_pointer(&ctx, romsig_offset); amd_romsig = BUFF_OFFSET(ctx, romsig_offset); amd_romsig->signature = EMBEDDED_FW_SIGNATURE; @@ -2539,6 +2529,11 @@ int main(int argc, char **argv) else printf("\n"); + if (efs_location != body_location) + set_current_pointer(&ctx, body_location); + else + set_current_pointer(&ctx, romsig_offset + sizeof(embedded_firmware)); + integrate_firmwares(&ctx, amd_romsig, amd_fw_table); adjust_current_pointer(&ctx, 0, 0x10000U); /* TODO: is it necessary? */ |