summaryrefslogtreecommitdiffstats
path: root/MdePkg/Include/Pi
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2017-08-28 14:35:08 +0800
committerEric Dong <eric.dong@intel.com>2017-08-29 09:37:37 +0800
commit2f208e59e4b994978a1a24affc306eb694a00327 (patch)
tree5ab90347e1dafadd29a06123d25811a3aad0f9ac /MdePkg/Include/Pi
parent07c6a47e70ba54709b0e26237770f3c38685e860 (diff)
downloadedk2-2f208e59e4b994978a1a24affc306eb694a00327.tar.gz
edk2-2f208e59e4b994978a1a24affc306eb694a00327.tar.bz2
edk2-2f208e59e4b994978a1a24affc306eb694a00327.zip
MdePkg: Reference new definitions for Management Mode.
In PI 1.5 version, system management mode name(SMM) has been changed to Management Mode(MM). It impacts the current code which still use SMM/Smram/SMI keywords. This patch update the original files which related to old SMM modules, also keep the compatible with old SMM related drivers. Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'MdePkg/Include/Pi')
-rw-r--r--MdePkg/Include/Pi/PiMultiPhase.h32
-rw-r--r--MdePkg/Include/Pi/PiSmmCis.h183
2 files changed, 38 insertions, 177 deletions
diff --git a/MdePkg/Include/Pi/PiMultiPhase.h b/MdePkg/Include/Pi/PiMultiPhase.h
index 169258caa8..6839038580 100644
--- a/MdePkg/Include/Pi/PiMultiPhase.h
+++ b/MdePkg/Include/Pi/PiMultiPhase.h
@@ -95,43 +95,49 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
///@}
///
-/// SMRAM states and capabilities
+/// MMRAM states and capabilities
///
-#define EFI_SMRAM_OPEN 0x00000001
-#define EFI_SMRAM_CLOSED 0x00000002
-#define EFI_SMRAM_LOCKED 0x00000004
+#define EFI_MMRAM_OPEN 0x00000001
+#define EFI_MMRAM_CLOSED 0x00000002
+#define EFI_MMRAM_LOCKED 0x00000004
#define EFI_CACHEABLE 0x00000008
#define EFI_ALLOCATED 0x00000010
#define EFI_NEEDS_TESTING 0x00000020
#define EFI_NEEDS_ECC_INITIALIZATION 0x00000040
+#define EFI_SMRAM_OPEN EFI_MMRAM_OPEN
+#define EFI_SMRAM_CLOSED EFI_MMRAM_CLOSED
+#define EFI_SMRAM_LOCKED EFI_MMRAM_LOCKED
+
///
-/// Structure describing a SMRAM region and its accessibility attributes.
+/// Structure describing a MMRAM region and its accessibility attributes.
///
typedef struct {
///
- /// Designates the physical address of the SMRAM in memory. This view of memory is
- /// the same as seen by I/O-based agents, for example, but it may not be the address seen
+ /// Designates the physical address of the MMRAM in memory. This view of memory is
+ /// the same as seen by I/O-based agents, for example, but it may not be the address seen
/// by the processors.
///
EFI_PHYSICAL_ADDRESS PhysicalStart;
///
- /// Designates the address of the SMRAM, as seen by software executing on the
+ /// Designates the address of the MMRAM, as seen by software executing on the
/// processors. This address may or may not match PhysicalStart.
///
EFI_PHYSICAL_ADDRESS CpuStart;
///
- /// Describes the number of bytes in the SMRAM region.
+ /// Describes the number of bytes in the MMRAM region.
///
UINT64 PhysicalSize;
///
- /// Describes the accessibility attributes of the SMRAM. These attributes include the
- /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical
- /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC
+ /// Describes the accessibility attributes of the MMRAM. These attributes include the
+ /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical
+ /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC
/// initialization).
///
UINT64 RegionState;
-} EFI_SMRAM_DESCRIPTOR;
+} EFI_MMRAM_DESCRIPTOR;
+
+typedef EFI_MMRAM_DESCRIPTOR EFI_SMRAM_DESCRIPTOR;
typedef enum {
EFI_PCD_TYPE_8,
diff --git a/MdePkg/Include/Pi/PiSmmCis.h b/MdePkg/Include/Pi/PiSmmCis.h
index 6cb28b7fb2..4f8d5d0fdf 100644
--- a/MdePkg/Include/Pi/PiSmmCis.h
+++ b/MdePkg/Include/Pi/PiSmmCis.h
@@ -16,21 +16,17 @@
#ifndef _PI_SMMCIS_H_
#define _PI_SMMCIS_H_
-#include <Pi/PiMultiPhase.h>
+#include <Pi/PiMmCis.h>
#include <Protocol/SmmCpuIo2.h>
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.4
-///
-#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))
+//
+// Define new MM related definition introduced by PI 1.5.
+//
+#define SMM_SMST_SIGNATURE MM_MMST_SIGNATURE
+#define SMM_SPECIFICATION_MAJOR_REVISION MM_SPECIFICATION_MAJOR_REVISION
+#define SMM_SPECIFICATION_MINOR_REVISION MM_SPECIFICATION_MINOR_REVISION
+#define EFI_SMM_SYSTEM_TABLE2_REVISION EFI_MM_SYSTEM_TABLE_REVISION
/**
Adds, updates, or removes a configuration table entry from the System Management System Table.
@@ -53,160 +49,19 @@ typedef struct _EFI_SMM_SYSTEM_TABLE2 EFI_SMM_SYSTEM_TABLE2;
typedef
EFI_STATUS
(EFIAPI *EFI_SMM_INSTALL_CONFIGURATION_TABLE2)(
- IN CONST EFI_SMM_SYSTEM_TABLE2 *SystemTable,
- IN CONST EFI_GUID *Guid,
- IN VOID *Table,
- IN UINTN TableSize
- );
-
-/**
- This service lets the caller to get one distinct application processor (AP) to execute
- a caller-provided code stream while in SMM.
-
- @param[in] Procedure A pointer to the code stream to be run on the designated
- AP of the system.
- @param[in] CpuNumber The zero-based index of the processor number of the AP
- on which the code stream is supposed to run.
- @param[in,out] ProcArguments Allows the caller to pass a list of parameters to the code
- that is run by the AP.
-
- @retval EFI_SUCCESS The call was successful and the return parameters are valid.
- @retval EFI_INVALID_PARAMETER The input arguments are out of range.
- @retval EFI_INVALID_PARAMETER The CPU requested is not available on this SMI invocation.
- @retval EFI_INVALID_PARAMETER The CPU cannot support an additional service invocation.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_STARTUP_THIS_AP)(
- IN EFI_AP_PROCEDURE Procedure,
- IN UINTN CpuNumber,
- IN OUT VOID *ProcArguments OPTIONAL
+ IN CONST EFI_SMM_SYSTEM_TABLE2 *SystemTable,
+ IN CONST EFI_GUID *Guid,
+ IN VOID *Table,
+ IN UINTN TableSize
);
-/**
- Function prototype for protocol install notification.
-
- @param[in] Protocol Points to the protocol's unique identifier.
- @param[in] Interface Points to the interface instance.
- @param[in] Handle The handle on which the interface was installed.
-
- @return Status Code
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_NOTIFY_FN)(
- IN CONST EFI_GUID *Protocol,
- IN VOID *Interface,
- IN EFI_HANDLE Handle
- );
-
-/**
- Register a callback function be called when a particular protocol interface is installed.
-
- 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 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
-(EFIAPI *EFI_SMM_REGISTER_PROTOCOL_NOTIFY)(
- IN CONST EFI_GUID *Protocol,
- IN EFI_SMM_NOTIFY_FN Function,
- OUT VOID **Registration
- );
-
-/**
- Manage SMI of a particular type.
-
- @param[in] HandlerType Points to the handler type or NULL for root SMI handlers.
- @param[in] Context Points to an optional context buffer.
- @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_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_NOT_FOUND Interrupt source was not handled or quiesced.
- @retval EFI_SUCCESS Interrupt source was handled and quiesced.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_INTERRUPT_MANAGE)(
- IN CONST EFI_GUID *HandlerType,
- IN CONST VOID *Context OPTIONAL,
- IN OUT VOID *CommBuffer OPTIONAL,
- IN OUT UINTN *CommBufferSize OPTIONAL
- );
-
-/**
- Main entry point for an SMM handler dispatch or communicate-based callback.
-
- @param[in] DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister().
- @param[in] Context Points to an optional handler context which was specified when the
- handler was registered.
- @param[in,out] CommBuffer A pointer to a collection of data in memory that will
- be conveyed from a non-SMM environment into an SMM environment.
- @param[in,out] CommBufferSize The size of the CommBuffer.
-
- @retval EFI_SUCCESS The interrupt was handled and quiesced. No other handlers
- should still be called.
- @retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED The interrupt has been quiesced but other handlers should
- still be called.
- @retval EFI_WARN_INTERRUPT_SOURCE_PENDING The interrupt is still pending and other handlers should still
- be called.
- @retval EFI_INTERRUPT_PENDING The interrupt could not be quiesced.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_HANDLER_ENTRY_POINT2)(
- IN EFI_HANDLE DispatchHandle,
- IN CONST VOID *Context OPTIONAL,
- IN OUT VOID *CommBuffer OPTIONAL,
- IN OUT UINTN *CommBufferSize OPTIONAL
- );
-
-/**
- Registers a handler to execute within SMM.
-
- @param[in] Handler Handler service function pointer.
- @param[in] HandlerType Points to the handler type or NULL for root SMI handlers.
- @param[out] DispatchHandle On return, contains a unique handle which can be used to later
- unregister the handler function.
-
- @retval EFI_SUCCESS SMI handler added successfully.
- @retval EFI_INVALID_PARAMETER Handler is NULL or DispatchHandle is NULL.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_INTERRUPT_REGISTER)(
- IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
- IN CONST EFI_GUID *HandlerType OPTIONAL,
- OUT EFI_HANDLE *DispatchHandle
- );
-
-/**
- Unregister a handler in SMM.
-
- @param[in] DispatchHandle The handle that was specified when the handler was registered.
-
- @retval EFI_SUCCESS Handler function was successfully unregistered.
- @retval EFI_INVALID_PARAMETER DispatchHandle does not refer to a valid handle.
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EFI_SMM_INTERRUPT_UNREGISTER)(
- IN EFI_HANDLE DispatchHandle
- );
+typedef EFI_MM_STARTUP_THIS_AP EFI_SMM_STARTUP_THIS_AP;
+typedef EFI_MM_NOTIFY_FN EFI_SMM_NOTIFY_FN;
+typedef EFI_MM_REGISTER_PROTOCOL_NOTIFY EFI_SMM_REGISTER_PROTOCOL_NOTIFY;
+typedef EFI_MM_INTERRUPT_MANAGE EFI_SMM_INTERRUPT_MANAGE;
+typedef EFI_MM_HANDLER_ENTRY_POINT EFI_SMM_HANDLER_ENTRY_POINT2;
+typedef EFI_MM_INTERRUPT_REGISTER EFI_SMM_INTERRUPT_REGISTER;
+typedef EFI_MM_INTERRUPT_UNREGISTER EFI_SMM_INTERRUPT_UNREGISTER;
///
/// Processor information and functionality needed by SMM Foundation.