summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Roth <martinroth@chromium.org>2020-09-01 09:36:59 -0600
committerAaron Durbin <adurbin@chromium.org>2020-09-03 16:30:14 +0000
commitb1f648fc5c27b78edce01d1bf90a2971451acce7 (patch)
tree65c5c5de02f4fd29efde75f6a22acc5197491332
parenteca423b44f23a801cb741c27c6700b42d7e8d528 (diff)
util/amdfwtool: Add PSP verstage signature entry
Add the field for the PSP verstage signature entry. This adds the public key signing token to the PSP Directory table to verify the signed PSP verstage binary BUG=b:166100797 TEST=Build in a file and verify that it's present with the correct ID. BRANCH=Zork Signed-off-by: Martin Roth <martinroth@chromium.org> Change-Id: I7525045d8746b6857979d07b02758ab4d4835026 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44987 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Eric Peers <epeers@google.com>
-rw-r--r--util/amdfwtool/amdfwtool.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c
index 299ed0cd97..f385068496 100644
--- a/util/amdfwtool/amdfwtool.c
+++ b/util/amdfwtool/amdfwtool.c
@@ -308,6 +308,7 @@ typedef enum _amd_fw_type {
AMD_FW_PSP_WHITELIST = 0x3a,
AMD_FW_L2_PTR = 0x40,
AMD_FW_PSP_VERSTAGE = 0x52,
+ AMD_FW_VERSTAGE_SIG = 0x53,
AMD_FW_IMC,
AMD_FW_GEC,
AMD_FW_XHCI,
@@ -364,6 +365,7 @@ static amd_fw_entry amd_psp_fw_table[] = {
{ .type = AMD_FW_PSP_SMU_FIRMWARE2, .subprog = 1, .level = PSP_BOTH },
{ .type = AMD_FW_PSP_WHITELIST, .level = PSP_LVL2 },
{ .type = AMD_FW_PSP_VERSTAGE, .level = PSP_BOTH },
+ { .type = AMD_FW_VERSTAGE_SIG, .level = PSP_BOTH },
{ .type = AMD_FW_INVALID },
};
@@ -1085,8 +1087,8 @@ enum {
LONGOPT_SPI_MICRON_FLAG = 258,
};
-// Unused values: DE
-static const char *optstring = "x:i:g:AMS:p:b:s:r:k:c:n:d:t:u:w:m:T:z:J:B:K:L:Y:N:UW:I:a:Q:V:e:v:j:y:G:O:X:F:H:o:f:l:hZ:qR:P:C:";
+// Unused values: D
+static const char *optstring = "x:i:g:AMS:p:b:s:r:k:c:n:d:t:u:w:m:T:z:J:B:K:L:Y:N:UW:I:a:Q:V:e:v:j:y:G:O:X:F:H:o:f:l:hZ:qR:P:C:E:";
static struct option long_options[] = {
{"xhci", required_argument, 0, 'x' },
@@ -1119,6 +1121,7 @@ static struct option long_options[] = {
{"token-unlock", no_argument, 0, 'U' },
{"whitelist", required_argument, 0, 'W' },
{"verstage", required_argument, 0, 'Z' },
+ {"verstage_sig", required_argument, 0, 'E' },
/* BIOS Directory Table items */
{"instance", required_argument, 0, 'I' },
{"apcb", required_argument, 0, 'a' },
@@ -1536,6 +1539,10 @@ int main(int argc, char **argv)
register_fw_filename(AMD_FW_PSP_VERSTAGE, sub, optarg);
sub = instance = 0;
break;
+ case 'E':
+ register_fw_filename(AMD_FW_VERSTAGE_SIG, sub, optarg);
+ sub = instance = 0;
+ break;
case 'C':
soc_id = identify_platform(optarg);
if (soc_id == PLATFORM_UNKNOWN) {