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