From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=david.wei@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CA4EA21A143EF for ; Sat, 29 Sep 2018 00:17:46 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Sep 2018 00:17:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,318,1534834800"; d="scan'208";a="77346770" Received: from zwei4-mobl1.ccr.corp.intel.com ([10.239.193.114]) by orsmga008.jf.intel.com with ESMTP; 29 Sep 2018 00:17:44 -0700 From: zwei4 To: edk2-devel@lists.01.org Cc: David Wei , Mike Wu , Mang Guo , Steele Kelly Date: Sat, 29 Sep 2018 15:17:39 +0800 Message-Id: <20180929071739.2940-1-david.wei@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 Subject: [Patch][edk2-platforms/devel-IntelAtomProcessorE3900] Cleanup Setup Option X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2018 07:17:47 -0000 Remove SecureBoot setup option. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: David Wei CC: Mike Wu CC: Mang Guo CC: Steele Kelly --- .../Smbios/SmBiosMiscDxe/MiscOemType0x94Function.c | 11 +++++- .../Smbios/SmBiosMiscDxe/SmBiosMiscDxe.inf | 1 + .../Common/Include/Guid/SetupVariable.h | 2 +- .../PeiPlatformConfigUpdateLib.c | 3 +- .../PlatformSettings/PlatformSetupDxe/Boot.vfi | 7 ---- .../PlatformSetupDxe/PlatformSetupDxe.c | 1 - .../PlatformSetupDxe/SetupInfoRecords.c | 45 ---------------------- 7 files changed, 13 insertions(+), 57 deletions(-) diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscOemType0x94Function.c b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscOemType0x94Function.c index b399a5f81b..e96e3fb5a0 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscOemType0x94Function.c +++ b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/MiscOemType0x94Function.c @@ -548,6 +548,7 @@ UpdatePlatformInformation ( MRC_PARAMS_SAVE_RESTORE *MemInfoHob = NULL; UINT32 MrcVersion; UINTN Index; + UINT8 SecureBoot; DEBUG ((EFI_D_INFO, "Executing SMBIOS T0x94 Update.\n")); // @@ -666,10 +667,18 @@ UpdatePlatformInformation ( ); ASSERT_EFI_ERROR (Status); + DataSize = sizeof (SecureBoot); + Status = gRT->GetVariable ( + EFI_SECURE_BOOT_MODE_NAME, + &gEfiGlobalVariableGuid, + NULL, + &DataSize, + &SecureBoot + ); // // Secure boot // - Data8 = SystemConfiguration.SecureBoot; + Data8 = SecureBoot; UnicodeSPrint (Buffer, sizeof(Buffer), L"%x", Data8); HiiSetString (mHiiHandle, STRING_TOKEN (STR_MISC_SECURE_BOOT_VALUE), Buffer, NULL); diff --git a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/SmBiosMiscDxe.inf b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/SmBiosMiscDxe.inf index 31fd8406b2..6de2d68b57 100644 --- a/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/SmBiosMiscDxe.inf +++ b/Platform/BroxtonPlatformPkg/Common/Features/Smbios/SmBiosMiscDxe/SmBiosMiscDxe.inf @@ -120,6 +120,7 @@ gIFWIVersionHobGuid gEfiPlatformInfoGuid gFspNonVolatileStorageHobGuid ##CONSUMES + gEfiGlobalVariableGuid [Protocols] gEfiSmbiosProtocolGuid # PROTOCOL ALWAYS_CONSUMED diff --git a/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h b/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h index 4f5eeb1c0f..19b948c0ea 100644 --- a/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h +++ b/Platform/BroxtonPlatformPkg/Common/Include/Guid/SetupVariable.h @@ -474,7 +474,7 @@ typedef struct { UINT8 CapOrVoltFlag; UINT8 BootOnInvalidBatt; UINT8 ScramblerSupport; - UINT8 SecureBoot; + UINT8 SecureBootReserved; UINT8 SecureBootCustomMode; UINT8 MaxPkgCState; UINT8 PanelScaling; diff --git a/Platform/BroxtonPlatformPkg/Common/Library/PeiPlatformConfigUpdateLib/PeiPlatformConfigUpdateLib.c b/Platform/BroxtonPlatformPkg/Common/Library/PeiPlatformConfigUpdateLib/PeiPlatformConfigUpdateLib.c index f56097f3a7..a003b278b4 100644 --- a/Platform/BroxtonPlatformPkg/Common/Library/PeiPlatformConfigUpdateLib/PeiPlatformConfigUpdateLib.c +++ b/Platform/BroxtonPlatformPkg/Common/Library/PeiPlatformConfigUpdateLib/PeiPlatformConfigUpdateLib.c @@ -181,10 +181,9 @@ UpdateSetupDataValues ( } if (FdoEnabledGuidHob != NULL) { - PreDefaultSetupData->SecureBoot = FALSE; PreDefaultSetupData->FprrEnable = FALSE; PreDefaultSetupData->ScBiosLock = FALSE; - DEBUG ((EFI_D_INFO, "SPI FDO mode is enabled. Disabling SecureBoot, FprrEnable, and ScBiosLock.\n")); + DEBUG ((EFI_D_INFO, "SPI FDO mode is enabled. Disabling FprrEnable, and ScBiosLock.\n")); } Status = GetSecureNfcInfo (PreDefaultSetupData); diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/Boot.vfi b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/Boot.vfi index 6b6f262efd..c04d8d6a2a 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/Boot.vfi +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/Boot.vfi @@ -44,13 +44,6 @@ form formid = BOOT_CONFIGURATION_FORM_ID, endoneof; endif; // suppressif - oneof varid = Setup.SecureBoot, - prompt = STRING_TOKEN(STR_SECURITY_BOOT_PROMPT), - help = STRING_TOKEN(STR_SECURITY_BOOT_HELP), - option text = STRING_TOKEN(STR_DISABLE), value=0, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED; - option text = STRING_TOKEN(STR_ENABLE), value=1, flags=0 | RESET_REQUIRED; - endoneof; - oneof varid = Setup.QuietBoot, prompt = STRING_TOKEN(STR_QUIETBOOT_PROMPT), help = STRING_TOKEN(STR_QUIETBOOT_HELP), diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c index b235306722..15d3a91fc0 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c @@ -107,7 +107,6 @@ LoadOsDefaultValues ( ) { Private->FakeNvData.GOPEnable = TRUE; - Private->FakeNvData.SecureBoot = FALSE; Private->FakeNvData.Cg8254 = FALSE; Private->FakeNvData.LpssI2C7Enabled = 1; Private->FakeNvData.LpssSpi1Enabled = 1; diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c index 458131c559..4e921c2eaa 100644 --- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c +++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/SetupInfoRecords.c @@ -1723,23 +1723,6 @@ CheckSystemConfigLoad ( EFI_STATUS Status; SEC_OPERATION_PROTOCOL *SeCOp; SEC_INFOMATION SeCInfo; - UINT8 SecureBoot; - UINTN DataSize; - - DataSize = sizeof (SecureBoot); - Status = gRT->GetVariable ( - EFI_SECURE_BOOT_MODE_NAME, - &gEfiGlobalVariableGuid, - NULL, - &DataSize, - &SecureBoot - ); - - if (EFI_ERROR (Status)) { - SystemConfigPtr->SecureBoot = 0; - } else { - SystemConfigPtr->SecureBoot = SecureBoot; - } Status = gBS->LocateProtocol ( &gEfiSeCOperationProtocolGuid, @@ -1806,8 +1789,6 @@ CheckSystemConfigSave ( EFI_STATUS Status; SEC_OPERATION_PROTOCOL *SeCOp; SEC_INFOMATION SeCInfo; - UINT8 SecureBootCfg; - UINTN DataSize; Status = gBS->LocateProtocol ( &gEfiSeCOperationProtocolGuid, @@ -1826,32 +1807,6 @@ CheckSystemConfigSave ( Status = SeCOp->SetPlatformSeCInfo (&SeCInfo); - // - // Secure Boot configuration changes - // - DataSize = sizeof (SecureBootCfg); - Status = gRT->GetVariable ( - EFI_SECURE_BOOT_ENABLE_NAME, - &gEfiSecureBootEnableDisableGuid, - NULL, - &DataSize, - &SecureBootCfg - ); - - if (EFI_ERROR (Status)) { - SecureBootCfg = 0; - } - - if ((SecureBootCfg) != SystemConfigPtr->SecureBoot) { - SecureBootCfg = !SecureBootCfg; - Status = gRT->SetVariable ( - EFI_SECURE_BOOT_ENABLE_NAME, - &gEfiSecureBootEnableDisableGuid, - EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS, - sizeof (UINT8), - &SecureBootCfg - ); - } CheckTPMActivePcrBanks (SystemConfigPtr->TPMSupportedBanks); // -- 2.14.1.windows.1