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