From ec933135ceb8cadb64e902b542a00bbc62557a77 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sat, 13 Jul 2019 20:03:34 -0600 Subject: util/amdfwtool: Do misc cleanup - Correct command line argument for microcode patches from -u to -O - Add #if PSP_COMBO around new_combo_dir() as it's only called when that's enabled. - Remove unused variable in integrate_bios_firmwares() - Correct enum type from amd_fw_type to amd_bios_type in register_fw_addr() Signed-off-by: Martin Roth Change-Id: I51c6dbe700505bc2e32443000ae55cb644051e42 Reviewed-on: https://review.coreboot.org/c/coreboot/+/34303 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson --- util/amdfwtool/amdfwtool.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index e8ac0b1ae95c..b1d3d2ec790b 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -211,7 +211,7 @@ static void usage(void) printf("-H | --apob-nv-size Size of S3 resume data\n"); printf("-y | --pmu-inst Add PMU firmware instruction portion\n"); printf("-G | --pmu-data Add PMU firmware data portion\n"); - printf("-u | --ucode Add microcode patch\n"); + printf("-O | --ucode Add microcode patch\n"); printf("-X | --mp2-config Add MP2 configuration\n"); printf("-V | --bios-bin Add compressed image; auto source address\n"); printf("-e | --bios-bin-src Address in flash of source if -V not used\n"); @@ -493,6 +493,7 @@ static void *new_psp_dir(context *ctx, int multi) return ptr; } +#if PSP_COMBO static void *new_combo_dir(context *ctx) { void *ptr; @@ -503,6 +504,7 @@ static void *new_combo_dir(context *ctx) + MAX_COMBO_ENTRIES * sizeof(psp_combo_entry); return ptr; } +#endif static void fill_dir_header(void *directory, uint32_t count, uint32_t cookie) { @@ -800,7 +802,7 @@ static void integrate_bios_firmwares(context *ctx, uint32_t cookie) { ssize_t bytes; - unsigned int i, j, count; + unsigned int i, count; int level; /* This function can create a primary table, a secondary table, or a @@ -1090,7 +1092,7 @@ static void register_bdt_data(amd_bios_type type, int sub, int ins, char name[]) } } -static void register_fw_addr(amd_fw_type type, char *src_str, +static void register_fw_addr(amd_bios_type type, char *src_str, char *dst_str, char *size_str) { int i; -- cgit v1.2.3