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 - 2018, Intel Corporation. All rights reserved.<BR>
12 SPDX-License-Identifier: BSD-2-Clause-Patent
14 @par Revision Reference:
15 This Protocol is defined in Framework of EFI SMM Core Interface Spec
20 #ifndef _SMM_CONTROL_H_
21 #define _SMM_CONTROL_H_
24 typedef struct _EFI_SMM_CONTROL_PROTOCOL EFI_SMM_CONTROL_PROTOCOL
;
26 #define EFI_SMM_CONTROL_PROTOCOL_GUID \
28 0x8d12e231, 0xc667, 0x4fd1, {0x98, 0xf2, 0x24, 0x49, 0xa7, 0xe7, 0xb2, 0xe5 } \
31 // SMM Access specification Data Structures
35 /// Describes the I/O location of the particular port that engendered the synchronous
36 /// SMI. For example, this location can include but is not limited to the traditional
37 /// PCAT* APM port of 0B2h.
39 UINT8 SmiTriggerRegister
;
41 /// Describes the value that was written to the respective activation port.
43 UINT8 SmiDataRegister
;
44 } EFI_SMM_CONTROL_REGISTER
;
47 // SMM Control specification member function
50 Invokes SMI activation from either the preboot or runtime environment.
52 @param This The EFI_SMM_CONTROL_PROTOCOL instance.
53 @param ArgumentBuffer The optional sized data to pass into the protocol activation.
54 @param ArgumentBufferSize The optional size of the data.
55 @param Periodic An optional mechanism to periodically repeat activation.
56 @param ActivationInterval An optional parameter to repeat at this period one
57 time or, if the Periodic Boolean is set, periodically.
59 @retval EFI_SUCCESS The SMI/PMI has been engendered.
60 @retval EFI_DEVICE_ERROR The timing is unsupported.
61 @retval EFI_INVALID_PARAMETER The activation period is unsupported.
62 @retval EFI_NOT_STARTED The SMM base service has not been initialized.
67 (EFIAPI
*EFI_SMM_ACTIVATE
)(
68 IN EFI_SMM_CONTROL_PROTOCOL
*This
,
69 IN OUT INT8
*ArgumentBuffer OPTIONAL
,
70 IN OUT UINTN
*ArgumentBufferSize OPTIONAL
,
71 IN BOOLEAN Periodic OPTIONAL
,
72 IN UINTN ActivationInterval OPTIONAL
76 Clears any system state that was created in response to the Active call.
78 @param This The EFI_SMM_CONTROL_PROTOCOL instance.
79 @param Periodic Optional parameter to repeat at this period one
80 time or, if the Periodic Boolean is set, periodically.
82 @retval EFI_SUCCESS The SMI/PMI has been engendered.
83 @retval EFI_DEVICE_ERROR The source could not be cleared.
84 @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.
89 (EFIAPI
*EFI_SMM_DEACTIVATE
)(
90 IN EFI_SMM_CONTROL_PROTOCOL
*This
,
91 IN BOOLEAN Periodic OPTIONAL
95 Provides information on the source register used to generate the SMI.
97 @param This The EFI_SMM_CONTROL_PROTOCOL instance.
98 @param SmiRegister A pointer to the SMI register description structure.
100 @retval EFI_SUCCESS The register structure has been returned.
101 @retval EFI_DEVICE_ERROR The source could not be cleared.
102 @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.
107 (EFIAPI
*EFI_SMM_GET_REGISTER_INFO
)(
108 IN EFI_SMM_CONTROL_PROTOCOL
*This
,
109 IN OUT EFI_SMM_CONTROL_REGISTER
*SmiRegister
113 @par Protocol Description:
114 This protocol is used to initiate SMI/PMI activations.
117 Initiates the SMI/PMI activation.
120 Quiesces the SMI/PMI activation.
122 @param GetRegisterInfo
123 Provides data on the register used as the source of the SMI.
125 @param MinimumTriggerPeriod
126 Minimum interval at which the platform can set the period.
128 @retval EFI_SUCCESS The register structure has been returned.
132 // SMM Control Protocol
135 This protocol is used to initiate SMI/PMI activations.
136 This protocol could be published by either:
137 - A processor driver to abstract the SMI/PMI IPI.
138 - The driver that abstracts the ASIC that is supporting the APM port, such as the ICH in an Intel chipset.
139 Because of the possibility of performing SMI or PMI IPI transactions, the ability to generate this.
141 The EFI_SMM_CONTROL_PROTOCOL is used by the platform chipset or processor driver. This
142 protocol is usable both in boot services and at runtime. The runtime aspect enables an
143 implementation of EFI_SMM_BASE_PROTOCOL.Communicate() to layer upon this service
144 and provide an SMI callback from a general EFI runtime driver.
145 This protocol provides an abstraction to the platform hardware that generates an
146 SMI or PMI. There are often I/O ports that, when accessed, will engender the SMI or PMI.
147 Also, this hardware optionally supports the periodic genearation of these signals.
150 struct _EFI_SMM_CONTROL_PROTOCOL
{
152 /// Initiates the SMI/PMI activation.
154 EFI_SMM_ACTIVATE Trigger
;
156 /// Quiesces the SMI/PMI activation.
158 EFI_SMM_DEACTIVATE Clear
;
160 /// Provides data on the register used as the source of the SMI.
162 EFI_SMM_GET_REGISTER_INFO GetRegisterInfo
;
164 /// Minimum interval at which the platform can set the period. A maximum is not
165 /// specified in that the SMM infrastructure code can emulate a maximum interval that is
166 /// greater than the hardware capabilities by using software emulation in the SMM
167 /// infrastructure code.
169 UINTN MinimumTriggerPeriod
;
172 extern EFI_GUID gEfiSmmControlProtocolGuid
;