TianoCore EDK2 master
|
#include <PiDxe.h>
#include <Protocol/SmmControl2.h>
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/IoLib.h>
#include <Library/HobLib.h>
#include <Library/UefiRuntimeLib.h>
#include <Library/BaseMemoryLib.h>
#include <Guid/SmmRegisterInfoGuid.h>
Go to the source code of this file.
Data Structures | |
struct | SMM_CONTROL2_REG |
Macros | |
#define | SMM_DATA_PORT 0xB3 |
#define | SMM_CONTROL_PORT 0xB2 |
Functions | |
EFI_STATUS EFIAPI | Activate (IN CONST EFI_SMM_CONTROL2_PROTOCOL *This, IN OUT UINT8 *CommandPort OPTIONAL, IN OUT UINT8 *DataPort OPTIONAL, IN BOOLEAN Periodic OPTIONAL, IN EFI_SMM_PERIOD ActivationInterval OPTIONAL) |
EFI_STATUS EFIAPI | Deactivate (IN CONST EFI_SMM_CONTROL2_PROTOCOL *This, IN BOOLEAN Periodic) |
PLD_GENERIC_REGISTER * | GetSmmCtrlRegById (IN PLD_SMM_REGISTERS *SmmRegister, IN UINT32 Id) |
VOID EFIAPI | SmmControlVirtualAddressChangeEvent (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS EFIAPI | SmmControlEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
SMM_CONTROL2_REG | mSmiCtrlReg |
EFI_SMM_CONTROL2_PROTOCOL | mSmmControl2 |
This module produces the SMM Control2 Protocol
Copyright (c) 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file SmmControlRuntimeDxe.c.
#define SMM_CONTROL_PORT 0xB2 |
Definition at line 20 of file SmmControlRuntimeDxe.c.
#define SMM_DATA_PORT 0xB3 |
Definition at line 19 of file SmmControlRuntimeDxe.c.
EFI_STATUS EFIAPI Activate | ( | IN CONST EFI_SMM_CONTROL2_PROTOCOL * | This, |
IN OUT UINT8 *CommandPort | OPTIONAL, | ||
IN OUT UINT8 *DataPort | OPTIONAL, | ||
IN BOOLEAN Periodic | OPTIONAL, | ||
IN EFI_SMM_PERIOD ActivationInterval | OPTIONAL | ||
) |
Invokes SMI activation from either the preboot or runtime environment.
This function generates an SMI.
[in] | This | The EFI_SMM_CONTROL2_PROTOCOL instance. |
[in,out] | CommandPort | The value written to the command port. |
[in,out] | DataPort | The value written to the data port. |
[in] | Periodic | Optional mechanism to engender a periodic stream. |
[in] | ActivationInterval | Optional parameter to repeat at this period one time or, if the Periodic Boolean is set, periodically. |
EFI_SUCCESS | The SMI has been engendered. |
EFI_DEVICE_ERROR | The timing is unsupported. |
EFI_INVALID_PARAMETER | The activation period is unsupported. |
EFI_INVALID_PARAMETER | The last periodic activation has not been cleared. |
EFI_NOT_STARTED | The MM base service has not been initialized. |
Definition at line 50 of file SmmControlRuntimeDxe.c.
EFI_STATUS EFIAPI Deactivate | ( | IN CONST EFI_SMM_CONTROL2_PROTOCOL * | This, |
IN BOOLEAN | Periodic | ||
) |
Clears an SMI.
This | Pointer to an instance of EFI_SMM_CONTROL2_PROTOCOL |
Periodic | TRUE to indicate a periodical SMI |
Definition at line 90 of file SmmControlRuntimeDxe.c.
PLD_GENERIC_REGISTER * GetSmmCtrlRegById | ( | IN PLD_SMM_REGISTERS * | SmmRegister, |
IN UINT32 | Id | ||
) |
Get specified SMI register based on given register ID
[in] | SmmRegister | SMI related register array from bootloader |
[in] | Id | The register ID to get. |
NULL | The register is not found or the format is not expected. |
Definition at line 125 of file SmmControlRuntimeDxe.c.
EFI_STATUS EFIAPI SmmControlEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
This function installs EFI_SMM_CONTROL2_PROTOCOL.
ImageHandle | Handle for the image of this driver |
SystemTable | Pointer to the EFI System Table |
EFI_UNSUPPORTED | There's no Intel ICH on this platform |
Definition at line 197 of file SmmControlRuntimeDxe.c.
Fixup data pointers so that the services can be called in virtual mode.
[in] | Event | The event registered. |
[in] | Context | Event context. |
Definition at line 176 of file SmmControlRuntimeDxe.c.
SMM_CONTROL2_REG mSmiCtrlReg |
Definition at line 28 of file SmmControlRuntimeDxe.c.
EFI_SMM_CONTROL2_PROTOCOL mSmmControl2 |
SMM COntrol2 Protocol instance
Definition at line 108 of file SmmControlRuntimeDxe.c.