diff options
author | Lu ShifeiX A <shifeix.a.lu@intel.com> | 2015-07-27 03:14:33 +0000 |
---|---|---|
committer | timhe <timhe@Edk2> | 2015-07-27 03:14:33 +0000 |
commit | 20b86c29ba4366fae496cb83ae39664d100ab9f6 (patch) | |
tree | 569180c7b8efceb147231db449502906dfa1520a | |
parent | d3e676084fe45b273d60db2bcdeca90e81ea273b (diff) | |
download | edk2-20b86c29ba4366fae496cb83ae39664d100ab9f6.tar.gz |
Fixed OS software shutdown when reporting actual processor temperature
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Lu ShifeiX A <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@18072 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | Vlv2TbltDevicePkg/PlatformDxe/Platform.c | 37 | ||||
-rw-r--r-- | Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi | 21 | ||||
-rw-r--r-- | Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni | bin | 214412 -> 214668 bytes |
3 files changed, 56 insertions, 2 deletions
diff --git a/Vlv2TbltDevicePkg/PlatformDxe/Platform.c b/Vlv2TbltDevicePkg/PlatformDxe/Platform.c index d278694146..645b865cdd 100644 --- a/Vlv2TbltDevicePkg/PlatformDxe/Platform.c +++ b/Vlv2TbltDevicePkg/PlatformDxe/Platform.c @@ -564,6 +564,32 @@ InitPciDevPME ( }
}
+VOID
+EFIAPI
+InitThermalZone (
+ EFI_EVENT Event,
+ VOID *Context
+ )
+{
+ UINTN VarSize;
+ EFI_STATUS Status;
+ EFI_GLOBAL_NVS_AREA_PROTOCOL *GlobalNvsArea;
+ VarSize = sizeof(SYSTEM_CONFIGURATION);
+ Status = gRT->GetVariable(
+ NORMAL_SETUP_NAME,
+ &gEfiNormalSetupGuid,
+ NULL,
+ &VarSize,
+ &mSystemConfiguration
+ );
+ Status = gBS->LocateProtocol (
+ &gEfiGlobalNvsAreaProtocolGuid,
+ NULL,
+ (void **)&GlobalNvsArea
+ );
+ GlobalNvsArea->Area->CriticalThermalTripPoint = mSystemConfiguration.CriticalThermalTripPoint;
+ GlobalNvsArea->Area->PassiveThermalTripPoint = mSystemConfiguration.PassiveThermalTripPoint;
+}
#if defined SUPPORT_LVDS_DISPLAY && SUPPORT_LVDS_DISPLAY
#endif
@@ -818,7 +844,16 @@ InitializePlatform ( &mReadyToBootEvent
);
}
-
+ //
+ // Create a ReadyToBoot Event to run the thermalzone init process
+ //
+ Status = EfiCreateEventReadyToBootEx (
+ TPL_CALLBACK,
+ InitThermalZone,
+ NULL,
+ &mReadyToBootEvent
+ );
+
ReportStatusCodeEx (
EFI_PROGRESS_CODE,
EFI_COMPUTING_UNIT_CHIPSET | EFI_CU_PLATFORM_DXE_STEP1,
diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi b/Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi index 13786fcb41..8115eb9699 100644 --- a/Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/Thermal.vfi @@ -33,7 +33,26 @@ form formid = THERMAL_FORM_ID, title = STRING_TOKEN(STR_THERMAL_TITLE);
subtitle text = STRING_TOKEN(STR_THERMAL_CONFIGURATION);
-
+ oneof varid = Setup.CriticalThermalTripPoint,
+ prompt = STRING_TOKEN(STR_ACPI_CRITICAL_THERMAL_TRIP_POINT),
+ help = STRING_TOKEN(STR_ACPI_CRITICAL_THERMAL_TRIP_POINT_HELP),
+ option text = STRING_TOKEN (STR_85_C), value = 85, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_87_C), value = 87, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_90_C), value = 90, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_105_C), value = 105, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_110_C), value = 110, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_200_C), value = 200, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ endoneof;
+ oneof varid = Setup.PassiveThermalTripPoint,
+ prompt = STRING_TOKEN (STR_ACPI_PASSIVE_THERMAL_TRIP_POINT),
+ help = STRING_TOKEN (STR_ACPI_PASSIVE_THERMAL_TRIP_POINT_HELP),
+ option text = STRING_TOKEN (STR_85_C), value = 85, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_87_C), value = 87, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_90_C), value = 90, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_100_C), value = 100, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_105_C), value = 105, flags=0 | RESET_REQUIRED;
+ option text = STRING_TOKEN (STR_180_C), value = 180, flags=DEFAULT | MANUFACTURING | RESET_REQUIRED;
+ endoneof;
suppressif TRUE;
numeric varid = Setup.PassiveTc1Value,
diff --git a/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni b/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni Binary files differindex 2aed705295..4a2f28cf76 100644 --- a/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni +++ b/Vlv2TbltDevicePkg/PlatformSetupDxe/VfrStrings.uni |