From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: zailiang.sun@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Sun, 30 Jun 2019 21:08:29 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 21:08:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="165692888" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga003.jf.intel.com with ESMTP; 30 Jun 2019 21:08:28 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 30 Jun 2019 21:08:28 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 30 Jun 2019 21:08:27 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.134]) with mapi id 14.03.0439.000; Mon, 1 Jul 2019 12:08:25 +0800 From: "Sun, Zailiang" To: "devel@edk2.groups.io" , "Kinney, Michael D" CC: "Qian, Yi" Subject: Re: [edk2-devel] [edk2-platforms Patch 11/14] Vlv2TbltDevicePkg: Update boot mode/state behaviors Thread-Topic: [edk2-devel] [edk2-platforms Patch 11/14] Vlv2TbltDevicePkg: Update boot mode/state behaviors Thread-Index: AQHVL7iibDm0mwghvEyc6yk5OC43CKa1JcuA Date: Mon, 1 Jul 2019 04:08:24 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C90592@SHSMSX104.ccr.corp.intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> <20190701025553.18596-12-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-12-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-By: Zailiang Sun -----Original Message----- From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Mich= ael D Kinney Sent: Monday, July 01, 2019 10:56 AM To: devel@edk2.groups.io Cc: Sun, Zailiang ; Qian, Yi Subject: [edk2-devel] [edk2-platforms Patch 11/14] Vlv2TbltDevicePkg: Upda= te boot mode/state behaviors * Add platform specific PcdBootState PCD to remove Intel Framework dependency * Set PcdUserPhysicalPresence to TRUE to Enable UEFI Secure Boot Setup Menus * Remove unused code when NOCS_S3_SUPPORT is not set * Update PlatformBootManagerLib to not perform a connect all when FastBoot is enabled. * Add support for BOOT_ON_FLASH_UPDATE * Remove logic in CheckSystemConfigSave() that was generating an ASSERT() when setup changes were saved. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney --- .../DxePlatformBootManagerLib/BdsPlatform.c | 33 ++++++- .../DxePlatformBootManagerLib.inf | 4 +- .../PlatformDxe/PlatformDxe.inf | 1 - .../Vlv2TbltDevicePkg/PlatformPei/BootMode.c | 99 +------------------ .= ../Vlv2TbltDevicePkg/PlatformPei/Platform.c | 8 -- .../Vlv2TbltDevicePkg= /PlatformPei/Platform.h | 27 +---- .../Intel/Vlv2TbltDevicePkg/PlatformPkg.dec | 8 ++ .../Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 2 + .../Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 2 + .../Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 2 + .../PlatformSetupDxe/PlatformSetupDxe.inf | 1 - .../PlatformSetupDxe/SetupInfoRecords.c | 51 ---------- 12 files changed, 51 insertions(+), 187 deletions(-) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManag= erLib/BdsPlatform.c b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformB= ootManagerLib/BdsPlatform.c index 4dd3827a6e..7fbbf281c6 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/B= dsPlatform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib +++ /BdsPlatform.c @@ -1,7 +1,7 @@ /** @file This file include all platform action which can be customized by IBV/OE= M. =20 -Copyright (c) 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -1164,7 +1164,7 @@ PlatformBootManagerBeforeConsole ( // Fill ConIn/ConOut in Full Configuration boot mode // gBootMode =3D GetBootModeHob(); - DEBUG ((DEBUG_INFO, "PlatformBootManagerInit - %x\n", gBootMode)); + DEBUG ((DEBUG_INFO, "PlatformBootManagerBeforeConsole: BootMode =3D=20 + %x\n", gBootMode)); =20 if (gBootMode =3D=3D BOOT_WITH_FULL_CONFIGURATION || gBootMode =3D=3D BOOT_WITH_DEFAULT_SETTINGS || @@ -1263,7 +1263,18 = @@ ConnectSequence ( IN EFI_BOOT_MODE BootMode ) { - EfiBootManagerConnectAll (); + switch (BootMode) { + case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES: + case BOOT_WITH_MINIMAL_CONFIGURATION: + case BOOT_ON_S4_RESUME: + break; + case BOOT_WITH_FULL_CONFIGURATION: + case BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS: + case BOOT_WITH_DEFAULT_SETTINGS: + default: + EfiBootManagerConnectAll (); + break; + } } =20 /** @@ -1311,6 +1322,7 @@ PlatformBootManagerAfterConsole ( VOID ) { + EFI_STATUS Status; EFI_BOOT_MODE LocalBootMode; =20 DEBUG ((DEBUG_INFO, "PlatformBootManagerAfterConsole\n")); @@ -1319,7 +1331,7 @@ PlatformBootManagerAfterConsole ( // Get current Boot Mode // LocalBootMode =3D gBootMode; - DEBUG ((DEBUG_INFO, "Current local bootmode - %x\n", LocalBootMode)); + DEBUG ((DEBUG_INFO, "PlatformBootManagerAfterConsole: BootMode =3D=20 + %x\n", gBootMode)); =20 // // Logo show @@ -1372,6 +1384,19 @@ PlatformBootManagerAfterConsole ( break; } =20 + // + // Use a DynamicHii type pcd to save the boot status, which is used=20 + to // control configuration mode, such as FULL/MINIMAL/NO_CHANGES confi= guration. + // + DEBUG ((DEBUG_INFO, "PcdBootState =3D %d\n",=20 + PcdGetBool(PcdBootState))); if (PcdGetBool(PcdBootState)) { + Status =3D PcdSetBoolS(PcdBootState, FALSE); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "Set PcdBootState to FALSE failed.\n")); + } + DEBUG ((DEBUG_INFO, "PcdBootState =3D %d\n",=20 + PcdGetBool(PcdBootState))); } + Print (L"Press F7 for BootMenu!\n"); =20 EfiBootManagerRefreshAllBootOption (); diff --git a/Platform/Intel/Vlv2= TbltDevicePkg/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.i= nf b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/Dxe= PlatformBootManagerLib.inf index b04169ad33..0579a18660 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib/D= xePlatformBootManagerLib.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/Library/DxePlatformBootManagerLib +++ /DxePlatformBootManagerLib.inf @@ -1,7 +1,7 @@ ### @file # Component name for module DxePlatformBootManagerLib # -# Copyright (c)= 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights=20 +reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -48,6 +48,7 @@ [Pack= ages] MdeModulePkg/MdeModulePkg.dec SecurityPkg/SecurityPkg.dec MinPlatformPkg/MinPlatformPkg.dec + Vlv2TbltDevicePkg/PlatformPkg.dec =20 [Pcd] gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable ## CONSU= MES @@ -66,6 +67,7 @@ [Pcd] gMinPlatformPkgTokenSpaceGuid.PcdTrustedConsoleInputDevicePath ## CONS= UMES gMinPlatformPkgTokenSpaceGuid.PcdTrustedConsoleOutputDevicePath ## CONS= UMES gMinPlatformPkgTokenSpaceGuid.PcdTrustedStorageDevicePath ## CONS= UMES + gPlatformModuleTokenSpaceGuid.PcdBootState =20 [Sources] BdsPlatform.c diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf = b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf index a9ef744ef7..9fee691365 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/PlatformDxe.inf @@ -84,7 +84,6 @@ [Guids] gEfiGlobalVariableGuid gEfiEventExitBootServicesGuid gEfiVlv2VariableGuid - gEfiSecureBootEnableDisableGuid gEfiEndOfDxeEventGroupGuid =20 [Protocols] diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/BootMode.c b/Pla= tform/Intel/Vlv2TbltDevicePkg/PlatformPei/BootMode.c index 9fdcb620a3..5269b1ed39 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/BootMode.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/BootMode.c @@ -1,11 +1,9 @@ /** @file =20 - Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights=20 + reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - Module Name: =20 =20 @@ -84,6 +82,7 @@ CapsulePpiNotifyCallback ( if (Status =3D=3D EFI_SUCCESS) { if (Capsule->CheckCapsuleUpdate ((EFI_PEI_SERVICES**)PeiServices) = =3D=3D EFI_SUCCESS) { BootMode =3D BOOT_ON_FLASH_UPDATE; + DEBUG ((EFI_D_ERROR, "Setting BootMode to=20 + BOOT_ON_FLASH_UPDATE\n")); Status =3D (*PeiServices)->SetBootMode((const EFI_PEI_SERVICES **= )PeiServices, BootMode); ASSERT_EFI_ERROR (Status); } @@ -93,98 +92,6 @@ CapsulePpiNotifyCallback ( return Status; } =20 -#ifdef NOCS_S3_SUPPORT -EFI_STATUS -UpdateBootMode ( - IN CONST EFI_PEI_SERVICES **PeiServices - ) -{ - EFI_STATUS Status; - EFI_BOOT_MODE BootMode; - UINT16 SleepType; - CHAR16 *strBootMode; - - Status =3D (*PeiServices)->GetBootMode(PeiServices, &BootMode); - ASSERT_EFI_ERROR (Status); - if (BootMode =3D=3D BOOT_IN_RECOVERY_MODE){ - return Status; - } - - // - // Let's assume things are OK if not told otherwise - // - BootMode =3D BOOT_WITH_FULL_CONFIGURATION; - - if (GetSleepTypeAfterWakeup (PeiServices, &SleepType)) { - switch (SleepType) { - case V_PCH_ACPI_PM1_CNT_S3: - BootMode =3D BOOT_ON_S3_RESUME; - Status =3D (*PeiServices)->NotifyPpi (PeiServices, &mCapsuleNotif= yList[0]); - ASSERT_EFI_ERROR (Status); - break; - - case V_PCH_ACPI_PM1_CNT_S4: - BootMode =3D BOOT_ON_S4_RESUME; - break; - - case V_PCH_ACPI_PM1_CNT_S5: - BootMode =3D BOOT_ON_S5_RESUME; - break; - } // switch (SleepType) - } - - if (IsFastBootEnabled (PeiServices)) { - DEBUG ((EFI_D_INFO, "Prioritizing Boot mode to BOOT_WITH_MINIMAL_CONF= IGURATION\n")); - PrioritizeBootMode (&BootMode, BOOT_WITH_MINIMAL_CONFIGURATION); - } - - switch (BootMode) { - case BOOT_WITH_FULL_CONFIGURATION: - strBootMode =3D L"BOOT_WITH_FULL_CONFIGURATION"; - break; - case BOOT_WITH_MINIMAL_CONFIGURATION: - strBootMode =3D L"BOOT_WITH_MINIMAL_CONFIGURATION"; - break; - case BOOT_ASSUMING_NO_CONFIGURATION_CHANGES: - strBootMode =3D L"BOOT_ASSUMING_NO_CONFIGURATION_CHANGES"; - break; - case BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS: - strBootMode =3D L"BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS"; - break; - case BOOT_WITH_DEFAULT_SETTINGS: - strBootMode =3D L"BOOT_WITH_DEFAULT_SETTINGS"; - break; - case BOOT_ON_S4_RESUME: - strBootMode =3D L"BOOT_ON_S4_RESUME"; - break; - case BOOT_ON_S5_RESUME: - strBootMode =3D L"BOOT_ON_S5_RESUME"; - break; - case BOOT_ON_S2_RESUME: - strBootMode =3D L"BOOT_ON_S2_RESUME"; - break; - case BOOT_ON_S3_RESUME: - strBootMode =3D L"BOOT_ON_S3_RESUME"; - - break; - case BOOT_ON_FLASH_UPDATE: - strBootMode =3D L"BOOT_ON_FLASH_UPDATE"; - break; - case BOOT_IN_RECOVERY_MODE: - strBootMode =3D L"BOOT_IN_RECOVERY_MODE"; - break; - default: - strBootMode =3D L"Unknown boot mode"; - } // switch (BootMode) - - DEBUG ((EFI_D_ERROR, "Setting BootMode to %s\n", strBootMode)); - Status =3D (*PeiServices)->SetBootMode(PeiServices, BootMode); - ASSERT_EFI_ERROR (Status); - - return Status; -} -#endif - /** Get sleep type after wakeup =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c b/Pla= tform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c index aa03f6ea95..90998871dc 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.c @@ -813,14 +813,6 @@ PeiInitPlatform ( sizeof (EFI_PLATFORM_INFO_HOB) ); =20 - // - // Set the new boot mode for MRC - // -#ifdef NOCS_S3_SUPPORT - Status =3D UpdateBootMode (PeiServices); - ASSERT_EFI_ERROR (Status); -#endif - DEBUG((EFI_D_INFO, "Setup MMIO size ... \n\n")); =20 // diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.h b/Pla= tform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.h index e1817b28c6..4f71e519e0 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.h +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPei/Platform.h @@ -1,12 +1,9 @@ /*++ =20 - Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
- = =20 + Copyright (c) 2004 - 2019, Intel Corporation. All rights=20 + reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent =20 - = =20 - - **/ =20 =20 @@ -24,26 +21,6 @@ typedef struct { =20 #define STALL_PEIM_FROM_THIS(a) CR (a, STALL_CALLBACK_STATE_INFORMATION, = StallNotify, STALL_PEIM_SIGNATURE) =20 -#ifdef NOCS_S3_SUPPORT - -/** - Peform the boot mode determination logic - If the box is closed, then - 1. If it's first time to boot, it's boot with full config . - 2. If the ChassisIntrution is selected, force to be a boot with full co= nfig - 3. Otherwise it's boot with no change. - - @param PeiServices General purpose services available to every PEIM. - @param BootMode The detected boot mode. - - @retval EFI_SUCCESS if the boot mode could be set -**/ -EFI_STATUS -Upd= ateBootMode ( - IN CONST EFI_PEI_SERVICES **PeiServices - ); -#endif - /** This function reset the entire platform, including all processor and de= vices, and reboots the system. diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec b/Platform/I= ntel/Vlv2TbltDevicePkg/PlatformPkg.dec index 5b255f4b05..a5c7062cbb 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkg.dec @@ -161,6 +161,14 @@ [PcdsDynamic,PcdsDynamicEx] gPlatformModuleTokenSpaceGuid.PcdInConfigMode|FALSE|BOOLEAN|0x80000001 gPlatformModuleTokenSpaceGuid.PcdConnectUSBKeyboardonWaitForKeyStroke|F= ALSE|BOOLEAN|0x80000002 gPlatformModuleTokenSpaceGuid.PcdEnableWatchdogSwSmiInputValue|0|UINT8|= 0x80000003 + + ## Indicates if the machine has completed one boot cycle before. + # After the complete boot, BootState will be set to FALSE.

+ # TRUE - The complete boot cycle has not happened before.
+ # FALSE - The complete boot cycle has happened before.
+ # @Prompt Boot State Flag + gPlatformModuleTokenSpaceGuid.PcdBootState|TRUE|BOOLEAN|0x80000004 + # #device firmware update support # diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc b/Plat= form/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc index e4c6750c70..2123745ccd 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc @@ -680,6 +680,7 @@ [PcdsPatchableInModule.common] [PcdsDynamicHii.common= .DEFAULT] gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVa= riableGuid|0x0|5 # Variable: L"Timeout" gEfiMdePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|L"HwErrRecSupport"= |gEfiGlobalVariableGuid|0x0|1 # Variable: L"HwErrRecSupport" + + gPlatformModuleTokenSpaceGuid.PcdBootState|L"BootState"|gPlatformModul + eTokenSpaceGuid|0x0|TRUE =20 [PcdsDynamicDefault.common.DEFAULT] gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr|0x0 @@ -733,6 +734,7 @@ [PcdsDynamicExDefault.common.DEFAULT] gEfiVLVTokenSpaceGuid.PcdCpuLockBoxDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 + gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE =20 [PcdsDynamicExDefault.X64.DEFAULT] !if $(RECOVERY_ENABLE) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc b/Platfo= rm/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc index f5795e5ab0..086668d570 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc @@ -677,6 +677,7 @@ [PcdsPatchableInModule.common] [PcdsDynamicHii.common= .DEFAULT] gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVa= riableGuid|0x0|5 # Variable: L"Timeout" gEfiMdePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|L"HwErrRecSupport"= |gEfiGlobalVariableGuid|0x0|1 # Variable: L"HwErrRecSupport" + + gPlatformModuleTokenSpaceGuid.PcdBootState|L"BootState"|gPlatformModul + eTokenSpaceGuid|0x0|TRUE =20 [PcdsDynamicDefault.common.DEFAULT] gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr|0x0 @@ -730,6 +731,7 @@ [PcdsDynamicExDefault.common.DEFAULT] gEfiVLVTokenSpaceGuid.PcdCpuLockBoxDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 + gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE =20 [PcdsDynamicExDefault.X64.DEFAULT] !if $(RECOVERY_ENABLE) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc b/Platfor= m/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc index a930a85a35..5f2dd65ec8 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc @@ -679,6 +679,7 @@ [PcdsPatchableInModule.common] [PcdsDynamicHii.common= .DEFAULT] gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVa= riableGuid|0x0|5 # Variable: L"Timeout" gEfiMdePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|L"HwErrRecSupport"= |gEfiGlobalVariableGuid|0x0|1 # Variable: L"HwErrRecSupport" + + gPlatformModuleTokenSpaceGuid.PcdBootState|L"BootState"|gPlatformModul + eTokenSpaceGuid|0x0|TRUE =20 [PcdsDynamicDefault.common.DEFAULT] gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateDataPtr|0x0 @@ -732,6 +733,7 @@ [PcdsDynamicExDefault.common.DEFAULT] gEfiVLVTokenSpaceGuid.PcdCpuLockBoxDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuSmramCpuDataAddress|0 gEfiVLVTokenSpaceGuid.PcdCpuLockBoxSize|0 + gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|TRUE =20 [PcdsDynamicExDefault.X64.DEFAULT] !if $(RECOVERY_ENABLE) diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSet= upDxe.inf b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetup= Dxe.inf index b745574421..85e8b1e8d6 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.i= nf +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe +++ .inf @@ -93,7 +93,6 @@ [Guids] gEfiIfrTianoGuid ## CONSUMES ## Guid gEfiPlatformInfoGuid gEfiNormalSetupGuid - gEfiSecureBootEnableDisableGuid gOsSelectionVariableGuid gEfiGlobalVariableGuid =20 diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRe= cords.c b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecord= s.c index efd4a723e1..be99356d0f 100644 --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords +++ .c @@ -1448,60 +1448,9 @@ CheckSystemConfigLoad(SYSTEM_CONFIGURATION *SystemC= onfigPtr) } } =20 - -// -// "SecureBootEnable" variable for the Secure boot feature enable/disable= . -// -#define EFI_SECURE_BOOT_ENABLE_NAME L"SecureBootEnable" -extern EFI_GUID gEfiSecureBootEnableDisableGuid; - - VOID CheckSystemConfigSave(SYSTEM_CONFIGURATION *SystemConfigPtr) { - EFI_STATUS Status; - UINT8 SecureBootCfg; - BOOLEAN SecureBootNotFound; - UINTN DataSize; - - - // - // Secure Boot configuration changes - // - DataSize =3D sizeof(SecureBootCfg); - SecureBootNotFound =3D FALSE; - Status =3D gRT->GetVariable ( - EFI_SECURE_BOOT_ENABLE_NAME, - &gEfiSecureBootEnableDisableGuid, - NULL, - &DataSize, - &SecureBootCfg - ); - - if (EFI_ERROR(Status)) { - SecureBootNotFound =3D TRUE; - } - if (SecureBootNotFound) { - Status =3D gRT->GetVariable ( - EFI_SECURE_BOOT_ENABLE_NAME, - &gEfiSecureBootEnableDisableGuid, - NULL, - &DataSize, - &SecureBootCfg - ); - ASSERT_EFI_ERROR(Status); - } - if ((SecureBootCfg) !=3D SystemConfigPtr->SecureBoot) { - SecureBootCfg =3D !SecureBootCfg; - Status =3D gRT->SetVariable ( - EFI_SECURE_BOOT_ENABLE_NAME, - &gEfiSecureBootEnableDisableGuid, - EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVIC= E_ACCESS, - sizeof (UINT8), - &SecureBootCfg - ); - } - } =20 VOID -- 2.21.0.windows.1