+++ /dev/null
-/** @file\r
- Library class name: SmmLib\r
- \r
- SMM Library Services that abstracts both S/W SMI generation and detection. \r
-\r
- Copyright (c) 2007 - 2010, Intel Corporation \r
- All rights reserved. This program and the accompanying materials \r
- are licensed and made available under the terms and conditions of the BSD License \r
- which accompanies this distribution. The 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 __SMM_LIB_H__\r
-#define __SMM_LIB_H__\r
-\r
-\r
-/**\r
- Triggers an SMI at boot time. \r
-\r
- This function triggers a software SMM interrupt at boot time.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-TriggerBootServiceSoftwareSmi (\r
- VOID\r
- );\r
-\r
-\r
-/**\r
- Triggers an SMI at run time. \r
-\r
- This function triggers a software SMM interrupt at run time.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-TriggerRuntimeSoftwareSmi (\r
- VOID\r
- );\r
-\r
-\r
-/**\r
- Test if a boot time software SMI happened. \r
-\r
- This function tests if a software SMM interrupt happened. If a software SMM interrupt happened and\r
- it was triggered at boot time, it returns TRUE. Otherwise, it returns FALSE.\r
-\r
- @retval TRUE A software SMI triggered at boot time happened.\r
- @retval FLASE No software SMI happened, or the software SMI was triggered at run time.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-IsBootServiceSoftwareSmi (\r
- VOID\r
- );\r
-\r
-\r
-/**\r
- Test if a run time software SMI happened. \r
-\r
- This function tests if a software SMM interrupt happened. If a software SMM interrupt happened and\r
- it was triggered at run time, it returns TRUE. Otherwise, it returns FALSE.\r
-\r
- @retval TRUE A software SMI triggered at run time happened.\r
- @retval FLASE No software SMI happened or the software SMI was triggered at boot time.\r
-\r
-**/\r
-BOOLEAN\r
-EFIAPI\r
-IsRuntimeSoftwareSmi (\r
- VOID\r
- );\r
-\r
-/**\r
- Clear APM SMI Status Bit; Set the EOS bit. \r
- \r
-**/\r
-VOID\r
-EFIAPI\r
-ClearSmi (\r
- VOID\r
- );\r
-#endif\r
--- /dev/null
+/** @file\r
+ This file declares the SMM CPU Save State protocol, which provides the processor\r
+ save-state information for IA-32 and Itanium processors.\r
+\r
+ Copyright (c) 2010, Intel Corporation\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The 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
+ @par Revision Reference:\r
+ This Protocol is defined in Framework of EFI SMM Core Interface Spec\r
+ Version 0.91.\r
+**/\r
+\r
+#ifndef _SMM_CPU_SAVE_STATE_H_\r
+#define _SMM_CPU_SAVE_STATE_H_\r
+\r
+#define EFI_SMM_CPU_SAVE_STATE_PROTOCOL_GUID \\r
+ { \\r
+ 0x21f302ad, 0x6e94, 0x471b, {0x84, 0xbc, 0xb1, 0x48, 0x0, 0x40, 0x3a, 0x1d} \\r
+ }\r
+\r
+typedef struct _EFI_SMM_CPU_SAVE_STATE_PROTOCOL EFI_SMM_CPU_SAVE_STATE_PROTOCOL;\r
+\r
+#define EFI_SMM_MIN_REV_ID_x64 0x30006\r
+\r
+#pragma pack (1)\r
+\r
+/// \r
+/// CPU save-state strcuture for IA32 and X64.\r
+///\r
+/// This struct declaration does not exctly match the Framework SMM CIS 0.91 because the\r
+/// union in the Framework SMM CIS 0.91 contains an unnamed union member that causes build\r
+/// breaks on many compilers with high warning levels. Instead, the UINT8 Reserved[0x200] \r
+/// field has been moved into EFI_SMM_CPU_STATE32. This maintains binary compatibility for\r
+/// the layout and also maintains source comaptibility for access of all fields in this\r
+/// union.\r
+///\r
+/// This struct declaration does not exctly match the Framework SMM CIS 0.91 because \r
+/// The Framework SMM CIS 0.91 uses ASM_XXX for base types in this structure. These\r
+/// have been changed to use the base types defined in the UEFI Specification. \r
+///\r
+typedef struct {\r
+ UINT8 Reserved[0x200];\r
+ UINT8 Reserved1[0xf8]; // fe00h\r
+ UINT32 SMBASE; // fef8h\r
+ UINT32 SMMRevId; // fefch\r
+ UINT16 IORestart; // ff00h\r
+ UINT16 AutoHALTRestart; // ff02h\r
+ UINT32 IEDBASE; // ff04h\r
+ UINT8 Reserved2[0x98]; // ff08h\r
+ UINT32 IOMemAddr; // ffa0h\r
+ UINT32 IOMisc; // ffa4h\r
+ UINT32 _ES;\r
+ UINT32 _CS;\r
+ UINT32 _SS;\r
+ UINT32 _DS;\r
+ UINT32 _FS;\r
+ UINT32 _GS;\r
+ UINT32 _LDTBase;\r
+ UINT32 _TR;\r
+ UINT32 _DR7;\r
+ UINT32 _DR6;\r
+ UINT32 _EAX;\r
+ UINT32 _ECX;\r
+ UINT32 _EDX;\r
+ UINT32 _EBX;\r
+ UINT32 _ESP;\r
+ UINT32 _EBP;\r
+ UINT32 _ESI;\r
+ UINT32 _EDI;\r
+ UINT32 _EIP;\r
+ UINT32 _EFLAGS;\r
+ UINT32 _CR3;\r
+ UINT32 _CR0;\r
+} EFI_SMM_CPU_STATE32;\r
+\r
+///\r
+/// This struct declaration does not exctly match the Framework SMM CIS 0.91 because \r
+/// The Framework SMM CIS 0.91 uses ASM_XXX for base types in this structure. These\r
+/// have been changed to use the base types defined in the UEFI Specification. \r
+///\r
+typedef struct {\r
+ UINT8 Reserved1[0x1d0]; // fc00h\r
+ UINT32 GdtBaseHiDword; // fdd0h\r
+ UINT32 LdtBaseHiDword; // fdd4h\r
+ UINT32 IdtBaseHiDword; // fdd8h\r
+ UINT8 Reserved2[0xc]; // fddch\r
+ UINT64 IO_EIP; // fde8h\r
+ UINT8 Reserved3[0x50]; // fdf0h\r
+ UINT32 _CR4; // fe40h\r
+ UINT8 Reserved4[0x48]; // fe44h\r
+ UINT32 GdtBaseLoDword; // fe8ch\r
+ UINT32 GdtLimit; // fe90h\r
+ UINT32 IdtBaseLoDword; // fe94h\r
+ UINT32 IdtLimit; // fe98h\r
+ UINT32 LdtBaseLoDword; // fe9ch\r
+ UINT32 LdtLimit; // fea0h\r
+ UINT32 LdtInfo; // fea4h\r
+ UINT8 Reserved5[0x50]; // fea8h\r
+ UINT32 SMBASE; // fef8h\r
+ UINT32 SMMRevId; // fefch\r
+ UINT16 AutoHALTRestart; // ff00h\r
+ UINT16 IORestart; // ff02h\r
+ UINT32 IEDBASE; // ff04h\r
+ UINT8 Reserved6[0x14]; // ff08h\r
+ UINT64 _R15; // ff1ch\r
+ UINT64 _R14;\r
+ UINT64 _R13;\r
+ UINT64 _R12;\r
+ UINT64 _R11;\r
+ UINT64 _R10;\r
+ UINT64 _R9;\r
+ UINT64 _R8;\r
+ UINT64 _RAX; // ff5ch\r
+ UINT64 _RCX;\r
+ UINT64 _RDX;\r
+ UINT64 _RBX;\r
+ UINT64 _RSP;\r
+ UINT64 _RBP;\r
+ UINT64 _RSI;\r
+ UINT64 _RDI;\r
+ UINT64 IOMemAddr; // ff9ch\r
+ UINT32 IOMisc; // ffa4h\r
+ UINT32 _ES; // ffa8h\r
+ UINT32 _CS;\r
+ UINT32 _SS;\r
+ UINT32 _DS;\r
+ UINT32 _FS;\r
+ UINT32 _GS;\r
+ UINT32 _LDTR; // ffc0h\r
+ UINT32 _TR;\r
+ UINT64 _DR7; // ffc8h\r
+ UINT64 _DR6;\r
+ UINT64 _RIP; // ffd8h\r
+ UINT64 IA32_EFER; // ffe0h\r
+ UINT64 _RFLAGS; // ffe8h\r
+ UINT64 _CR3; // fff0h\r
+ UINT64 _CR0; // fff8h\r
+} EFI_SMM_CPU_STATE64;\r
+\r
+///\r
+/// Union of CPU save-state strcutures for IA32 and X64.\r
+///\r
+/// This union declaration does not exctly match the Framework SMM CIS 0.91 because the\r
+/// union in the Framework SMM CIS 0.91 contains an unnamed union member that causes build\r
+/// breaks on many compilers with high warning levels. Instead, the UINT8 Reserved[0x200] \r
+/// field has been moved into EFI_SMM_CPU_STATE32. This maintains binary compatibility for\r
+/// the layout and also maintains source comaptibility for access of all fields in this\r
+/// union.\r
+///\r
+typedef union {\r
+ EFI_SMM_CPU_STATE32 x86;\r
+ EFI_SMM_CPU_STATE64 x64;\r
+} EFI_SMM_CPU_STATE;\r
+\r
+#pragma pack ()\r
+\r
+///\r
+/// Provides a programatic means to access SMM save state.\r
+///\r
+struct _EFI_SMM_CPU_SAVE_STATE_PROTOCOL {\r
+ ///\r
+ /// Reference to a list of save states\r
+ ///\r
+ EFI_SMM_CPU_STATE **CpuSaveState;\r
+};\r
+\r
+extern EFI_GUID gEfiSmmCpuSaveStateProtocolGuid;\r
+\r
+#endif\r
[Includes]\r
Include # Root include for the package\r
\r
-[LibraryClasses]\r
- SmmLib|Include/Library/SmmLib.h\r
-\r
[Guids]\r
## Include/Guid/DataHubRecords.h\r
gEfiCacheSubClassGuid = { 0x7f0013a7, 0xdc79, 0x4b22, { 0x80, 0x99, 0x11, 0xf7, 0x5f, 0xdc, 0x82, 0x9d }}\r
## Include/Protocol/FrameworkFirmwareVolumeBlock.h\r
gFramerworkEfiFirmwareVolumeBlockProtocolGuid = { 0xDE28BC59, 0x6228, 0x41BD, { 0xBD, 0xF6, 0xA3, 0xB9, 0xAD, 0xB5, 0x8D, 0xA1 }} \r
\r
+ ## Include/Protocol/SmmCpuSaveState.h\r
+ gEfiSmmCpuSaveStateProtocolGuid = { 0x21f302ad, 0x6e94, 0x471b, {0x84, 0xbc, 0xb1, 0x48, 0x0, 0x40, 0x3a, 0x1d}}\r
+\r
[Ppis]\r
## Include/Ppi/BootScriptExecuter.h\r
gEfiPeiBootScriptExecuterPpiGuid = { 0xabd42895, 0x78cf, 0x4872, { 0x84, 0x44, 0x1b, 0x5c, 0x18, 0x0b, 0xfb, 0xff }}\r
#\r
# This DSC file is used for Package Level build.\r
#\r
-# Copyright (c) 2007 - 2009, Intel Corporation\r
+# Copyright (c) 2007 - 2010, Intel Corporation\r
#\r
# All rights reserved. This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
BUILD_TARGETS = DEBUG|RELEASE\r
SKUID_IDENTIFIER = DEFAULT\r
\r
-\r
################################################################################\r
#\r
# Pcd Section - list of all EDK II PCD Entries defined by this Platform\r
#\r
################################################################################\r
-[PcdsFixedAtBuild.common]\r
+[PcdsFixedAtBuild]\r
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0f\r
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x06\r
gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue|0xAF\r
gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320\r
\r
-[PcdsPatchableInModule.common]\r
+[PcdsPatchableInModule]\r
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000\r
\r
-[PcdsFeatureFlag.common]\r
+[PcdsFeatureFlag]\r
gEfiMdePkgTokenSpaceGuid.PcdComponentNameDisable|FALSE\r
gEfiMdePkgTokenSpaceGuid.PcdDriverDiagnosticsDisable|FALSE\r
gEfiMdePkgTokenSpaceGuid.PcdComponentName2Disable|FALSE\r
# generated for it, but the binary will not be put into any firmware volume.\r
#\r
###################################################################################################\r
-[Components.common]\r
+[Components]\r
IntelFrameworkPkg/Library/DxeIoLibCpuIo/DxeIoLibCpuIo.inf\r
IntelFrameworkPkg/Library/FrameworkUefiLib/FrameworkUefiLib.inf\r
IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DxeSmmDriverEntryPoint.inf\r
IntelFrameworkPkg/Library/PeiSmbusLibSmbusPpi/PeiSmbusLibSmbusPpi.inf\r
IntelFrameworkPkg/Library/PeiHobLibFramework/PeiHobLibFramework.inf\r
- IntelFrameworkPkg/Library/SmmLibNull/SmmLibNull.inf\r
\r