]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/SmmBase2.h
MdePkg/Include/Protocol/Tls.h: pack structures from the TLS RFC
[mirror_edk2.git] / MdePkg / Include / Protocol / SmmBase2.h
CommitLineData
2a452a56 1/** @file\r
2 EFI SMM Base2 Protocol as defined in the PI 1.2 specification.\r
3\r
4 This protocol is utilized by all SMM drivers to locate the SMM infrastructure services and determine\r
5 whether the driver is being invoked inside SMRAM or outside of SMRAM.\r
6\r
2f208e59 7 Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
9df063a0 8 This program and the accompanying materials \r
2a452a56 9 are licensed and made available under the terms and conditions of the BSD License \r
10 which accompanies this distribution. The full text of the license may be found at \r
11 http://opensource.org/licenses/bsd-license.php \r
12\r
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
15\r
16**/\r
17\r
18#ifndef _SMM_BASE2_H_\r
19#define _SMM_BASE2_H_\r
20\r
21#include <Pi/PiSmmCis.h>\r
2f208e59 22#include <Protocol/MmBase.h>\r
2a452a56 23\r
2f208e59 24#define EFI_SMM_BASE2_PROTOCOL_GUID EFI_MM_BASE_PROTOCOL_GUID\r
2a452a56 25\r
26typedef struct _EFI_SMM_BASE2_PROTOCOL EFI_SMM_BASE2_PROTOCOL;\r
27\r
28/**\r
29 Service to indicate whether the driver is currently executing in the SMM Initialization phase.\r
30 \r
31 This service is used to indicate whether the driver is currently executing in the SMM Initialization \r
32 phase. For SMM drivers, this will return TRUE in InSmram while inside the driver's entry point and \r
33 otherwise FALSE. For combination SMM/DXE drivers, this will return FALSE in the DXE launch. For the\r
34 SMM launch, it behaves as an SMM driver.\r
35\r
36 @param[in] This The EFI_SMM_BASE2_PROTOCOL instance. \r
37 @param[out] InSmram Pointer to a Boolean which, on return, indicates that the driver is\r
38 currently executing inside of SMRAM (TRUE) or outside of SMRAM (FALSE).\r
39\r
40 @retval EFI_SUCCESS The call returned successfully.\r
41 @retval EFI_INVALID_PARAMETER InSmram was NULL.\r
42**/\r
43typedef\r
44EFI_STATUS\r
d64527e5 45(EFIAPI *EFI_SMM_INSIDE_OUT2)(\r
2a452a56 46 IN CONST EFI_SMM_BASE2_PROTOCOL *This,\r
47 OUT BOOLEAN *InSmram\r
48 )\r
49;\r
50\r
51/**\r
52 Returns the location of the System Management Service Table (SMST).\r
53\r
54 This function returns the location of the System Management Service Table (SMST). The use of the \r
55 API is such that a driver can discover the location of the SMST in its entry point and then cache it in \r
56 some driver global variable so that the SMST can be invoked in subsequent handlers.\r
57\r
58 @param[in] This The EFI_SMM_BASE2_PROTOCOL instance.\r
59 @param[in,out] Smst On return, points to a pointer to the System Management Service Table (SMST).\r
60\r
61 @retval EFI_SUCCESS The operation was successful.\r
62 @retval EFI_INVALID_PARAMETER Smst was invalid.\r
63 @retval EFI_UNSUPPORTED Not in SMM.\r
64**/\r
65typedef\r
66EFI_STATUS\r
d64527e5 67(EFIAPI *EFI_SMM_GET_SMST_LOCATION2)(\r
2a452a56 68 IN CONST EFI_SMM_BASE2_PROTOCOL *This,\r
f981c39b 69 IN OUT EFI_SMM_SYSTEM_TABLE2 **Smst\r
2a452a56 70 )\r
71;\r
72\r
73///\r
74/// EFI SMM Base2 Protocol is utilized by all SMM drivers to locate the SMM infrastructure\r
75/// services and determine whether the driver is being invoked inside SMRAM or outside of SMRAM.\r
76///\r
77struct _EFI_SMM_BASE2_PROTOCOL {\r
d64527e5 78 EFI_SMM_INSIDE_OUT2 InSmm;\r
79 EFI_SMM_GET_SMST_LOCATION2 GetSmstLocation;\r
2a452a56 80};\r
81\r
82extern EFI_GUID gEfiSmmBase2ProtocolGuid;\r
83\r
84#endif\r
85\r