VOID\r
)\r
{\r
- AcpiPmControl (7);\r
+ EFI_HOB_GUID_TYPE *GuidHob;\r
+ ACPI_BOARD_INFO *pAcpiBoardInfo;\r
+ UINTN PmCtrlReg;\r
+\r
+ //\r
+ // Find the acpi board information guid hob\r
+ //\r
+ GuidHob = GetFirstGuidHob (&gUefiAcpiBoardInfoGuid);\r
+ ASSERT (GuidHob != NULL);\r
+ pAcpiBoardInfo = (ACPI_BOARD_INFO *)GET_GUID_HOB_DATA (GuidHob); \r
+ \r
+ //\r
+ // GPE0_EN should be disabled to avoid any GPI waking up the system from S5\r
+ //\r
+ IoWrite16 ((UINTN)pAcpiBoardInfo->PmGpeEnBase, 0);\r
+\r
+ //\r
+ // Clear Power Button Status\r
+ //\r
+ IoWrite16((UINTN) pAcpiBoardInfo->PmEvtBase, BIT8);\r
+ \r
+ //\r
+ // Transform system into S5 sleep state\r
+ //\r
+ PmCtrlReg = (UINTN)pAcpiBoardInfo->PmCtrlRegBase; \r
+ IoAndThenOr16 (PmCtrlReg, (UINT16) ~0x3c00, (UINT16) (7 << 10));\r
+ IoOr16 (PmCtrlReg, BIT13);\r
+ CpuDeadLoop ();\r
+\r
ASSERT (FALSE);\r
}\r
\r
-\r
/**\r
Calling this function causes the system to enter a power state for capsule\r
update.\r