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
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
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
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
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.
21 Module Name: SmmControl.h
23 @par Revision Reference:
24 This Protocol is defined in Framework of EFI SMM Core Interface Spec
29 #ifndef _SMM_CONTROL_H_
30 #define _SMM_CONTROL_H_
34 typedef struct _EFI_SMM_CONTROL_PROTOCOL EFI_SMM_CONTROL_PROTOCOL
;
36 #define EFI_SMM_CONTROL_PROTOCOL_GUID \
38 0x8d12e231, 0xc667, 0x4fd1, {0x98, 0xf2, 0x24, 0x49, 0xa7, 0xe7, 0xb2, 0xe5 } \
41 // SMM Access specification Data Structures
45 /// Describes the I/O location of the particular port that engendered the synchronous
46 /// SMI. For example, this location can include but is not limited to the traditional
47 /// PCAT* APM port of 0B2h.
49 UINT8 SmiTriggerRegister
;
51 /// Describes the value that was written to the respective activation port.
53 UINT8 SmiDataRegister
;
54 } EFI_SMM_CONTROL_REGISTER
;
57 // SMM Control specification member function
60 Invokes SMI activation from either the preboot or runtime environment.
62 @param This The EFI_SMM_CONTROL_PROTOCOL instance.
63 @param ArgumentBuffer Optional sized data to pass into the protocol activation.
64 @param ArgumentBufferSize Optional size of the data.
65 @param Periodic Optional mechanism to engender a periodic stream.
66 @param ActivationInterval Optional parameter to repeat at this period one
67 time or, if the Periodic Boolean is set, periodically.
69 @retval EFI_SUCCESS The SMI/PMI has been engendered.
70 @retval EFI_DEVICE_ERROR The timing is unsupported.
71 @retval EFI_INVALID_PARAMETER The activation period is unsupported.
72 @retval EFI_NOT_STARTED The SMM base service has not been initialized.
77 (EFIAPI
*EFI_SMM_ACTIVATE
)(
78 IN EFI_SMM_CONTROL_PROTOCOL
*This
,
79 IN OUT INT8
*ArgumentBuffer OPTIONAL
,
80 IN OUT UINTN
*ArgumentBufferSize OPTIONAL
,
81 IN BOOLEAN Periodic OPTIONAL
,
82 IN UINTN ActivationInterval OPTIONAL
86 Clears any system state that was created in response to the Active call.
88 @param This The EFI_SMM_CONTROL_PROTOCOL instance.
89 @param Periodic Optional parameter to repeat at this period one
90 time or, if the Periodic Boolean is set, periodically.
92 @retval EFI_SUCCESS The SMI/PMI has been engendered.
93 @retval EFI_DEVICE_ERROR The source could not be cleared.
94 @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.
99 (EFIAPI
*EFI_SMM_DEACTIVATE
)(
100 IN EFI_SMM_CONTROL_PROTOCOL
*This
,
101 IN BOOLEAN Periodic OPTIONAL
105 Provides information on the source register used to generate the SMI.
107 @param This The EFI_SMM_CONTROL_PROTOCOL instance.
108 @param SmiRegister Pointer to the SMI register description structure
110 @retval EFI_SUCCESS The register structure has been returned.
111 @retval EFI_DEVICE_ERROR The source could not be cleared.
112 @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.
117 (EFIAPI
*EFI_SMM_GET_REGISTER_INFO
)(
118 IN EFI_SMM_CONTROL_PROTOCOL
*This
,
119 IN OUT EFI_SMM_CONTROL_REGISTER
*SmiRegister
123 @par Protocol Description:
124 This protocol is used initiate SMI/PMI activations.
127 Initiates the SMI/PMI activation.
130 Quiesces the SMI/PMI activation.
132 @param GetRegisterInfo
133 Provides data on the register used as the source of the SMI.
135 @param MinimumTriggerPeriod
136 Minimum interval at which the platform can set the period.
138 @retval EFI_SUCCESS The register structure has been returned.
142 // SMM Control Protocol
145 This protocol is used initiate SMI/PMI activations.
146 This protocol could be published by either of the following:
147 - A processor driver to abstract the SMI/PMI IPI
148 - The driver that abstracts the ASIC that is supporting the APM port, such as the ICH in an IntelĀ® chipset
149 Because of the possibility of performing SMI or PMI IPI transactions, the ability to generate this
151 The EFI_SMM_CONTROL_PROTOCOL is used by the platform chipset or processor driver. This
152 protocol is useable both in boot services and runtime. The runtime aspect is so that an
153 implementation of EFI_SMM_BASE_PROTOCOL.Communicate() can layer upon this service
154 and provide an SMI callback from a general EFI runtime driver.
155 The purpose of this protocol is to provide an abstraction to the platform hardware that generates an
156 SMI or PMI. There are often I/O ports that, when accessed, will engender the
158 struct _EFI_SMM_CONTROL_PROTOCOL
{
160 /// Initiates the SMI/PMI activation.
162 EFI_SMM_ACTIVATE Trigger
;
164 /// Quiesces the SMI/PMI activation.
166 EFI_SMM_DEACTIVATE Clear
;
168 /// Provides data on the register used as the source of the SMI.
170 EFI_SMM_GET_REGISTER_INFO GetRegisterInfo
;
172 /// Minimum interval at which the platform can set the period. A maximum is not
173 /// specified in that the SMM infrastructure code can emulate a maximum interval that is
174 /// greater than the hardware capabilities by using software emulation in the SMM
175 /// infrastructure code.
177 UINTN MinimumTriggerPeriod
;
180 extern EFI_GUID gEfiSmmControlProtocolGuid
;