]>
Commit | Line | Data |
---|---|---|
79964ac8 | 1 | /** @file\r |
2 | This file declares SMM Control abstraction protocol.\r | |
8411f1c0 | 3 | This protocol is used initiate SMI/PMI activations. This protocol could be published by either of\r |
4 | the following:\r | |
5 | - A processor driver to abstract the SMI/PMI IPI\r | |
6 | - The driver that abstracts the ASIC that is supporting the APM port, such as the ICH in an\r | |
0b34b869 | 7 | Intel chipset\r |
8411f1c0 | 8 | Because of the possibility of performing SMI or PMI IPI transactions, the ability to generate this\r |
0b34b869 | 9 | event from a platform chipset agent is an optional capability for both IA-32 and Itanium based\r |
8411f1c0 | 10 | systems.\r |
79964ac8 | 11 | \r |
053d9774 | 12 | Copyright (c) 2007,2009 Intel Corporation\r |
79964ac8 | 13 | All rights reserved. This program and the accompanying materials\r |
14 | are licensed and made available under the terms and conditions of the BSD License\r | |
15 | which accompanies this distribution. The full text of the license may be found at\r | |
16 | http://opensource.org/licenses/bsd-license.php\r | |
17 | \r | |
18 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
19 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
20 | \r | |
79964ac8 | 21 | @par Revision Reference:\r |
22 | This Protocol is defined in Framework of EFI SMM Core Interface Spec\r | |
23 | Version 0.9.\r | |
24 | \r | |
25 | **/\r | |
26 | \r | |
27 | #ifndef _SMM_CONTROL_H_\r | |
28 | #define _SMM_CONTROL_H_\r | |
29 | \r | |
b80fbe85 | 30 | \r |
79964ac8 | 31 | typedef struct _EFI_SMM_CONTROL_PROTOCOL EFI_SMM_CONTROL_PROTOCOL;\r |
32 | \r | |
33 | #define EFI_SMM_CONTROL_PROTOCOL_GUID \\r | |
34 | { \\r | |
35 | 0x8d12e231, 0xc667, 0x4fd1, {0x98, 0xf2, 0x24, 0x49, 0xa7, 0xe7, 0xb2, 0xe5 } \\r | |
36 | }\r | |
700a7869 | 37 | //\r |
79964ac8 | 38 | // SMM Access specification Data Structures\r |
39 | //\r | |
40 | typedef struct {\r | |
412fb9ef | 41 | /// \r |
42 | /// Describes the I/O location of the particular port that engendered the synchronous\r | |
43 | /// SMI. For example, this location can include but is not limited to the traditional \r | |
44 | /// PCAT* APM port of 0B2h.\r | |
45 | ///\r | |
79964ac8 | 46 | UINT8 SmiTriggerRegister;\r |
412fb9ef | 47 | ///\r |
48 | /// Describes the value that was written to the respective activation port.\r | |
49 | ///\r | |
79964ac8 | 50 | UINT8 SmiDataRegister;\r |
51 | } EFI_SMM_CONTROL_REGISTER;\r | |
52 | \r | |
53 | //\r | |
54 | // SMM Control specification member function\r | |
55 | //\r | |
56 | /**\r | |
57 | Invokes SMI activation from either the preboot or runtime environment.\r | |
58 | \r | |
59 | @param This The EFI_SMM_CONTROL_PROTOCOL instance.\r | |
60 | @param ArgumentBuffer Optional sized data to pass into the protocol activation.\r | |
61 | @param ArgumentBufferSize Optional size of the data.\r | |
62 | @param Periodic Optional mechanism to engender a periodic stream.\r | |
63 | @param ActivationInterval Optional parameter to repeat at this period one\r | |
64 | time or, if the Periodic Boolean is set, periodically.\r | |
65 | \r | |
66 | @retval EFI_SUCCESS The SMI/PMI has been engendered.\r | |
67 | @retval EFI_DEVICE_ERROR The timing is unsupported.\r | |
68 | @retval EFI_INVALID_PARAMETER The activation period is unsupported.\r | |
69 | @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r | |
70 | \r | |
71 | **/\r | |
72 | typedef\r | |
73 | EFI_STATUS\r | |
69686d56 | 74 | (EFIAPI *EFI_SMM_ACTIVATE)(\r |
79964ac8 | 75 | IN EFI_SMM_CONTROL_PROTOCOL *This,\r |
76 | IN OUT INT8 *ArgumentBuffer OPTIONAL,\r | |
77 | IN OUT UINTN *ArgumentBufferSize OPTIONAL,\r | |
78 | IN BOOLEAN Periodic OPTIONAL,\r | |
79 | IN UINTN ActivationInterval OPTIONAL\r | |
80 | );\r | |
81 | \r | |
82 | /**\r | |
83 | Clears any system state that was created in response to the Active call.\r | |
84 | \r | |
85 | @param This The EFI_SMM_CONTROL_PROTOCOL instance.\r | |
700a7869 | 86 | @param Periodic Optional parameter to repeat at this period one \r |
87 | time or, if the Periodic Boolean is set, periodically.\r | |
79964ac8 | 88 | \r |
89 | @retval EFI_SUCCESS The SMI/PMI has been engendered.\r | |
90 | @retval EFI_DEVICE_ERROR The source could not be cleared.\r | |
91 | @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.\r | |
92 | \r | |
93 | **/\r | |
94 | typedef\r | |
95 | EFI_STATUS\r | |
69686d56 | 96 | (EFIAPI *EFI_SMM_DEACTIVATE)(\r |
79964ac8 | 97 | IN EFI_SMM_CONTROL_PROTOCOL *This,\r |
98 | IN BOOLEAN Periodic OPTIONAL\r | |
99 | );\r | |
100 | \r | |
101 | /**\r | |
102 | Provides information on the source register used to generate the SMI.\r | |
103 | \r | |
104 | @param This The EFI_SMM_CONTROL_PROTOCOL instance.\r | |
105 | @param SmiRegister Pointer to the SMI register description structure\r | |
106 | \r | |
107 | @retval EFI_SUCCESS The register structure has been returned.\r | |
412fb9ef | 108 | @retval EFI_DEVICE_ERROR The source could not be cleared.\r |
109 | @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.\r | |
79964ac8 | 110 | \r |
111 | **/\r | |
112 | typedef\r | |
113 | EFI_STATUS\r | |
69686d56 | 114 | (EFIAPI *EFI_SMM_GET_REGISTER_INFO)(\r |
79964ac8 | 115 | IN EFI_SMM_CONTROL_PROTOCOL *This,\r |
116 | IN OUT EFI_SMM_CONTROL_REGISTER *SmiRegister\r | |
117 | );\r | |
118 | \r | |
119 | /**\r | |
120 | @par Protocol Description:\r | |
121 | This protocol is used initiate SMI/PMI activations.\r | |
122 | \r | |
123 | @param Trigger\r | |
124 | Initiates the SMI/PMI activation.\r | |
125 | \r | |
126 | @param Clear\r | |
127 | Quiesces the SMI/PMI activation.\r | |
128 | \r | |
129 | @param GetRegisterInfo\r | |
130 | Provides data on the register used as the source of the SMI.\r | |
131 | \r | |
132 | @param MinimumTriggerPeriod\r | |
133 | Minimum interval at which the platform can set the period.\r | |
134 | \r | |
412fb9ef | 135 | @retval EFI_SUCCESS The register structure has been returned.\r |
79964ac8 | 136 | **/\r |
137 | \r | |
053d9774 | 138 | //\r |
139 | // SMM Control Protocol\r | |
140 | //\r | |
141 | /**\r | |
412fb9ef | 142 | This protocol is used initiate SMI/PMI activations. \r |
143 | This protocol could be published by either of the following:\r | |
144 | - A processor driver to abstract the SMI/PMI IPI\r | |
c41da1c6 | 145 | - The driver that abstracts the ASIC that is supporting the APM port, such as the ICH in an Intel chipset\r |
412fb9ef | 146 | Because of the possibility of performing SMI or PMI IPI transactions, the ability to generate this\r |
053d9774 | 147 | \r |
412fb9ef | 148 | The EFI_SMM_CONTROL_PROTOCOL is used by the platform chipset or processor driver. This\r |
053d9774 | 149 | protocol is useable both in boot services and runtime. The runtime aspect is so that an\r |
150 | implementation of EFI_SMM_BASE_PROTOCOL.Communicate() can layer upon this service\r | |
151 | and provide an SMI callback from a general EFI runtime driver.\r | |
152 | The purpose of this protocol is to provide an abstraction to the platform hardware that generates an\r | |
153 | SMI or PMI. There are often I/O ports that, when accessed, will engender the\r | |
154 | **/\r | |
79964ac8 | 155 | struct _EFI_SMM_CONTROL_PROTOCOL {\r |
412fb9ef | 156 | ///\r |
157 | /// Initiates the SMI/PMI activation.\r | |
158 | ///\r | |
79964ac8 | 159 | EFI_SMM_ACTIVATE Trigger;\r |
412fb9ef | 160 | ///\r |
161 | /// Quiesces the SMI/PMI activation.\r | |
162 | ///\r | |
79964ac8 | 163 | EFI_SMM_DEACTIVATE Clear;\r |
412fb9ef | 164 | ///\r |
165 | /// Provides data on the register used as the source of the SMI.\r | |
166 | ///\r | |
79964ac8 | 167 | EFI_SMM_GET_REGISTER_INFO GetRegisterInfo;\r |
412fb9ef | 168 | ///\r |
169 | /// Minimum interval at which the platform can set the period. A maximum is not\r | |
170 | /// specified in that the SMM infrastructure code can emulate a maximum interval that is\r | |
171 | /// greater than the hardware capabilities by using software emulation in the SMM\r | |
172 | /// infrastructure code.\r | |
173 | ///\r | |
79964ac8 | 174 | UINTN MinimumTriggerPeriod;\r |
175 | };\r | |
176 | \r | |
177 | extern EFI_GUID gEfiSmmControlProtocolGuid;\r | |
178 | \r | |
179 | #endif\r |