]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationServices.h
MdeModulePkg PiSmmCoreMemoryAllocationLib: Get SMRAM ranges
[mirror_edk2.git] / MdeModulePkg / Library / PiSmmCoreMemoryAllocationLib / PiSmmCoreMemoryAllocationServices.h
index 5c74045039e43395c0138f1c372cd6e2db095274..6ae499b0dea4ebc9898df877731a015005fa8d3a 100644 (file)
 #ifndef _PI_SMM_CORE_MEMORY_ALLOCATION_SERVICES_H_\r
 #define _PI_SMM_CORE_MEMORY_ALLOCATION_SERVICES_H_\r
 \r
+//\r
+// It should be aligned with the definition in PiSmmCore.\r
+//\r
 typedef struct {\r
   UINTN                           Signature;\r
+\r
   ///\r
   /// The ImageHandle passed into the entry point of the SMM IPL.  This ImageHandle\r
   /// is used by the SMM Core to fill in the ParentImageHandle field of the Loaded\r
   /// Image Protocol for each SMM Driver that is dispatched by the SMM Core.\r
   ///\r
   EFI_HANDLE                      SmmIplImageHandle;\r
+\r
   ///\r
   /// The number of SMRAM ranges passed from the SMM IPL to the SMM Core.  The SMM\r
   /// Core uses these ranges of SMRAM to initialize the SMM Core memory manager.\r
   ///\r
   UINTN                           SmramRangeCount;\r
+\r
   ///\r
   /// A table of SMRAM ranges passed from the SMM IPL to the SMM Core.  The SMM\r
   /// Core uses these ranges of SMRAM to initialize the SMM Core memory manager.\r
   ///\r
   EFI_SMRAM_DESCRIPTOR            *SmramRanges;\r
+\r
+  ///\r
+  /// The SMM Foundation Entry Point.  The SMM Core fills in this field when the \r
+  /// SMM Core is initialized.  The SMM IPL is responsbile for registering this entry \r
+  /// point with the SMM Configuration Protocol.  The SMM Configuration Protocol may \r
+  /// not be available at the time the SMM IPL and SMM Core are started, so the SMM IPL\r
+  /// sets up a protocol notification on the SMM Configuration Protocol and registers \r
+  /// the SMM Foundation Entry Point as soon as the SMM Configuration Protocol is \r
+  /// available.\r
+  ///\r
+  EFI_SMM_ENTRY_POINT             SmmEntryPoint;\r
+  \r
+  ///\r
+  /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core.\r
+  /// \r
+  BOOLEAN                         SmmEntryPointRegistered;\r
+\r
+  ///\r
+  /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core.\r
+  /// \r
+  BOOLEAN                         InSmm;\r
+\r
+  ///\r
+  /// This field is set by the SMM Core then the SMM Core is initialized.  This field is\r
+  /// used by the SMM Base 2 Protocol and SMM Communication Protocol implementations in\r
+  /// the SMM IPL.  \r
+  ///\r
+  EFI_SMM_SYSTEM_TABLE2           *Smst;\r
+\r
+  ///\r
+  /// This field is used by the SMM Communicatioon Protocol to pass a buffer into \r
+  /// a software SMI handler and for the software SMI handler to pass a buffer back to\r
+  /// the caller of the SMM Communication Protocol.  \r
+  ///\r
+  VOID                            *CommunicationBuffer;\r
+\r
+  ///\r
+  /// This field is used by the SMM Communicatioon Protocol to pass the size of a buffer,\r
+  /// in bytes, into a software SMI handler and for the software SMI handler to pass the \r
+  /// size, in bytes, of a buffer back to the caller of the SMM Communication Protocol.\r
+  ///\r
+  UINTN                           BufferSize;\r
+\r
+  ///\r
+  /// This field is used by the SMM Communication Protocol to pass the return status from\r
+  /// a software SMI handler back to the caller of the SMM Communication Protocol.\r
+  ///\r
+  EFI_STATUS                      ReturnStatus;\r
+\r
+  EFI_PHYSICAL_ADDRESS            PiSmmCoreImageBase;\r
+  UINT64                          PiSmmCoreImageSize;\r
+  EFI_PHYSICAL_ADDRESS            PiSmmCoreEntryPoint;\r
+\r
+  UINTN                           FullSmramRangeCount;\r
+  EFI_SMRAM_DESCRIPTOR            *FullSmramRanges;\r
 } SMM_CORE_PRIVATE_DATA;\r
 \r
 /**\r