]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/MmControl.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Protocol / MmControl.h
CommitLineData
07c6a47e
ED
1/** @file\r
2 EFI MM Control Protocol as defined in the PI 1.5 specification.\r
3\r
4 This protocol is used initiate synchronous MMI activations. This protocol could be published by a\r
5 processor driver to abstract the MMI IPI or a driver which abstracts the ASIC that is supporting the\r
6 APM port. Because of the possibility of performing MMI IPI transactions, the ability to generate this\r
7 event from a platform chipset agent is an optional capability for both IA-32 and x64-based systems.\r
8\r
9 The EFI_MM_CONTROL_PROTOCOL is produced by a runtime driver. It provides an\r
10 abstraction of the platform hardware that generates an MMI. There are often I/O ports that, when\r
11 accessed, will generate the MMI. Also, the hardware optionally supports the periodic generation of\r
12 these signals.\r
13\r
14 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
9344f092 15 SPDX-License-Identifier: BSD-2-Clause-Patent\r
07c6a47e
ED
16\r
17**/\r
18\r
19#ifndef _MM_CONTROL_H_\r
20#define _MM_CONTROL_H_\r
21\r
22#include <PiDxe.h>\r
23\r
24#define EFI_MM_CONTROL_PROTOCOL_GUID \\r
25 { \\r
26 0x843dc720, 0xab1e, 0x42cb, {0x93, 0x57, 0x8a, 0x0, 0x78, 0xf3, 0x56, 0x1b} \\r
27 }\r
28\r
29typedef struct _EFI_MM_CONTROL_PROTOCOL EFI_MM_CONTROL_PROTOCOL;\r
30typedef UINTN EFI_MM_PERIOD;\r
31\r
32/**\r
33 Invokes MMI activation from either the preboot or runtime environment.\r
34\r
35 This function generates an MMI.\r
36\r
37 @param[in] This The EFI_MM_CONTROL_PROTOCOL instance.\r
38 @param[in,out] CommandPort The value written to the command port.\r
39 @param[in,out] DataPort The value written to the data port.\r
40 @param[in] Periodic Optional mechanism to engender a periodic stream.\r
41 @param[in] ActivationInterval Optional parameter to repeat at this period one\r
42 time or, if the Periodic Boolean is set, periodically.\r
43\r
44 @retval EFI_SUCCESS The MMI/PMI has been engendered.\r
45 @retval EFI_DEVICE_ERROR The timing is unsupported.\r
46 @retval EFI_INVALID_PARAMETER The activation period is unsupported.\r
47 @retval EFI_INVALID_PARAMETER The last periodic activation has not been cleared.\r
48 @retval EFI_NOT_STARTED The MM base service has not been initialized.\r
49**/\r
50typedef\r
51EFI_STATUS\r
52(EFIAPI *EFI_MM_ACTIVATE)(\r
53 IN CONST EFI_MM_CONTROL_PROTOCOL *This,\r
54 IN OUT UINT8 *CommandPort OPTIONAL,\r
55 IN OUT UINT8 *DataPort OPTIONAL,\r
56 IN BOOLEAN Periodic OPTIONAL,\r
57 IN UINTN ActivationInterval OPTIONAL\r
58 );\r
59\r
60/**\r
61 Clears any system state that was created in response to the Trigger() call.\r
62\r
63 This function acknowledges and causes the deassertion of the MMI activation source.\r
64\r
65 @param[in] This The EFI_MM_CONTROL_PROTOCOL instance.\r
66 @param[in] Periodic Optional parameter to repeat at this period one time\r
67\r
68 @retval EFI_SUCCESS The MMI/PMI has been engendered.\r
69 @retval EFI_DEVICE_ERROR The source could not be cleared.\r
70 @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.\r
71**/\r
72typedef\r
73EFI_STATUS\r
74(EFIAPI *EFI_MM_DEACTIVATE)(\r
75 IN CONST EFI_MM_CONTROL_PROTOCOL *This,\r
76 IN BOOLEAN Periodic OPTIONAL\r
77 );\r
78\r
79///\r
80/// The EFI_MM_CONTROL_PROTOCOL is produced by a runtime driver. It provides an\r
81/// abstraction of the platform hardware that generates an MMI. There are often I/O ports that, when\r
82/// accessed, will generate the MMI. Also, the hardware optionally supports the periodic generation of\r
83/// these signals.\r
84///\r
85struct _EFI_MM_CONTROL_PROTOCOL {\r
86 EFI_MM_ACTIVATE Trigger;\r
87 EFI_MM_DEACTIVATE Clear;\r
88 ///\r
89 /// Minimum interval at which the platform can set the period. A maximum is not\r
90 /// specified in that the MM infrastructure code can emulate a maximum interval that is\r
91 /// greater than the hardware capabilities by using software emulation in the MM\r
92 /// infrastructure code.\r
93 ///\r
94 EFI_MM_PERIOD MinimumTriggerPeriod;\r
95};\r
96\r
97extern EFI_GUID gEfiMmControlProtocolGuid;\r
98\r
99#endif\r
100\r