-\r
-#include <PiDxe.h>\r
-#include <IndustryStandard/Acpi.h>\r
-#include <Guid/PhysicalPresenceData.h>\r
-#include <Guid/MemoryOverwriteControl.h>\r
-#include <Protocol/SmmSwDispatch2.h>\r
-#include <Protocol/AcpiTable.h>\r
-#include <Protocol/SmmVariable.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/SmmServicesTableLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/DxeServicesLib.h>\r
-\r
-//\r
-// AML parsing definitions\r
-//\r
-#define AML_OPREGION_OP 0x80\r
-#define AML_BYTE_PREFIX 0x0A\r
-#define AML_DWORD_PREFIX 0x0C\r
-\r
-#pragma pack(1)\r
-typedef struct {\r
- UINT8 SoftwareSmi;\r
- UINT32 Parameter;\r
- UINT32 Response;\r
- UINT32 Request;\r
- UINT32 LastRequest;\r
- UINT32 ReturnCode;\r
-} PHYSICAL_PRESENCE_NVS;\r
-\r
-typedef struct {\r
- UINT8 SoftwareSmi;\r
- UINT32 Parameter;\r
- UINT32 Request;\r
-} MEMORY_CLEAR_NVS;\r
-\r
-typedef struct {\r
- PHYSICAL_PRESENCE_NVS PhysicalPresence;\r
- MEMORY_CLEAR_NVS MemoryClear;\r
-} TCG_NVS;\r
-\r
-typedef struct {\r
- UINT8 OpRegionOp;\r
- UINT32 NameString;\r
- UINT8 RegionSpace;\r
- UINT8 DWordPrefix;\r
- UINT32 RegionOffset;\r
- UINT8 BytePrefix;\r
- UINT8 RegionLen;\r
-} AML_OP_REGION_32_8;\r
-#pragma pack()\r