--- /dev/null
+/** @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
## 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