1 | /** @file
|
---|
2 | EFI SMM Base2 Protocol as defined in the PI 1.2 specification.
|
---|
3 |
|
---|
4 | This protocol is utilized by all SMM drivers to locate the SMM infrastructure services and determine
|
---|
5 | whether the driver is being invoked inside SMRAM or outside of SMRAM.
|
---|
6 |
|
---|
7 | Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
---|
8 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
9 |
|
---|
10 | **/
|
---|
11 |
|
---|
12 | #ifndef _SMM_BASE2_H_
|
---|
13 | #define _SMM_BASE2_H_
|
---|
14 |
|
---|
15 | #include <Pi/PiSmmCis.h>
|
---|
16 | #include <Protocol/MmBase.h>
|
---|
17 |
|
---|
18 | #define EFI_SMM_BASE2_PROTOCOL_GUID EFI_MM_BASE_PROTOCOL_GUID
|
---|
19 |
|
---|
20 | typedef struct _EFI_SMM_BASE2_PROTOCOL EFI_SMM_BASE2_PROTOCOL;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | Service to indicate whether the driver is currently executing in the SMM Initialization phase.
|
---|
24 |
|
---|
25 | This service is used to indicate whether the driver is currently executing in the SMM Initialization
|
---|
26 | phase. For SMM drivers, this will return TRUE in InSmram while inside the driver's entry point and
|
---|
27 | otherwise FALSE. For combination SMM/DXE drivers, this will return FALSE in the DXE launch. For the
|
---|
28 | SMM launch, it behaves as an SMM driver.
|
---|
29 |
|
---|
30 | @param[in] This The EFI_SMM_BASE2_PROTOCOL instance.
|
---|
31 | @param[out] InSmram Pointer to a Boolean which, on return, indicates that the driver is
|
---|
32 | currently executing inside of SMRAM (TRUE) or outside of SMRAM (FALSE).
|
---|
33 |
|
---|
34 | @retval EFI_SUCCESS The call returned successfully.
|
---|
35 | @retval EFI_INVALID_PARAMETER InSmram was NULL.
|
---|
36 | **/
|
---|
37 | typedef
|
---|
38 | EFI_STATUS
|
---|
39 | (EFIAPI *EFI_SMM_INSIDE_OUT2)(
|
---|
40 | IN CONST EFI_SMM_BASE2_PROTOCOL *This,
|
---|
41 | OUT BOOLEAN *InSmram
|
---|
42 | )
|
---|
43 | ;
|
---|
44 |
|
---|
45 | /**
|
---|
46 | Returns the location of the System Management Service Table (SMST).
|
---|
47 |
|
---|
48 | This function returns the location of the System Management Service Table (SMST). The use of the
|
---|
49 | API is such that a driver can discover the location of the SMST in its entry point and then cache it in
|
---|
50 | some driver global variable so that the SMST can be invoked in subsequent handlers.
|
---|
51 |
|
---|
52 | @param[in] This The EFI_SMM_BASE2_PROTOCOL instance.
|
---|
53 | @param[in,out] Smst On return, points to a pointer to the System Management Service Table (SMST).
|
---|
54 |
|
---|
55 | @retval EFI_SUCCESS The operation was successful.
|
---|
56 | @retval EFI_INVALID_PARAMETER Smst was invalid.
|
---|
57 | @retval EFI_UNSUPPORTED Not in SMM.
|
---|
58 | **/
|
---|
59 | typedef
|
---|
60 | EFI_STATUS
|
---|
61 | (EFIAPI *EFI_SMM_GET_SMST_LOCATION2)(
|
---|
62 | IN CONST EFI_SMM_BASE2_PROTOCOL *This,
|
---|
63 | IN OUT EFI_SMM_SYSTEM_TABLE2 **Smst
|
---|
64 | )
|
---|
65 | ;
|
---|
66 |
|
---|
67 | ///
|
---|
68 | /// EFI SMM Base2 Protocol is utilized by all SMM drivers to locate the SMM infrastructure
|
---|
69 | /// services and determine whether the driver is being invoked inside SMRAM or outside of SMRAM.
|
---|
70 | ///
|
---|
71 | struct _EFI_SMM_BASE2_PROTOCOL {
|
---|
72 | EFI_SMM_INSIDE_OUT2 InSmm;
|
---|
73 | EFI_SMM_GET_SMST_LOCATION2 GetSmstLocation;
|
---|
74 | };
|
---|
75 |
|
---|
76 | extern EFI_GUID gEfiSmmBase2ProtocolGuid;
|
---|
77 |
|
---|
78 | #endif
|
---|