util/amdfwtool: Add option to indicate uncompressed BIOS binary
amdfwtool always assumes that the PSP BIOS binary (type 0x62 BIOS directory entry) is always compressed. On boards using vboot, sometimes PSP BIOS binary is uncompressed - specifically when CBFS verification is enabled and verified boot starts in bootblock. Add an option to indicate PSP BIOS binary is uncompressed. BUG=b:261792282 TEST=Build Skyrim BIOS with x86 verstage and CBFS Verification enabled. Boot to OS. Change-Id: I4d56c0ba451b194043ebb5cdb0f2b27482beef1f Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71210 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
This commit is contained in:
parent
665d870244
commit
bd9dd420d7
|
@ -1844,6 +1844,7 @@ enum {
|
||||||
AMDFW_OPT_BIOSBIN_SOURCE,
|
AMDFW_OPT_BIOSBIN_SOURCE,
|
||||||
AMDFW_OPT_BIOSBIN_DEST,
|
AMDFW_OPT_BIOSBIN_DEST,
|
||||||
AMDFW_OPT_BIOS_UNCOMP_SIZE,
|
AMDFW_OPT_BIOS_UNCOMP_SIZE,
|
||||||
|
AMDFW_OPT_BIOSBIN_UNCOMP,
|
||||||
AMDFW_OPT_UCODE,
|
AMDFW_OPT_UCODE,
|
||||||
AMDFW_OPT_APOB_NVBASE,
|
AMDFW_OPT_APOB_NVBASE,
|
||||||
AMDFW_OPT_APOB_NVSIZE,
|
AMDFW_OPT_APOB_NVSIZE,
|
||||||
|
@ -1899,6 +1900,7 @@ static struct option long_options[] = {
|
||||||
{"bios-bin-src", required_argument, 0, AMDFW_OPT_BIOSBIN_SOURCE },
|
{"bios-bin-src", required_argument, 0, AMDFW_OPT_BIOSBIN_SOURCE },
|
||||||
{"bios-bin-dest", required_argument, 0, AMDFW_OPT_BIOSBIN_DEST },
|
{"bios-bin-dest", required_argument, 0, AMDFW_OPT_BIOSBIN_DEST },
|
||||||
{"bios-uncomp-size", required_argument, 0, AMDFW_OPT_BIOS_UNCOMP_SIZE },
|
{"bios-uncomp-size", required_argument, 0, AMDFW_OPT_BIOS_UNCOMP_SIZE },
|
||||||
|
{"bios-bin-uncomp", no_argument, 0, AMDFW_OPT_BIOSBIN_UNCOMP },
|
||||||
{"bios-sig-size", required_argument, 0, LONGOPT_BIOS_SIG },
|
{"bios-sig-size", required_argument, 0, LONGOPT_BIOS_SIG },
|
||||||
{"ucode", required_argument, 0, AMDFW_OPT_UCODE },
|
{"ucode", required_argument, 0, AMDFW_OPT_UCODE },
|
||||||
{"apob-nv-base", required_argument, 0, AMDFW_OPT_APOB_NVBASE },
|
{"apob-nv-base", required_argument, 0, AMDFW_OPT_APOB_NVBASE },
|
||||||
|
@ -2188,6 +2190,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int optindex = 0;
|
int optindex = 0;
|
||||||
|
int bios_tbl_index = -1;
|
||||||
|
|
||||||
c = getopt_long(argc, argv, optstring, long_options, &optindex);
|
c = getopt_long(argc, argv, optstring, long_options, &optindex);
|
||||||
|
|
||||||
|
@ -2285,6 +2288,11 @@ int main(int argc, char **argv)
|
||||||
register_bios_fw_addr(AMD_BIOS_BIN, 0, 0, optarg);
|
register_bios_fw_addr(AMD_BIOS_BIN, 0, 0, optarg);
|
||||||
sub = instance = 0;
|
sub = instance = 0;
|
||||||
break;
|
break;
|
||||||
|
case AMDFW_OPT_BIOSBIN_UNCOMP:
|
||||||
|
bios_tbl_index = find_bios_entry(AMD_BIOS_BIN);
|
||||||
|
if (bios_tbl_index != -1)
|
||||||
|
amd_bios_table[bios_tbl_index].zlib = 0;
|
||||||
|
break;
|
||||||
case LONGOPT_BIOS_SIG:
|
case LONGOPT_BIOS_SIG:
|
||||||
/* BIOS signature size */
|
/* BIOS signature size */
|
||||||
register_bios_fw_addr(AMD_BIOS_SIG, 0, 0, optarg);
|
register_bios_fw_addr(AMD_BIOS_SIG, 0, 0, optarg);
|
||||||
|
|
Loading…
Reference in New Issue