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

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

diff --git a/MdePkg/Include/Protocol/SmmBase2.h b/MdePkg/Include/Protocol/SmmBase2.h
new file mode 100644 (file)
index 0000000..dc1b218
--- /dev/null
@@ -0,0 +1,87 @@
+/** @file\r
+  EFI SMM Base2 Protocol as defined in the PI 1.2 specification.\r
+\r
+  This protocol is utilized by all SMM drivers to locate the SMM infrastructure services and determine\r
+  whether the driver is being invoked inside SMRAM or outside of SMRAM.\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_BASE2_H_\r
+#define _SMM_BASE2_H_\r
+\r
+#include <Pi/PiSmmCis.h>\r
+\r
+#define EFI_SMM_BASE2_PROTOCOL_GUID \\r
+  { \\r
+    0xf4ccbfb7, 0xf6e0, 0x47fd, {0x9d, 0xd4, 0x10, 0xa8, 0xf1, 0x50, 0xc1, 0x91 }  \\r
+  }\r
+\r
+typedef struct _EFI_SMM_BASE2_PROTOCOL  EFI_SMM_BASE2_PROTOCOL;\r
+\r
+/**\r
+  Service to indicate whether the driver is currently executing in the SMM Initialization phase.\r
+  \r
+  This service is used to indicate whether the driver is currently executing in the SMM Initialization \r
+  phase. For SMM drivers, this will return TRUE in InSmram while inside the driver's entry point and \r
+  otherwise FALSE. For combination SMM/DXE drivers, this will return FALSE in the DXE launch. For the\r
+  SMM launch, it behaves as an SMM driver.\r
+\r
+  @param[in]  This               The EFI_SMM_BASE2_PROTOCOL instance. \r
+  @param[out] InSmram            Pointer to a Boolean which, on return, indicates that the driver is\r
+                                 currently executing inside of SMRAM (TRUE) or outside of SMRAM (FALSE).\r
+\r
+  @retval EFI_SUCCESS            The call returned successfully.\r
+  @retval EFI_INVALID_PARAMETER  InSmram was NULL.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SMM_INSIDE_OUT)(\r
+  IN CONST EFI_SMM_BASE2_PROTOCOL  *This,\r
+  OUT BOOLEAN                      *InSmram\r
+  )\r
+;\r
+\r
+/**\r
+  Returns the location of the System Management Service Table (SMST).\r
+\r
+  This function returns the location of the System Management Service Table (SMST).  The use of the \r
+  API is such that a driver can discover the location of the SMST in its entry point and then cache it in \r
+  some driver global variable so that the SMST can be invoked in subsequent handlers.\r
+\r
+  @param[in]     This            The EFI_SMM_BASE2_PROTOCOL instance.\r
+  @param[in,out] Smst            On return, points to a pointer to the System Management Service Table (SMST).\r
+\r
+  @retval EFI_SUCCESS            The operation was successful.\r
+  @retval EFI_INVALID_PARAMETER  Smst was invalid.\r
+  @retval EFI_UNSUPPORTED        Not in SMM.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *EFI_SMM_GET_SMST_LOCATION)(\r
+  IN CONST EFI_SMM_BASE2_PROTOCOL  *This,\r
+  IN OUT EFI_SMM_SYSTEM_TABLE      **Smst\r
+  )\r
+;\r
+\r
+///\r
+/// EFI SMM Base2 Protocol is utilized by all SMM drivers to locate the SMM infrastructure\r
+/// services and determine whether the driver is being invoked inside SMRAM or outside of SMRAM.\r
+///\r
+struct _EFI_SMM_BASE2_PROTOCOL {\r
+  EFI_SMM_INSIDE_OUT         InSmm;\r
+  EFI_SMM_GET_SMST_LOCATION  GetSmstLocation;\r
+};\r
+\r
+extern EFI_GUID gEfiSmmBase2ProtocolGuid;\r
+\r
+#endif\r
+\r
index b6c7ac37a430940901da8c33adf26e883d59c689..a0c8c6823001b6a035b4eb3d179ffe3515087055 100644 (file)
   ## Include/Protocol/SmmCpuIo.h\r
   gEfiSmmCpuIoProtocolGuid        = { 0x3242a9d8, 0xce70, 0x4aa0, { 0x95, 0x5d, 0x5e, 0x7b, 0x14, 0x0d, 0xe4, 0xd2 }}\r
 \r
+  ## Include/Protocol/SmmBase2.h\r
+  gEfiSmmBase2ProtocolGuid        = { 0xf4ccbfb7, 0xf6e0, 0x47fd, {0x9d, 0xd4, 0x10, 0xa8, 0xf1, 0x50, 0xc1, 0x91 }}\r
+\r
   #\r
   # Protocols defined in UEFI2.1/UEFI2.0/EFI1.1\r
   #\r