From 01b7ddff24ef751a5fdca057d5d31eae97b5640b Mon Sep 17 00:00:00 2001 From: Mike Baiocchi Date: Thu, 20 Feb 2020 07:44:46 -0600 Subject: [PATCH] Enable Key Clear Requests for FSP Systems This commit updates the FSP build configuration file to enable Key Clear Requests. It also moves the 2-byte location of the Key Clear Request information in HDAT. It also fixes a compile bug in its parent commit. Change-Id: Ibe9689ab61f785651b652f41be615b37711af826 RTC:249172 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/92031 Tested-by: Jenkins Server Reviewed-by: Nicholas E Bofferding Reviewed-by: Christopher J Engel Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Ilya Smirnov Reviewed-by: William G Hoffa --- src/build/configs/fsprelease.config | 3 +-- src/usr/runtime/hdatstructs.H | 3 +-- src/usr/runtime/populate_hbruntime.C | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/build/configs/fsprelease.config b/src/build/configs/fsprelease.config index a8b07585e32..4dd0841a06c 100644 --- a/src/build/configs/fsprelease.config +++ b/src/build/configs/fsprelease.config @@ -23,6 +23,5 @@ unset IPLTIME_CHECKSTOP_ANALYSIS # Set Physical Presence and Key Clear Support set PHYS_PRES_PWR_BUTTON -# @TODO RTC 249172 - set Key Clear when external dependencies are met -unset KEY_CLEAR +set KEY_CLEAR diff --git a/src/usr/runtime/hdatstructs.H b/src/usr/runtime/hdatstructs.H index 738d6206b68..4b8f3792382 100644 --- a/src/usr/runtime/hdatstructs.H +++ b/src/usr/runtime/hdatstructs.H @@ -277,7 +277,7 @@ struct hdatSysParms_t uint32_t hdatNestFreq; // Nest Clock Frequency in MHz uint8_t hdatSplitCoreMode; // Split Core Mode uint8_t hdatReserved4; // Reserved - uint16_t hdatReserved5; // Reserved + uint16_t hdatKeyClearRequest; // Host FW key clear requests uint8_t hdatSystemVendorName[64]; // System Vendor Name uint16_t hdatSysSecuritySetting; // System Security Settings uint16_t hdatTpmConfBits; // TPM Configuration Bits @@ -286,7 +286,6 @@ struct hdatSysParms_t uint8_t hdatHwKeyHashValue[64]; // Hardware Keys Hash Value char hdatSystemFamily[64]; // System Family/Vendor Name char hdatSystemType[64]; // System Type/Vendor Type - uint16_t hdatKeyClearRequest; // Host FW key clear requests } __attribute__ ((packed)); diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C index 2fe42dda86e..57c1334661d 100644 --- a/src/usr/runtime/populate_hbruntime.C +++ b/src/usr/runtime/populate_hbruntime.C @@ -1966,7 +1966,8 @@ errlHndl_t populate_hbSecurebootData ( void ) (key_clear_request & KEY_CLEAR_REQUEST_MFG)) { auto temp_key_clear_request = - (key_clear_request & ~KEY_CLEAR_REQUEST_MFG); + static_cast( + key_clear_request & ~KEY_CLEAR_REQUEST_MFG); TRACFCOMP(g_trac_runtime, INFO_MRK"populate_hbSecurebootData: " "Physical Presence asserted on production driver with "