#ifndef _PI_SMMCIS_H_\r
#define _PI_SMMCIS_H_\r
\r
-#include <Pi/PiMultiPhase.h>\r
+#include <Pi/PiMmCis.h>\r
#include <Protocol/SmmCpuIo2.h>\r
\r
typedef struct _EFI_SMM_SYSTEM_TABLE2 EFI_SMM_SYSTEM_TABLE2;\r
-\r
-///\r
-/// The System Management System Table (SMST) signature\r
-///\r
-#define SMM_SMST_SIGNATURE SIGNATURE_32 ('S', 'M', 'S', 'T')\r
-///\r
-/// The System Management System Table (SMST) revision is 1.4\r
-///\r
-#define SMM_SPECIFICATION_MAJOR_REVISION 1\r
-#define SMM_SPECIFICATION_MINOR_REVISION 40\r
-#define EFI_SMM_SYSTEM_TABLE2_REVISION ((SMM_SPECIFICATION_MAJOR_REVISION<<16) | (SMM_SPECIFICATION_MINOR_REVISION))\r
+//\r
+// Define new MM related definition introduced by PI 1.5.\r
+//\r
+#define SMM_SMST_SIGNATURE MM_MMST_SIGNATURE\r
+#define SMM_SPECIFICATION_MAJOR_REVISION MM_SPECIFICATION_MAJOR_REVISION\r
+#define SMM_SPECIFICATION_MINOR_REVISION MM_SPECIFICATION_MINOR_REVISION\r
+#define EFI_SMM_SYSTEM_TABLE2_REVISION EFI_MM_SYSTEM_TABLE_REVISION\r
\r
/**\r
Adds, updates, or removes a configuration table entry from the System Management System Table.\r
typedef\r
EFI_STATUS\r
(EFIAPI *EFI_SMM_INSTALL_CONFIGURATION_TABLE2)(\r
- IN CONST EFI_SMM_SYSTEM_TABLE2 *SystemTable,\r
- IN CONST EFI_GUID *Guid,\r
- IN VOID *Table,\r
- IN UINTN TableSize\r
- );\r
-\r
-/**\r
- This service lets the caller to get one distinct application processor (AP) to execute\r
- a caller-provided code stream while in SMM.\r
-\r
- @param[in] Procedure A pointer to the code stream to be run on the designated\r
- AP of the system.\r
- @param[in] CpuNumber The zero-based index of the processor number of the AP\r
- on which the code stream is supposed to run.\r
- @param[in,out] ProcArguments Allows the caller to pass a list of parameters to the code\r
- that is run by the AP.\r
-\r
- @retval EFI_SUCCESS The call was successful and the return parameters are valid.\r
- @retval EFI_INVALID_PARAMETER The input arguments are out of range.\r
- @retval EFI_INVALID_PARAMETER The CPU requested is not available on this SMI invocation.\r
- @retval EFI_INVALID_PARAMETER The CPU cannot support an additional service invocation.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_STARTUP_THIS_AP)(\r
- IN EFI_AP_PROCEDURE Procedure,\r
- IN UINTN CpuNumber,\r
- IN OUT VOID *ProcArguments OPTIONAL\r
+ IN CONST EFI_SMM_SYSTEM_TABLE2 *SystemTable,\r
+ IN CONST EFI_GUID *Guid,\r
+ IN VOID *Table,\r
+ IN UINTN TableSize\r
);\r
\r
-/**\r
- Function prototype for protocol install notification.\r
-\r
- @param[in] Protocol Points to the protocol's unique identifier.\r
- @param[in] Interface Points to the interface instance.\r
- @param[in] Handle The handle on which the interface was installed.\r
-\r
- @return Status Code\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_NOTIFY_FN)(\r
- IN CONST EFI_GUID *Protocol,\r
- IN VOID *Interface,\r
- IN EFI_HANDLE Handle\r
- );\r
-\r
-/**\r
- Register a callback function be called when a particular protocol interface is installed.\r
-\r
- The SmmRegisterProtocolNotify() function creates a registration Function that is to be \r
- called whenever a protocol interface is installed for Protocol by \r
- SmmInstallProtocolInterface().\r
- If Function == NULL and Registration is an existing registration, then the callback is unhooked.\r
-\r
- @param[in] Protocol The unique ID of the protocol for which the event is to be registered.\r
- @param[in] Function Points to the notification function.\r
- @param[out] Registration A pointer to a memory location to receive the registration value.\r
-\r
- @retval EFI_SUCCESS Successfully returned the registration record\r
- that has been added or unhooked.\r
- @retval EFI_INVALID_PARAMETER Protocol is NULL or Registration is NULL.\r
- @retval EFI_OUT_OF_RESOURCES Not enough memory resource to finish the request.\r
- @retval EFI_NOT_FOUND If the registration is not found when Function == NULL.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_REGISTER_PROTOCOL_NOTIFY)(\r
- IN CONST EFI_GUID *Protocol,\r
- IN EFI_SMM_NOTIFY_FN Function,\r
- OUT VOID **Registration\r
- );\r
-\r
-/**\r
- Manage SMI of a particular type.\r
-\r
- @param[in] HandlerType Points to the handler type or NULL for root SMI handlers.\r
- @param[in] Context Points to an optional context buffer.\r
- @param[in,out] CommBuffer Points to the optional communication buffer.\r
- @param[in,out] CommBufferSize Points to the size of the optional communication buffer.\r
-\r
- @retval EFI_WARN_INTERRUPT_SOURCE_PENDING Interrupt source was processed successfully but not quiesced.\r
- @retval EFI_INTERRUPT_PENDING One or more SMI sources could not be quiesced.\r
- @retval EFI_NOT_FOUND Interrupt source was not handled or quiesced.\r
- @retval EFI_SUCCESS Interrupt source was handled and quiesced.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_INTERRUPT_MANAGE)(\r
- IN CONST EFI_GUID *HandlerType,\r
- IN CONST VOID *Context OPTIONAL,\r
- IN OUT VOID *CommBuffer OPTIONAL,\r
- IN OUT UINTN *CommBufferSize OPTIONAL\r
- );\r
-\r
-/**\r
- Main entry point for an SMM handler dispatch or communicate-based callback.\r
-\r
- @param[in] DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().\r
- @param[in] Context Points to an optional handler context which was specified when the\r
- handler was registered.\r
- @param[in,out] CommBuffer A pointer to a collection of data in memory that will\r
- be conveyed from a non-SMM environment into an SMM environment.\r
- @param[in,out] CommBufferSize The size of the CommBuffer.\r
-\r
- @retval EFI_SUCCESS The interrupt was handled and quiesced. No other handlers \r
- should still be called.\r
- @retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED The interrupt has been quiesced but other handlers should \r
- still be called.\r
- @retval EFI_WARN_INTERRUPT_SOURCE_PENDING The interrupt is still pending and other handlers should still \r
- be called.\r
- @retval EFI_INTERRUPT_PENDING The interrupt could not be quiesced.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_HANDLER_ENTRY_POINT2)(\r
- IN EFI_HANDLE DispatchHandle,\r
- IN CONST VOID *Context OPTIONAL,\r
- IN OUT VOID *CommBuffer OPTIONAL,\r
- IN OUT UINTN *CommBufferSize OPTIONAL\r
- );\r
-\r
-/**\r
- Registers a handler to execute within SMM.\r
-\r
- @param[in] Handler Handler service function pointer.\r
- @param[in] HandlerType Points to the handler type or NULL for root SMI handlers.\r
- @param[out] DispatchHandle On return, contains a unique handle which can be used to later\r
- unregister the handler function.\r
-\r
- @retval EFI_SUCCESS SMI handler added successfully.\r
- @retval EFI_INVALID_PARAMETER Handler is NULL or DispatchHandle is NULL.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_INTERRUPT_REGISTER)(\r
- IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,\r
- IN CONST EFI_GUID *HandlerType OPTIONAL,\r
- OUT EFI_HANDLE *DispatchHandle\r
- );\r
-\r
-/**\r
- Unregister a handler in SMM.\r
-\r
- @param[in] DispatchHandle The handle that was specified when the handler was registered.\r
-\r
- @retval EFI_SUCCESS Handler function was successfully unregistered.\r
- @retval EFI_INVALID_PARAMETER DispatchHandle does not refer to a valid handle.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_INTERRUPT_UNREGISTER)(\r
- IN EFI_HANDLE DispatchHandle\r
- );\r
+typedef EFI_MM_STARTUP_THIS_AP EFI_SMM_STARTUP_THIS_AP;\r
+typedef EFI_MM_NOTIFY_FN EFI_SMM_NOTIFY_FN;\r
+typedef EFI_MM_REGISTER_PROTOCOL_NOTIFY EFI_SMM_REGISTER_PROTOCOL_NOTIFY;\r
+typedef EFI_MM_INTERRUPT_MANAGE EFI_SMM_INTERRUPT_MANAGE;\r
+typedef EFI_MM_HANDLER_ENTRY_POINT EFI_SMM_HANDLER_ENTRY_POINT2;\r
+typedef EFI_MM_INTERRUPT_REGISTER EFI_SMM_INTERRUPT_REGISTER;\r
+typedef EFI_MM_INTERRUPT_UNREGISTER EFI_SMM_INTERRUPT_UNREGISTER;\r
\r
///\r
/// Processor information and functionality needed by SMM Foundation.\r