2 This file declares the SMM Control abstraction protocol.
3 This protocol is used to initiate SMI/PMI activations. This protocol could be published by either:
4 - A processor driver to abstract the SMI/PMI IPI
5 - The driver that abstracts the ASIC that is supporting the APM port, such as the ICH in an
7 Because of the possibility of performing SMI or PMI IPI transactions, the ability to generate this
8 event from a platform chipset agent is an optional capability for both IA-32 and Itanium-based
11 Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
12 This program and the accompanying materials are licensed and made available under
13 the terms and conditions of the BSD License that accompanies this distribution.
14 The full text of the license may be found at
15 http://opensource.org/licenses/bsd-license.php.
17 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
18 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 @par Revision Reference:
21 This Protocol is defined in Framework of EFI SMM Core Interface Spec
26 #ifndef _SMM_CONTROL_H_
27 #define _SMM_CONTROL_H_
30 typedef struct _EFI_SMM_CONTROL_PROTOCOL EFI_SMM_CONTROL_PROTOCOL
;
32 #define EFI_SMM_CONTROL_PROTOCOL_GUID \
34 0x8d12e231, 0xc667, 0x4fd1, {0x98, 0xf2, 0x24, 0x49, 0xa7, 0xe7, 0xb2, 0xe5 } \
37 // SMM Access specification Data Structures
41 /// Describes the I/O location of the particular port that engendered the synchronous
42 /// SMI. For example, this location can include but is not limited to the traditional
43 /// PCAT* APM port of 0B2h.
45 UINT8 SmiTriggerRegister
;
47 /// Describes the value that was written to the respective activation port.
49 UINT8 SmiDataRegister
;
50 } EFI_SMM_CONTROL_REGISTER
;
53 // SMM Control specification member function
56 Invokes SMI activation from either the preboot or runtime environment.
58 @param This The EFI_SMM_CONTROL_PROTOCOL instance.
59 @param ArgumentBuffer The optional sized data to pass into the protocol activation.
60 @param ArgumentBufferSize The optional size of the data.
61 @param Periodic An optional mechanism to periodically repeat activation.
62 @param ActivationInterval An optional parameter to repeat at this period one
63 time or, if the Periodic Boolean is set, periodically.
65 @retval EFI_SUCCESS The SMI/PMI has been engendered.
66 @retval EFI_DEVICE_ERROR The timing is unsupported.
67 @retval EFI_INVALID_PARAMETER The activation period is unsupported.
68 @retval EFI_NOT_STARTED The SMM base service has not been initialized.
73 (EFIAPI
*EFI_SMM_ACTIVATE
)(
74 IN EFI_SMM_CONTROL_PROTOCOL
*This
,
75 IN OUT INT8
*ArgumentBuffer OPTIONAL
,
76 IN OUT UINTN
*ArgumentBufferSize OPTIONAL
,
77 IN BOOLEAN Periodic OPTIONAL
,
78 IN UINTN ActivationInterval OPTIONAL
82 Clears any system state that was created in response to the Active call.
84 @param This The EFI_SMM_CONTROL_PROTOCOL instance.
85 @param Periodic Optional parameter to repeat at this period one
86 time or, if the Periodic Boolean is set, periodically.
88 @retval EFI_SUCCESS The SMI/PMI has been engendered.
89 @retval EFI_DEVICE_ERROR The source could not be cleared.
90 @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.
95 (EFIAPI
*EFI_SMM_DEACTIVATE
)(
96 IN EFI_SMM_CONTROL_PROTOCOL
*This
,
97 IN BOOLEAN Periodic OPTIONAL
101 Provides information on the source register used to generate the SMI.
103 @param This The EFI_SMM_CONTROL_PROTOCOL instance.
104 @param SmiRegister A pointer to the SMI register description structure.
106 @retval EFI_SUCCESS The register structure has been returned.
107 @retval EFI_DEVICE_ERROR The source could not be cleared.
108 @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.
113 (EFIAPI
*EFI_SMM_GET_REGISTER_INFO
)(
114 IN EFI_SMM_CONTROL_PROTOCOL
*This
,
115 IN OUT EFI_SMM_CONTROL_REGISTER
*SmiRegister
119 @par Protocol Description:
120 This protocol is used to initiate SMI/PMI activations.
123 Initiates the SMI/PMI activation.
126 Quiesces the SMI/PMI activation.
128 @param GetRegisterInfo
129 Provides data on the register used as the source of the SMI.
131 @param MinimumTriggerPeriod
132 Minimum interval at which the platform can set the period.
134 @retval EFI_SUCCESS The register structure has been returned.
138 // SMM Control Protocol
141 This protocol is used to initiate SMI/PMI activations.
142 This protocol could be published by either:
143 - A processor driver to abstract the SMI/PMI IPI.
144 - The driver that abstracts the ASIC that is supporting the APM port, such as the ICH in an Intel chipset.
145 Because of the possibility of performing SMI or PMI IPI transactions, the ability to generate this.
147 The EFI_SMM_CONTROL_PROTOCOL is used by the platform chipset or processor driver. This
148 protocol is usable both in boot services and at runtime. The runtime aspect enables an
149 implementation of EFI_SMM_BASE_PROTOCOL.Communicate() to layer upon this service
150 and provide an SMI callback from a general EFI runtime driver.
151 This protocol provides an abstraction to the platform hardware that generates an
152 SMI or PMI. There are often I/O ports that, when accessed, will engender the SMI or PMI.
153 Also, this hardware optionally supports the periodic genearation of these signals.
156 struct _EFI_SMM_CONTROL_PROTOCOL
{
158 /// Initiates the SMI/PMI activation.
160 EFI_SMM_ACTIVATE Trigger
;
162 /// Quiesces the SMI/PMI activation.
164 EFI_SMM_DEACTIVATE Clear
;
166 /// Provides data on the register used as the source of the SMI.
168 EFI_SMM_GET_REGISTER_INFO GetRegisterInfo
;
170 /// Minimum interval at which the platform can set the period. A maximum is not
171 /// specified in that the SMM infrastructure code can emulate a maximum interval that is
172 /// greater than the hardware capabilities by using software emulation in the SMM
173 /// infrastructure code.
175 UINTN MinimumTriggerPeriod
;
178 extern EFI_GUID gEfiSmmControlProtocolGuid
;