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