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