summaryrefslogtreecommitdiff
path: root/Vlv2TbltDevicePkg/PlatformSetupDxe
diff options
context:
space:
mode:
Diffstat (limited to 'Vlv2TbltDevicePkg/PlatformSetupDxe')
-rw-r--r--Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf1
-rw-r--r--Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c7
2 files changed, 6 insertions, 2 deletions
diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf b/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf
index 50c9190859..51fd77c797 100644
--- a/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf
+++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf
@@ -89,6 +89,7 @@
BiosIdLib
CpuIA32Lib
IoLib
+ PchPlatformLib
[Guids]
## This GUID C Name is not required for build since it is from UefiLib and not directly used by this module source.
diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c b/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c
index 3c6f8f447c..c7f85b9231 100644
--- a/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c
+++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/SetupInfoRecords.c
@@ -45,6 +45,7 @@ Revision History:
#include "SetupMode.h"
#include "PchCommonDefinitions.h"
#include <PlatformBaseAddresses.h>
+#include <Library/PchPlatformLib.h>
typedef struct {
@@ -1736,10 +1737,12 @@ SetupInfo (void)
EFI_STATUS Status;
UINTN VarSize;
EFI_PEI_HOB_POINTERS GuidHob;
+ UINT32 DxeGpioValue;
if (mSetupInfoDone) {
return;
}
+ DxeGpioValue = DetectGpioPinValue();
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
@@ -1750,8 +1753,8 @@ SetupInfo (void)
&mSystemConfiguration
);
- if (EFI_ERROR (Status) || VarSize != sizeof(SYSTEM_CONFIGURATION)) {
- //The setup variable is corrupted
+ if (EFI_ERROR (Status) || VarSize != sizeof(SYSTEM_CONFIGURATION)|| DxeGpioValue == 0) {
+ //The setup variable is corrupted or detect GPIO_S5_17 Pin is low
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
L"SetupRecovery",