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