]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add into MdePkg definitions for EFI SMM Configuration Protocol as defined in the...
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 1 Sep 2009 06:41:02 +0000 (06:41 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 1 Sep 2009 06:41:02 +0000 (06:41 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9215 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Protocol/SmmConfiguration.h [new file with mode: 0644]
MdePkg/MdePkg.dec

diff --git a/MdePkg/Include/Protocol/SmmConfiguration.h b/MdePkg/Include/Protocol/SmmConfiguration.h
new file mode 100644 (file)
index 0000000..7312f02
--- /dev/null
@@ -0,0 +1,86 @@
+/** @file\r
+  EFI SMM Configuration Protocol as defined in the PI 1.2 specification.\r
+\r
+  This protocol is used to:\r
+  1) report the portions of SMRAM regions which cannot be used for the SMRAM heap.\r
+  2) register the SMM Foundation entry point with the processor code. The entry\r
+     point will be invoked by the SMM processor entry code.\r
+  \r
+  Copyright (c) 2009, 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_CONFIGURATION_H_\r
+#define _SMM_CONFIGURATION_H_\r
+\r
+#include <Pi/PiSmmCis.h>\r
+\r
+#define EFI_SMM_CONFIGURATION_PROTOCOL_GUID \\r
+  { \\r
+    0x26eeb3de, 0xb689, 0x492e, {0x80, 0xf0, 0xbe, 0x8b, 0xd7, 0xda, 0x4b, 0xa7 }  \\r
+  }\r
+\r
+///\r
+/// Structure describing a SMRAM region which cannot be used for the SMRAM heap.\r
+///\r
+typedef struct _EFI_SMM_RESERVED_SMRAM_REGION {\r
+  ///\r
+  /// Starting address of the reserved SMRAM area, as it appears while SMRAM is open. \r
+  /// Ignored if SmramReservedSize is 0.\r
+  ///\r
+  EFI_PHYSICAL_ADDRESS    SmramReservedStart;\r
+  ///\r
+  /// Number of bytes occupied by the reserved SMRAM area. A size of zero indicates the \r
+  /// last SMRAM area.\r
+  ///\r
+  UINT64                  SmramReservedSize;\r
+} EFI_SMM_RESERVED_SMRAM_REGION;\r
+\r
+typedef struct _EFI_SMM_CONFIGURATION_PROTOCOL  EFI_SMM_CONFIGURATION_PROTOCOL;\r
+\r
+/**\r
+  Register the SMM Foundation entry point.\r
+  \r
+  This function registers the SMM Foundation entry point with the processor code. This entry point \r
+  will be invoked by the SMM Processor entry code.\r
+\r
+  @param[in] This                The EFI_SMM_CONFIGURATION_PROTOCOL instance.\r
+  @param[in] SmmEntryPoint       SMM Foundation entry point.\r
+  \r
+  @retval EFI_SUCCESS            Success to register SMM Entry Point.\r
+  @retval EFI_INVALID_PARAMETER  SmmEntryPoint is NULL.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SMM_REGISTER_SMM_ENTRY)(\r
+  IN CONST EFI_SMM_CONFIGURATION_PROTOCOL  *This,\r
+  IN EFI_SMM_ENTRY_POINT                   SmmEntryPoint\r
+  );\r
+\r
+///\r
+/// The EFI SMM Configuration Protocol is a mandatory protocol published by a DXE CPU driver to\r
+/// indicate which areas within SMRAM are reserved for use by the CPU for any purpose, \r
+/// such as stack, save state or SMM entry point.\r
+///\r
+/// The RegisterSmmEntry() function allows the SMM IPL DXE driver to register the SMM \r
+/// Foundation entry point with the SMM entry vector code.\r
+///\r
+struct _EFI_SMM_CONFIGURATION_PROTOCOL {\r
+  ///\r
+  /// A pointer to an array SMRAM ranges used by the initial SMM entry code.\r
+  ///\r
+  EFI_SMM_RESERVED_SMRAM_REGION  *SmramReservedRegions;\r
+  EFI_SMM_REGISTER_SMM_ENTRY     RegisterSmmEntry;\r
+};\r
+\r
+extern EFI_GUID gEfiSmmConfigurationProtocolGuid;\r
+\r
+#endif\r
+\r
index 23de15f18d884ffde9b42182fa76a21d0aad131e..e17a9ac4af994024087b6a1eed13193222bbe294 100644 (file)
   ## Include/Protocol/SmmControl2.h\r
   gEfiSmmControl2ProtocolGuid     = { 0x843dc720, 0xab1e, 0x42cb, {0x93, 0x57, 0x8a, 0x0, 0x78, 0xf3, 0x56, 0x1b}}\r
 \r
+  ## Include/Protocol/SmmConfiguration.h\r
+  gEfiSmmConfigurationProtocolGuid= { 0x26eeb3de, 0xb689, 0x492e, {0x80, 0xf0, 0xbe, 0x8b, 0xd7, 0xda, 0x4b, 0xa7 }}\r
+\r
   #\r
   # Protocols defined in UEFI2.1/UEFI2.0/EFI1.1\r
   #\r