\r
#include <PiPei.h>\r
#include <Guid/SmramMemoryReserve.h>\r
-#include <Guid/AcpiVariable.h>\r
+#include <Guid/AcpiS3Context.h>\r
\r
#include <Library/MemoryAllocationLib.h>\r
#include <Library/DebugLib.h>\r
## @file\r
# Component description file for AcpiVariableHob on SmramReservedHob Thunk driver.\r
#\r
-# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions\r
[Packages]\r
MdePkg/MdePkg.dec\r
IntelFrameworkPkg/IntelFrameworkPkg.dec\r
- IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
+ MdeModulePkg/MdeModulePkg.dec\r
\r
[LibraryClasses]\r
PeimEntryPoint\r
+++ /dev/null
-/** @file\r
-Provides the data format and Name and GUID definition for the EFI Variable ACPI_VARIABLE_SET and the Framework version's correponding \r
-EFI Variable.\r
-This variable is the persistent data that will be saved to NV EFI Variable. It is the central repository\r
-for configuration data saved by the CPU Driver, Platform SMM Handler. It is read by \r
-Platform PEIM and PEIM on S3 boot path to restore the system configuration.\r
-\r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
-\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions\r
-of the BSD License which accompanies this distribution. The\r
-full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-**/\r
-\r
-#ifndef _ACPI_VARIABLE_H_\r
-#define _ACPI_VARIABLE_H_\r
-\r
-#define EFI_ACPI_VARIABLE_GUID \\r
- { \\r
- 0xaf9ffd67, 0xec10, 0x488a, {0x9d, 0xfc, 0x6c, 0xbf, 0x5e, 0xe2, 0x2c, 0x2e } \\r
- }\r
-\r
-#define ACPI_GLOBAL_VARIABLE L"AcpiGlobalVariable"\r
-\r
-#define EFI_ACPI_VARIABLE_COMPATIBILITY_GUID \\r
- { \\r
- 0xc020489e, 0x6db2, 0x4ef2, {0x9a, 0xa5, 0xca, 0x6, 0xfc, 0x11, 0xd3, 0x6a } \\r
- }\r
-//\r
-// The following structure boosts performance by combining all ACPI related variables into one.\r
-//\r
-#pragma pack(1)\r
-typedef struct {\r
- UINT16 Limit;\r
- UINTN Base;\r
-} PSEUDO_DESCRIPTOR;\r
-#pragma pack()\r
-\r
-typedef struct {\r
- BOOLEAN APState;\r
- BOOLEAN S3BootPath;\r
- EFI_PHYSICAL_ADDRESS WakeUpBuffer;\r
- EFI_PHYSICAL_ADDRESS GdtrProfile;\r
- EFI_PHYSICAL_ADDRESS IdtrProfile;\r
- EFI_PHYSICAL_ADDRESS CpuPrivateData;\r
- EFI_PHYSICAL_ADDRESS StackAddress;\r
- EFI_PHYSICAL_ADDRESS MicrocodePointerBuffer;\r
- EFI_PHYSICAL_ADDRESS SmramBase;\r
- EFI_PHYSICAL_ADDRESS SmmStartImageBase;\r
- UINT32 SmmStartImageSize;\r
- UINT32 NumberOfCpus;\r
-} ACPI_CPU_DATA_COMPATIBILITY;\r
-\r
-typedef struct {\r
- //\r
- // Acpi Related variables\r
- //\r
- EFI_PHYSICAL_ADDRESS AcpiReservedMemoryBase;\r
- UINT32 AcpiReservedMemorySize;\r
- EFI_PHYSICAL_ADDRESS S3ReservedLowMemoryBase;\r
- EFI_PHYSICAL_ADDRESS AcpiBootScriptTable;\r
- EFI_PHYSICAL_ADDRESS RuntimeScriptTableBase;\r
- EFI_PHYSICAL_ADDRESS AcpiFacsTable;\r
- UINT64 SystemMemoryLength;\r
- ACPI_CPU_DATA_COMPATIBILITY AcpiCpuData;\r
- //\r
- // VGA OPROM to support Video Re-POST for Linux S3\r
- //\r
- EFI_PHYSICAL_ADDRESS VideoOpromAddress;\r
- UINT32 VideoOpromSize;\r
-\r
- //\r
- // S3 Debug extension\r
- //\r
- EFI_PHYSICAL_ADDRESS S3DebugBufferAddress; \r
- EFI_PHYSICAL_ADDRESS S3ResumeNvsEntryPoint; \r
-} ACPI_VARIABLE_SET_COMPATIBILITY;\r
-\r
-typedef struct {\r
- BOOLEAN APState;\r
- EFI_PHYSICAL_ADDRESS StartupVector;\r
- EFI_PHYSICAL_ADDRESS GdtrProfile;\r
- EFI_PHYSICAL_ADDRESS IdtrProfile;\r
- EFI_PHYSICAL_ADDRESS StackAddress;\r
- UINT32 StackSize;\r
- UINT32 NumberOfCpus;\r
- EFI_PHYSICAL_ADDRESS MtrrTable;\r
- EFI_PHYSICAL_ADDRESS RegisterTable;\r
- EFI_PHYSICAL_ADDRESS Microcode;\r
-} ACPI_CPU_DATA;\r
-\r
-typedef struct {\r
- //\r
- // Acpi Related variables\r
- //\r
- EFI_PHYSICAL_ADDRESS AcpiReservedMemoryBase;\r
- UINT32 AcpiReservedMemorySize;\r
- EFI_PHYSICAL_ADDRESS S3ReservedLowMemoryBase;\r
- EFI_PHYSICAL_ADDRESS AcpiFacsTable;\r
- UINT64 SystemMemoryLength;\r
- ACPI_CPU_DATA AcpiCpuData;\r
-\r
- //\r
- // VGA OPROM to support Video Re-POST for Linux S3\r
- //\r
- EFI_PHYSICAL_ADDRESS VideoOpromAddress;\r
- UINT32 VideoOpromSize; \r
- EFI_PHYSICAL_ADDRESS S3PostVideoStatusRestoreEntryPoint;\r
-\r
- EFI_PHYSICAL_ADDRESS S3NvsPageTableAddress;\r
- EFI_PHYSICAL_ADDRESS S3DebugBufferAddress; \r
-} ACPI_VARIABLE_SET;\r
-\r
-#define SMM_S3_RESUME_SMM_32 SIGNATURE_64 ('S','M','M','S','3','_','3','2')\r
-#define SMM_S3_RESUME_SMM_64 SIGNATURE_64 ('S','M','M','S','3','_','6','4')\r
-\r
-typedef struct {\r
- UINT64 Signature;\r
- EFI_PHYSICAL_ADDRESS SmmS3ResumeEntryPoint;\r
- EFI_PHYSICAL_ADDRESS SmmS3StackBase;\r
- UINT64 SmmS3StackSize;\r
- UINT64 SmmS3Cr0;\r
- UINT64 SmmS3Cr3;\r
- UINT64 SmmS3Cr4;\r
- UINT16 ReturnCs;\r
- EFI_PHYSICAL_ADDRESS ReturnEntryPoint;\r
- EFI_PHYSICAL_ADDRESS ReturnContext1;\r
- EFI_PHYSICAL_ADDRESS ReturnContext2;\r
- EFI_PHYSICAL_ADDRESS ReturnStackPointer;\r
- EFI_PHYSICAL_ADDRESS Smst;\r
-} SMM_S3_RESUME_STATE;\r
-\r
-\r
-typedef struct {\r
- EFI_PHYSICAL_ADDRESS AcpiFacsTable;\r
- EFI_PHYSICAL_ADDRESS IdtrProfile;\r
- EFI_PHYSICAL_ADDRESS S3NvsPageTableAddress;\r
- EFI_PHYSICAL_ADDRESS BootScriptStackBase;\r
- UINT64 BootScriptStackSize;\r
- EFI_PHYSICAL_ADDRESS S3DebugBufferAddress; \r
-} ACPI_S3_CONTEXT;\r
-\r
-typedef struct {\r
- UINT16 ReturnCs;\r
- EFI_PHYSICAL_ADDRESS ReturnEntryPoint;\r
- EFI_PHYSICAL_ADDRESS ReturnStackPointer;\r
- EFI_PHYSICAL_ADDRESS AsmTransferControl;\r
- PSEUDO_DESCRIPTOR Idtr;\r
-} PEI_S3_RESUME_STATE;\r
-\r
-#define EFI_ACPI_S3_CONTEXT_GUID \\r
- { \\r
- 0xef98d3a, 0x3e33, 0x497a, {0xa4, 0x1, 0x77, 0xbe, 0x3e, 0xb7, 0x4f, 0x38} \\r
- }\r
-\r
-extern EFI_GUID gEfiAcpiS3ContextGuid;\r
-\r
-extern EFI_GUID gEfiAcpiVariableGuid;\r
-extern EFI_GUID gEfiAcpiVariableCompatiblityGuid;\r
-\r
-#endif\r
--- /dev/null
+/** @file\r
+ Definitions for data structures used in S3 resume.\r
+\r
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions\r
+of the BSD License which accompanies this distribution. The\r
+full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _ACPI_VARIABLE_COMPATIBILITY_H_\r
+#define _ACPI_VARIABLE_COMPATIBILITY_H_\r
+\r
+#define EFI_ACPI_VARIABLE_COMPATIBILITY_GUID \\r
+ { \\r
+ 0xc020489e, 0x6db2, 0x4ef2, {0x9a, 0xa5, 0xca, 0x6, 0xfc, 0x11, 0xd3, 0x6a } \\r
+ }\r
+\r
+#define ACPI_GLOBAL_VARIABLE L"AcpiGlobalVariable"\r
+\r
+extern EFI_GUID gEfiAcpiVariableCompatiblityGuid;\r
+\r
+typedef struct {\r
+ BOOLEAN APState;\r
+ BOOLEAN S3BootPath;\r
+ EFI_PHYSICAL_ADDRESS WakeUpBuffer;\r
+ EFI_PHYSICAL_ADDRESS GdtrProfile;\r
+ EFI_PHYSICAL_ADDRESS IdtrProfile;\r
+ EFI_PHYSICAL_ADDRESS CpuPrivateData;\r
+ EFI_PHYSICAL_ADDRESS StackAddress;\r
+ EFI_PHYSICAL_ADDRESS MicrocodePointerBuffer;\r
+ EFI_PHYSICAL_ADDRESS SmramBase;\r
+ EFI_PHYSICAL_ADDRESS SmmStartImageBase;\r
+ UINT32 SmmStartImageSize;\r
+ UINT32 NumberOfCpus;\r
+} ACPI_CPU_DATA_COMPATIBILITY;\r
+\r
+typedef struct {\r
+ //\r
+ // Acpi Related variables\r
+ //\r
+ EFI_PHYSICAL_ADDRESS AcpiReservedMemoryBase;\r
+ UINT32 AcpiReservedMemorySize;\r
+ EFI_PHYSICAL_ADDRESS S3ReservedLowMemoryBase;\r
+ EFI_PHYSICAL_ADDRESS AcpiBootScriptTable;\r
+ EFI_PHYSICAL_ADDRESS RuntimeScriptTableBase;\r
+ EFI_PHYSICAL_ADDRESS AcpiFacsTable;\r
+ UINT64 SystemMemoryLength;\r
+ ACPI_CPU_DATA_COMPATIBILITY AcpiCpuData;\r
+ //\r
+ // VGA OPROM to support Video Re-POST for Linux S3\r
+ //\r
+ EFI_PHYSICAL_ADDRESS VideoOpromAddress;\r
+ UINT32 VideoOpromSize;\r
+\r
+ //\r
+ // S3 Debug extension\r
+ //\r
+ EFI_PHYSICAL_ADDRESS S3DebugBufferAddress; \r
+ EFI_PHYSICAL_ADDRESS S3ResumeNvsEntryPoint; \r
+} ACPI_VARIABLE_SET_COMPATIBILITY;\r
+\r
+#endif\r
# Include/Guid/LzmaDecompress.h\r
gLzmaCustomDecompressGuid = { 0xEE4E5898, 0x3914, 0x4259, { 0x9D, 0x6E, 0xDC, 0x7B, 0xD7, 0x94, 0x03, 0xCF }}\r
\r
- ## Include/Guid/AcpiVariable.h\r
- gEfiAcpiVariableGuid = { 0xAF9FFD67, 0xEC10, 0x488A, { 0x9D, 0xFC, 0x6C, 0xBF, 0x5E, 0xE2, 0x2C, 0x2E }}\r
-\r
- ## Include/Guid/AcpiVariable.h\r
- gEfiAcpiS3ContextGuid = { 0xef98d3a, 0x3e33, 0x497a, { 0xa4, 0x1, 0x77, 0xbe, 0x3e, 0xb7, 0x4f, 0x38 }}\r
- \r
## Include/Guid/AcpiVariable.h\r
gEfiAcpiVariableCompatiblityGuid = { 0xc020489e, 0x6db2, 0x4ef2, { 0x9a, 0xa5, 0xca, 0x6, 0xfc, 0x11, 0xd3, 0x6a }}\r
\r
--- /dev/null
+/** @file\r
+ Definitions for data structures used in S3 resume.\r
+\r
+Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions\r
+of the BSD License which accompanies this distribution. The\r
+full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _ACPI_S3_DATA_H_\r
+#define _ACPI_S3_DATA_H_\r
+\r
+#include <Library/BaseLib.h>\r
+\r
+#define SMM_S3_RESUME_SMM_32 SIGNATURE_64 ('S','M','M','S','3','_','3','2')\r
+#define SMM_S3_RESUME_SMM_64 SIGNATURE_64 ('S','M','M','S','3','_','6','4')\r
+\r
+typedef struct {\r
+ UINT64 Signature;\r
+ EFI_PHYSICAL_ADDRESS SmmS3ResumeEntryPoint;\r
+ EFI_PHYSICAL_ADDRESS SmmS3StackBase;\r
+ UINT64 SmmS3StackSize;\r
+ UINT64 SmmS3Cr0;\r
+ UINT64 SmmS3Cr3;\r
+ UINT64 SmmS3Cr4;\r
+ UINT16 ReturnCs;\r
+ EFI_PHYSICAL_ADDRESS ReturnEntryPoint;\r
+ EFI_PHYSICAL_ADDRESS ReturnContext1;\r
+ EFI_PHYSICAL_ADDRESS ReturnContext2;\r
+ EFI_PHYSICAL_ADDRESS ReturnStackPointer;\r
+ EFI_PHYSICAL_ADDRESS Smst;\r
+} SMM_S3_RESUME_STATE;\r
+\r
+\r
+typedef struct {\r
+ EFI_PHYSICAL_ADDRESS AcpiFacsTable;\r
+ EFI_PHYSICAL_ADDRESS IdtrProfile;\r
+ EFI_PHYSICAL_ADDRESS S3NvsPageTableAddress;\r
+ EFI_PHYSICAL_ADDRESS BootScriptStackBase;\r
+ UINT64 BootScriptStackSize;\r
+ EFI_PHYSICAL_ADDRESS S3DebugBufferAddress; \r
+} ACPI_S3_CONTEXT;\r
+\r
+typedef struct {\r
+ UINT16 ReturnCs;\r
+ EFI_PHYSICAL_ADDRESS ReturnEntryPoint;\r
+ EFI_PHYSICAL_ADDRESS ReturnStackPointer;\r
+ EFI_PHYSICAL_ADDRESS AsmTransferControl;\r
+ IA32_DESCRIPTOR Idtr;\r
+} PEI_S3_RESUME_STATE;\r
+\r
+#define EFI_ACPI_S3_CONTEXT_GUID \\r
+ { \\r
+ 0xef98d3a, 0x3e33, 0x497a, {0xa4, 0x1, 0x77, 0xbe, 0x3e, 0xb7, 0x4f, 0x38} \\r
+ }\r
+\r
+extern EFI_GUID gEfiAcpiS3ContextGuid;\r
+\r
+extern EFI_GUID gEfiAcpiVariableGuid;\r
+\r
+#endif\r
## Include/Guid/SmmLockBox.h\r
gEfiSmmLockBoxCommunicationGuid = { 0x2a3cfebd, 0x27e8, 0x4d0a, { 0x8b, 0x79, 0xd6, 0x88, 0xc2, 0xa3, 0xe1, 0xc0 }}\r
\r
+ ## Include/Guid/AcpiS3Context.h\r
+ gEfiAcpiVariableGuid = { 0xAF9FFD67, 0xEC10, 0x488A, { 0x9D, 0xFC, 0x6C, 0xBF, 0x5E, 0xE2, 0x2C, 0x2E }}\r
+\r
+ ## Include/Guid/AcpiS3Context.h\r
+ gEfiAcpiS3ContextGuid = { 0xef98d3a, 0x3e33, 0x497a, { 0xa4, 0x1, 0x77, 0xbe, 0x3e, 0xb7, 0x4f, 0x38 }}\r
+\r
[Ppis]\r
## Include/Ppi/AtaController.h\r
gPeiAtaControllerPpiGuid = { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0, 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }}\r