2007-06-15 12:02:42 +02:00
|
|
|
/** @file
|
2009-07-28 15:25:37 +02:00
|
|
|
This file declares the SMM Control abstraction protocol.
|
|
|
|
This protocol is used to initiate SMI/PMI activations. This protocol could be published by either:
|
2008-04-08 09:40:30 +02:00
|
|
|
- A processor driver to abstract the SMI/PMI IPI
|
|
|
|
- The driver that abstracts the ASIC that is supporting the APM port, such as the ICH in an
|
2008-04-09 04:42:40 +02:00
|
|
|
Intel chipset
|
2008-04-08 09:40:30 +02:00
|
|
|
Because of the possibility of performing SMI or PMI IPI transactions, the ability to generate this
|
2009-07-28 15:25:37 +02:00
|
|
|
event from a platform chipset agent is an optional capability for both IA-32 and Itanium-based
|
2008-04-08 09:40:30 +02:00
|
|
|
systems.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
2010-04-23 17:52:13 +02:00
|
|
|
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
2010-03-16 02:53:11 +01:00
|
|
|
This program and the accompanying materials are licensed and made available under
|
|
|
|
the terms and conditions of the BSD License that accompanies this distribution.
|
|
|
|
The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php.
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
|
|
|
@par Revision Reference:
|
|
|
|
This Protocol is defined in Framework of EFI SMM Core Interface Spec
|
|
|
|
Version 0.9.
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef _SMM_CONTROL_H_
|
|
|
|
#define _SMM_CONTROL_H_
|
|
|
|
|
2007-06-28 14:23:11 +02:00
|
|
|
|
2007-06-15 12:02:42 +02:00
|
|
|
typedef struct _EFI_SMM_CONTROL_PROTOCOL EFI_SMM_CONTROL_PROTOCOL;
|
|
|
|
|
|
|
|
#define EFI_SMM_CONTROL_PROTOCOL_GUID \
|
|
|
|
{ \
|
|
|
|
0x8d12e231, 0xc667, 0x4fd1, {0x98, 0xf2, 0x24, 0x49, 0xa7, 0xe7, 0xb2, 0xe5 } \
|
|
|
|
}
|
2009-02-05 09:42:01 +01:00
|
|
|
//
|
2007-06-15 12:02:42 +02:00
|
|
|
// SMM Access specification Data Structures
|
|
|
|
//
|
|
|
|
typedef struct {
|
2009-07-01 23:35:11 +02:00
|
|
|
///
|
|
|
|
/// Describes the I/O location of the particular port that engendered the synchronous
|
|
|
|
/// SMI. For example, this location can include but is not limited to the traditional
|
|
|
|
/// PCAT* APM port of 0B2h.
|
|
|
|
///
|
2007-06-15 12:02:42 +02:00
|
|
|
UINT8 SmiTriggerRegister;
|
2009-07-01 23:35:11 +02:00
|
|
|
///
|
|
|
|
/// Describes the value that was written to the respective activation port.
|
|
|
|
///
|
2007-06-15 12:02:42 +02:00
|
|
|
UINT8 SmiDataRegister;
|
|
|
|
} EFI_SMM_CONTROL_REGISTER;
|
|
|
|
|
|
|
|
//
|
|
|
|
// SMM Control specification member function
|
|
|
|
//
|
|
|
|
/**
|
|
|
|
Invokes SMI activation from either the preboot or runtime environment.
|
|
|
|
|
|
|
|
@param This The EFI_SMM_CONTROL_PROTOCOL instance.
|
2010-03-16 02:53:11 +01:00
|
|
|
@param ArgumentBuffer The optional sized data to pass into the protocol activation.
|
|
|
|
@param ArgumentBufferSize The optional size of the data.
|
|
|
|
@param Periodic An optional mechanism to periodically repeat activation.
|
|
|
|
@param ActivationInterval An optional parameter to repeat at this period one
|
2007-06-15 12:02:42 +02:00
|
|
|
time or, if the Periodic Boolean is set, periodically.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS The SMI/PMI has been engendered.
|
|
|
|
@retval EFI_DEVICE_ERROR The timing is unsupported.
|
|
|
|
@retval EFI_INVALID_PARAMETER The activation period is unsupported.
|
|
|
|
@retval EFI_NOT_STARTED The SMM base service has not been initialized.
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-07-31 09:44:54 +02:00
|
|
|
(EFIAPI *EFI_SMM_ACTIVATE)(
|
2007-06-15 12:02:42 +02:00
|
|
|
IN EFI_SMM_CONTROL_PROTOCOL *This,
|
|
|
|
IN OUT INT8 *ArgumentBuffer OPTIONAL,
|
|
|
|
IN OUT UINTN *ArgumentBufferSize OPTIONAL,
|
|
|
|
IN BOOLEAN Periodic OPTIONAL,
|
|
|
|
IN UINTN ActivationInterval OPTIONAL
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Clears any system state that was created in response to the Active call.
|
|
|
|
|
|
|
|
@param This The EFI_SMM_CONTROL_PROTOCOL instance.
|
2009-02-05 09:42:01 +01:00
|
|
|
@param Periodic Optional parameter to repeat at this period one
|
|
|
|
time or, if the Periodic Boolean is set, periodically.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
|
|
|
@retval EFI_SUCCESS The SMI/PMI has been engendered.
|
|
|
|
@retval EFI_DEVICE_ERROR The source could not be cleared.
|
|
|
|
@retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.
|
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-07-31 09:44:54 +02:00
|
|
|
(EFIAPI *EFI_SMM_DEACTIVATE)(
|
2007-06-15 12:02:42 +02:00
|
|
|
IN EFI_SMM_CONTROL_PROTOCOL *This,
|
|
|
|
IN BOOLEAN Periodic OPTIONAL
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Provides information on the source register used to generate the SMI.
|
|
|
|
|
|
|
|
@param This The EFI_SMM_CONTROL_PROTOCOL instance.
|
2010-03-16 02:53:11 +01:00
|
|
|
@param SmiRegister A pointer to the SMI register description structure.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
|
|
|
@retval EFI_SUCCESS The register structure has been returned.
|
2009-07-01 23:35:11 +02:00
|
|
|
@retval EFI_DEVICE_ERROR The source could not be cleared.
|
|
|
|
@retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-07-31 09:44:54 +02:00
|
|
|
(EFIAPI *EFI_SMM_GET_REGISTER_INFO)(
|
2007-06-15 12:02:42 +02:00
|
|
|
IN EFI_SMM_CONTROL_PROTOCOL *This,
|
|
|
|
IN OUT EFI_SMM_CONTROL_REGISTER *SmiRegister
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
@par Protocol Description:
|
2009-07-28 15:25:37 +02:00
|
|
|
This protocol is used to initiate SMI/PMI activations.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
|
|
|
@param Trigger
|
|
|
|
Initiates the SMI/PMI activation.
|
|
|
|
|
|
|
|
@param Clear
|
|
|
|
Quiesces the SMI/PMI activation.
|
|
|
|
|
|
|
|
@param GetRegisterInfo
|
|
|
|
Provides data on the register used as the source of the SMI.
|
|
|
|
|
|
|
|
@param MinimumTriggerPeriod
|
|
|
|
Minimum interval at which the platform can set the period.
|
|
|
|
|
2009-07-01 23:35:11 +02:00
|
|
|
@retval EFI_SUCCESS The register structure has been returned.
|
2007-06-15 12:02:42 +02:00
|
|
|
**/
|
|
|
|
|
2009-07-01 17:57:13 +02:00
|
|
|
//
|
|
|
|
// SMM Control Protocol
|
|
|
|
//
|
|
|
|
/**
|
2009-07-28 15:25:37 +02:00
|
|
|
This protocol is used to initiate SMI/PMI activations.
|
|
|
|
This protocol could be published by either:
|
2010-03-16 02:53:11 +01:00
|
|
|
- A processor driver to abstract the SMI/PMI IPI.
|
|
|
|
- The driver that abstracts the ASIC that is supporting the APM port, such as the ICH in an Intel chipset.
|
|
|
|
Because of the possibility of performing SMI or PMI IPI transactions, the ability to generate this.
|
2009-07-01 17:57:13 +02:00
|
|
|
|
2009-07-01 23:35:11 +02:00
|
|
|
The EFI_SMM_CONTROL_PROTOCOL is used by the platform chipset or processor driver. This
|
2009-07-28 15:25:37 +02:00
|
|
|
protocol is usable both in boot services and at runtime. The runtime aspect enables an
|
|
|
|
implementation of EFI_SMM_BASE_PROTOCOL.Communicate() to layer upon this service
|
2009-07-01 17:57:13 +02:00
|
|
|
and provide an SMI callback from a general EFI runtime driver.
|
2009-07-28 15:25:37 +02:00
|
|
|
This protocol provides an abstraction to the platform hardware that generates an
|
2010-03-16 05:08:24 +01:00
|
|
|
SMI or PMI. There are often I/O ports that, when accessed, will engender the SMI or PMI.
|
|
|
|
Also, this hardware optionally supports the periodic genearation of these signals.
|
|
|
|
|
2009-07-01 17:57:13 +02:00
|
|
|
**/
|
2007-06-15 12:02:42 +02:00
|
|
|
struct _EFI_SMM_CONTROL_PROTOCOL {
|
2009-07-01 23:35:11 +02:00
|
|
|
///
|
|
|
|
/// Initiates the SMI/PMI activation.
|
|
|
|
///
|
2007-06-15 12:02:42 +02:00
|
|
|
EFI_SMM_ACTIVATE Trigger;
|
2009-07-01 23:35:11 +02:00
|
|
|
///
|
|
|
|
/// Quiesces the SMI/PMI activation.
|
|
|
|
///
|
2007-06-15 12:02:42 +02:00
|
|
|
EFI_SMM_DEACTIVATE Clear;
|
2009-07-01 23:35:11 +02:00
|
|
|
///
|
|
|
|
/// Provides data on the register used as the source of the SMI.
|
|
|
|
///
|
2007-06-15 12:02:42 +02:00
|
|
|
EFI_SMM_GET_REGISTER_INFO GetRegisterInfo;
|
2009-07-01 23:35:11 +02:00
|
|
|
///
|
|
|
|
/// Minimum interval at which the platform can set the period. A maximum is not
|
|
|
|
/// specified in that the SMM infrastructure code can emulate a maximum interval that is
|
|
|
|
/// greater than the hardware capabilities by using software emulation in the SMM
|
|
|
|
/// infrastructure code.
|
|
|
|
///
|
2007-06-15 12:02:42 +02:00
|
|
|
UINTN MinimumTriggerPeriod;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern EFI_GUID gEfiSmmControlProtocolGuid;
|
|
|
|
|
|
|
|
#endif
|