X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FPi%2FPiSmmCis.h;h=66e2dd568d746b85e332355e2dd028377acaf8b6;hp=dc71f639befa2bb55d7b510c7fd80654717f4800;hb=ddcf46b2eb5064fdd5b7f0bf83d5ad29dc8b6584;hpb=92f0867613181064da585b48f73d747f9792b34e diff --git a/MdePkg/Include/Pi/PiSmmCis.h b/MdePkg/Include/Pi/PiSmmCis.h index dc71f639be..66e2dd568d 100644 --- a/MdePkg/Include/Pi/PiSmmCis.h +++ b/MdePkg/Include/Pi/PiSmmCis.h @@ -1,9 +1,9 @@ /** @file - Common definitions in the Platform Initialization Specification version 1.2 + Common definitions in the Platform Initialization Specification version 1.4 VOLUME 4 System Management Mode Core Interface version. - Copyright (c) 2009, Intel Corporation - All rights reserved. This program and the accompanying materials + Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -17,18 +17,20 @@ #define _PI_SMMCIS_H_ #include -#include +#include -typedef struct _EFI_SMM_SYSTEM_TABLE EFI_SMM_SYSTEM_TABLE; +typedef struct _EFI_SMM_SYSTEM_TABLE2 EFI_SMM_SYSTEM_TABLE2; /// /// The System Management System Table (SMST) signature /// #define SMM_SMST_SIGNATURE SIGNATURE_32 ('S', 'M', 'S', 'T') /// -/// The System Management System Table (SMST) revision is 1.0 +/// The System Management System Table (SMST) revision is 1.4 /// -#define EFI_SMM_SYSTEM_TABLE_REVISION ((1 << 16) | (0x00)) +#define SMM_SPECIFICATION_MAJOR_REVISION 1 +#define SMM_SPECIFICATION_MINOR_REVISION 40 +#define EFI_SMM_SYSTEM_TABLE2_REVISION ((SMM_SPECIFICATION_MAJOR_REVISION<<16) | (SMM_SPECIFICATION_MINOR_REVISION)) /** Adds, updates, or removes a configuration table entry from the System Management System Table. @@ -50,22 +52,11 @@ typedef struct _EFI_SMM_SYSTEM_TABLE EFI_SMM_SYSTEM_TABLE; **/ typedef EFI_STATUS -(EFIAPI *EFI_SMM_INSTALL_CONFIGURATION_TABLE)( - IN CONST EFI_SMM_SYSTEM_TABLE *SystemTable, - IN CONST EFI_GUID *Guid, - IN VOID *Table, - IN UINTN TableSize - ); - -/** - Function prototype for invoking a function on an Application Processor. - - @param[in,out] Buffer Pointer to private data buffer. -**/ -typedef -VOID -(EFIAPI *EFI_AP_PROCEDURE)( - IN OUT VOID *Buffer +(EFIAPI *EFI_SMM_INSTALL_CONFIGURATION_TABLE2)( + IN CONST EFI_SMM_SYSTEM_TABLE2 *SystemTable, + IN CONST EFI_GUID *Guid, + IN VOID *Table, + IN UINTN TableSize ); /** @@ -115,14 +106,17 @@ EFI_STATUS The SmmRegisterProtocolNotify() function creates a registration Function that is to be called whenever a protocol interface is installed for Protocol by SmmInstallProtocolInterface(). + If Function == NULL and Registration is an existing registration, then the callback is unhooked. @param[in] Protocol The unique ID of the protocol for which the event is to be registered. @param[in] Function Points to the notification function. @param[out] Registration A pointer to a memory location to receive the registration value. - @retval EFI_SUCCESS Successfully returned the registration record that has been added. - @retval EFI_INVALID_PARAMETER One or more of Protocol, Function and Registration is NULL. + @retval EFI_SUCCESS Successfully returned the registration record + that has been added or unhooked. + @retval EFI_INVALID_PARAMETER Protocol is NULL or Registration is NULL. @retval EFI_OUT_OF_RESOURCES Not enough memory resource to finish the request. + @retval EFI_NOT_FOUND If the registration is not found when Function == NULL. **/ typedef EFI_STATUS @@ -140,10 +134,10 @@ EFI_STATUS @param[in,out] CommBuffer Points to the optional communication buffer. @param[in,out] CommBufferSize Points to the size of the optional communication buffer. - @retval EFI_SUCCESS Interrupt source was processed successfully but not quiesced. + @retval EFI_WARN_INTERRUPT_SOURCE_PENDING Interrupt source was processed successfully but not quiesced. @retval EFI_INTERRUPT_PENDING One or more SMI sources could not be quiesced. - @retval EFI_WARN_INTERRUPT_SOURCE_PENDING Interrupt source was not handled or quiesced. - @retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED Interrupt source was handled and quiesced. + @retval EFI_NOT_FOUND Interrupt source was not handled or quiesced. + @retval EFI_SUCCESS Interrupt source was handled and quiesced. **/ typedef EFI_STATUS @@ -225,7 +219,7 @@ typedef struct _EFI_SMM_ENTRY_CONTEXT { /// UINTN CurrentlyExecutingCpu; /// - /// The number of current operational processors in the platform. This is a 1 based + /// The number of possible processors in the platform. This is a 1 based /// counter. This does not indicate the number of processors that entered SMM. /// UINTN NumberOfCpus; @@ -261,40 +255,40 @@ VOID /// services for managing SMRAM allocation and providing basic I/O services. These services are /// intended for both preboot and runtime usage. /// -struct _EFI_SMM_SYSTEM_TABLE { +struct _EFI_SMM_SYSTEM_TABLE2 { /// /// The table header for the SMST. /// - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; /// /// A pointer to a NULL-terminated Unicode string containing the vendor name. /// It is permissible for this pointer to be NULL. /// - CHAR16 *SmmFirmwareVendor; + CHAR16 *SmmFirmwareVendor; /// /// The particular revision of the firmware. /// - UINT32 SmmFirmwareRevision; + UINT32 SmmFirmwareRevision; - EFI_SMM_INSTALL_CONFIGURATION_TABLE SmmInstallConfigurationTable; + EFI_SMM_INSTALL_CONFIGURATION_TABLE2 SmmInstallConfigurationTable; /// /// I/O Service /// - EFI_SMM_CPU_IO_PROTOCOL SmmIo; + EFI_SMM_CPU_IO2_PROTOCOL SmmIo; /// /// Runtime memory services /// - EFI_ALLOCATE_POOL SmmAllocatePool; - EFI_FREE_POOL SmmFreePool; - EFI_ALLOCATE_PAGES SmmAllocatePages; - EFI_FREE_PAGES SmmFreePages; + EFI_ALLOCATE_POOL SmmAllocatePool; + EFI_FREE_POOL SmmFreePool; + EFI_ALLOCATE_PAGES SmmAllocatePages; + EFI_FREE_PAGES SmmFreePages; /// /// MP service /// - EFI_SMM_STARTUP_THIS_AP SmmStartupThisAp; + EFI_SMM_STARTUP_THIS_AP SmmStartupThisAp; /// /// CPU information records @@ -304,23 +298,23 @@ struct _EFI_SMM_SYSTEM_TABLE { /// A number between zero and and the NumberOfCpus field. This field designates /// which processor is executing the SMM infrastructure. /// - UINTN CurrentlyExecutingCpu; + UINTN CurrentlyExecutingCpu; /// - /// The number of current operational processors in the platform. This is a 1 based counter. + /// The number of possible processors in the platform. This is a 1 based counter. /// - UINTN NumberOfCpus; + UINTN NumberOfCpus; /// /// Points to an array, where each element describes the number of bytes in the /// corresponding save state specified by CpuSaveState. There are always /// NumberOfCpus entries in the array. /// - UINTN *CpuSaveStateSize; + UINTN *CpuSaveStateSize; /// /// Points to an array, where each element is a pointer to a CPU save state. The /// corresponding element in CpuSaveStateSize specifies the number of bytes in the /// save state area. There are always NumberOfCpus entries in the array. /// - VOID **CpuSaveState; + VOID **CpuSaveState; /// /// Extensibility table @@ -329,29 +323,29 @@ struct _EFI_SMM_SYSTEM_TABLE { /// /// The number of UEFI Configuration Tables in the buffer SmmConfigurationTable. /// - UINTN NumberOfTableEntries; + UINTN NumberOfTableEntries; /// /// A pointer to the UEFI Configuration Tables. The number of entries in the table is /// NumberOfTableEntries. /// - EFI_CONFIGURATION_TABLE *SmmConfigurationTable; + EFI_CONFIGURATION_TABLE *SmmConfigurationTable; /// /// Protocol services /// - EFI_INSTALL_PROTOCOL_INTERFACE SmmInstallProtocolInterface; - EFI_UNINSTALL_PROTOCOL_INTERFACE SmmUninstallProtocolInterface; - EFI_HANDLE_PROTOCOL SmmHandleProtocol; - EFI_SMM_REGISTER_PROTOCOL_NOTIFY SmmRegisterProtocolNotify; - EFI_LOCATE_HANDLE SmmLocateHandle; - EFI_LOCATE_PROTOCOL SmmLocateProtocol; + EFI_INSTALL_PROTOCOL_INTERFACE SmmInstallProtocolInterface; + EFI_UNINSTALL_PROTOCOL_INTERFACE SmmUninstallProtocolInterface; + EFI_HANDLE_PROTOCOL SmmHandleProtocol; + EFI_SMM_REGISTER_PROTOCOL_NOTIFY SmmRegisterProtocolNotify; + EFI_LOCATE_HANDLE SmmLocateHandle; + EFI_LOCATE_PROTOCOL SmmLocateProtocol; /// /// SMI Management functions /// - EFI_SMM_INTERRUPT_MANAGE SmiManage; - EFI_SMM_INTERRUPT_REGISTER SmiHandlerRegister; - EFI_SMM_INTERRUPT_UNREGISTER SmiHandlerUnRegister; + EFI_SMM_INTERRUPT_MANAGE SmiManage; + EFI_SMM_INTERRUPT_REGISTER SmiHandlerRegister; + EFI_SMM_INTERRUPT_UNREGISTER SmiHandlerUnRegister; }; #endif