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 <martin@coreboot.org> Change-Id: I51c6dbe700505bc2e32443000ae55cb644051e42 Reviewed-on: https://review.coreboot.org/c/coreboot/+/34303 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
parent
cac0231615
commit
ec933135ce
|
@ -211,7 +211,7 @@ static void usage(void)
|
||||||
printf("-H | --apob-nv-size <HEX_VAL> Size of S3 resume data\n");
|
printf("-H | --apob-nv-size <HEX_VAL> Size of S3 resume data\n");
|
||||||
printf("-y | --pmu-inst <FILE> Add PMU firmware instruction portion\n");
|
printf("-y | --pmu-inst <FILE> Add PMU firmware instruction portion\n");
|
||||||
printf("-G | --pmu-data <FILE> Add PMU firmware data portion\n");
|
printf("-G | --pmu-data <FILE> Add PMU firmware data portion\n");
|
||||||
printf("-u | --ucode <FILE> Add microcode patch\n");
|
printf("-O | --ucode <FILE> Add microcode patch\n");
|
||||||
printf("-X | --mp2-config <FILE> Add MP2 configuration\n");
|
printf("-X | --mp2-config <FILE> Add MP2 configuration\n");
|
||||||
printf("-V | --bios-bin <FILE> Add compressed image; auto source address\n");
|
printf("-V | --bios-bin <FILE> Add compressed image; auto source address\n");
|
||||||
printf("-e | --bios-bin-src <HEX_VAL> Address in flash of source if -V not used\n");
|
printf("-e | --bios-bin-src <HEX_VAL> 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;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if PSP_COMBO
|
||||||
static void *new_combo_dir(context *ctx)
|
static void *new_combo_dir(context *ctx)
|
||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
|
@ -503,6 +504,7 @@ static void *new_combo_dir(context *ctx)
|
||||||
+ MAX_COMBO_ENTRIES * sizeof(psp_combo_entry);
|
+ MAX_COMBO_ENTRIES * sizeof(psp_combo_entry);
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void fill_dir_header(void *directory, uint32_t count, uint32_t cookie)
|
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)
|
uint32_t cookie)
|
||||||
{
|
{
|
||||||
ssize_t bytes;
|
ssize_t bytes;
|
||||||
unsigned int i, j, count;
|
unsigned int i, count;
|
||||||
int level;
|
int level;
|
||||||
|
|
||||||
/* This function can create a primary table, a secondary table, or a
|
/* 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)
|
char *dst_str, char *size_str)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
Loading…
Reference in New Issue