summaryrefslogtreecommitdiff
path: root/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c
diff options
context:
space:
mode:
Diffstat (limited to 'Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c')
-rw-r--r--Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c b/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c
index 08f5df2a25..90fee6585e 100644
--- a/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c
+++ b/Vlv2TbltDevicePkg/PciPlatform/PciPlatform.c
@@ -39,6 +39,7 @@ Abstract:
#include <Protocol/FirmwareVolume.h>
#include <Library/HobLib.h>
#include <IndustryStandard/Pci22.h>
+#include <Library/PchPlatformLib.h>
extern PCI_OPTION_ROM_TABLE mPciOptionRomTable[];
extern UINTN mSizeOptionRomTable;
@@ -334,6 +335,9 @@ PciPlatformDriverEntry (
{
EFI_STATUS Status;
UINTN VarSize;
+ UINT32 DxeGpioValue;
+
+ DxeGpioValue = DetectGpioPinValue();
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = gRT->GetVariable(
@@ -343,8 +347,8 @@ PciPlatformDriverEntry (
&VarSize,
&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",