diff options
author | timhe <timhe@timhe> | 2015-12-04 08:00:53 +0000 |
---|---|---|
committer | zwei4 <david.wei@intel.com> | 2016-04-11 17:03:24 +0800 |
commit | d3ce92cab255985b4f395c80592b26320d0f24ac (patch) | |
tree | ce15f6a054cab38c323f5566ba9d4e3e0607b516 /Vlv2TbltDevicePkg/PlatformInitPei/BootMode.c | |
parent | 04f666f34e0ada0a67d18a6eeb90bb6fd3f11d59 (diff) | |
download | edk2-platforms-d3ce92cab255985b4f395c80592b26320d0f24ac.tar.xz |
Vlv2TbltDevicePkg/Vlv2DeviceRefCodePkg:
Reset BIOS Setup when the jumper is
present on Turbot board.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shifei Lu <shifeix.a.lu@intel.com>
Reviewed-by: Tim He <tim.he@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2014.SP1@19122 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Vlv2TbltDevicePkg/PlatformInitPei/BootMode.c')
-rw-r--r-- | Vlv2TbltDevicePkg/PlatformInitPei/BootMode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Vlv2TbltDevicePkg/PlatformInitPei/BootMode.c b/Vlv2TbltDevicePkg/PlatformInitPei/BootMode.c index 3b94e3b54f..d0e9f3d772 100644 --- a/Vlv2TbltDevicePkg/PlatformInitPei/BootMode.c +++ b/Vlv2TbltDevicePkg/PlatformInitPei/BootMode.c @@ -148,6 +148,7 @@ UpdateBootMode ( volatile UINT32 GpioValue;
BOOLEAN IsFirstBoot;
UINT32 Data32;
+ UINT32 PeiGpioValue;
Status = (*PeiServices)->GetBootMode(
PeiServices,
@@ -168,6 +169,7 @@ UpdateBootMode ( // When this boot is WDT reset, the system needs booting with CrashDump function eanbled.
//
Data32 = IoRead32 (ACPI_BASE_ADDRESS + R_PCH_TCO_STS);
+ PeiGpioValue = DetectGpioPinValue();
//
// Check Power Button, click the power button, the system will boot in fast boot mode,
@@ -202,8 +204,8 @@ UpdateBootMode ( &VarSize,
&SystemConfiguration
);
- if (EFI_ERROR (Status) || VarSize != sizeof(SYSTEM_CONFIGURATION)) {
- //The setup variable is corrupted
+ if (EFI_ERROR (Status) || VarSize != sizeof(SYSTEM_CONFIGURATION) || PeiGpioValue == 0) {
+ //The setup variable is corrupted or detect GPIO_S5_17 Pin is low
VarSize = sizeof(SYSTEM_CONFIGURATION);
Status = Variable->GetVariable(
Variable,
|