TianoCore EDK2 master
|
#include "PchSmiDispatchSmm.h"
Go to the source code of this file.
Data Structures | |
struct | SMM_PCH_REGISTER |
Functions | |
EFI_SMM_SW_DISPATCH2_CONTEXT * | FindContextBySwSmiInputValue (IN UINTN SwSmiInputValue) |
EFI_SMM_SW_DISPATCH2_CONTEXT * | FindContextByDispatchHandle (IN EFI_HANDLE DispatchHandle) |
EFI_STATUS | SmmSwDispatcher (IN EFI_HANDLE DispatchHandle, IN CONST VOID *RegisterContext, IN OUT VOID *CommBuffer, IN OUT UINTN *CommBufferSize) |
EFI_STATUS | SmiInputValueCheck (IN UINTN SwSmiInputValue) |
EFI_STATUS EFIAPI | SmmSwDispatch2Register (IN CONST EFI_SMM_SW_DISPATCH2_PROTOCOL *This, IN EFI_SMM_HANDLER_ENTRY_POINT2 DispatchFunction, IN OUT EFI_SMM_SW_REGISTER_CONTEXT *RegContext, OUT EFI_HANDLE *DispatchHandle) |
EFI_STATUS EFIAPI | SmmSwDispatch2UnRegister (IN CONST EFI_SMM_SW_DISPATCH2_PROTOCOL *This, IN EFI_HANDLE DispatchHandle) |
PLD_GENERIC_REGISTER * | GetSmmCtrlRegById (IN PLD_SMM_REGISTERS *SmmRegister, IN UINT32 Id) |
EFI_STATUS EFIAPI | PchSmiDispatchEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
SMM_PCH_REGISTER | mSmiPchReg |
EFI_SMM_CPU_PROTOCOL * | mSmmCpuProtocol |
LIST_ENTRY | mSmmSwDispatch2Queue = INITIALIZE_LIST_HEAD_VARIABLE (mSmmSwDispatch2Queue) |
EFI_SMM_SW_DISPATCH2_PROTOCOL | gSmmSwDispatch2 |
SMM SwDispatch2 Protocol.
Copyright (c) 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PchSmiDispatchSmm.c.
EFI_SMM_SW_DISPATCH2_CONTEXT * FindContextByDispatchHandle | ( | IN EFI_HANDLE | DispatchHandle | ) |
Find SmmSwDispatch2Context by DispatchHandle.
DispatchHandle | The handle to identify the SmmSwDispatch2 context |
Definition at line 59 of file PchSmiDispatchSmm.c.
EFI_SMM_SW_DISPATCH2_CONTEXT * FindContextBySwSmiInputValue | ( | IN UINTN | SwSmiInputValue | ) |
Find SmmSwDispatch2Context by SwSmiInputValue.
[in] | SwSmiInputValue | The value to identify the SmmSwDispatch2 context |
Definition at line 33 of file PchSmiDispatchSmm.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 341 of file PchSmiDispatchSmm.c.
EFI_STATUS EFIAPI PchSmiDispatchEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Entry Point for this driver.
[in] | ImageHandle | Image handle of this driver. |
[in] | SystemTable | A Pointer to the EFI System Table. |
EFI_SUCCESS | The entry point is executed successfully. |
other | Some error occurred when executing this entry point. |
Definition at line 394 of file PchSmiDispatchSmm.c.
EFI_STATUS SmiInputValueCheck | ( | IN UINTN | SwSmiInputValue | ) |
Check the SwSmiInputValue is already used
[in] | SwSmiInputValue | To identify the SmmSwDispatch2 context |
EFI_SUCCESS | SwSmiInputValue could be used. |
EFI_INVALID_PARAMETER | SwSmiInputValue is already be used. |
Definition at line 188 of file PchSmiDispatchSmm.c.
EFI_STATUS EFIAPI SmmSwDispatch2Register | ( | IN CONST EFI_SMM_SW_DISPATCH2_PROTOCOL * | This, |
IN EFI_SMM_HANDLER_ENTRY_POINT2 | DispatchFunction, | ||
IN OUT EFI_SMM_SW_REGISTER_CONTEXT * | RegContext, | ||
OUT EFI_HANDLE * | DispatchHandle | ||
) |
Register a child SMI source dispatch function for the specified software SMI.
This service registers a function (DispatchFunction) which will be called when the software SMI source specified by RegContext->SwSmiCpuIndex is detected. On return, DispatchHandle contains a unique handle which may be used later to unregister the function using UnRegister().
[in] | This | Pointer to the EFI_SMM_SW_DISPATCH2_PROTOCOL instance. |
[in] | DispatchFunction | Function to register for handler when the specified software SMI is generated. |
[in,out] | RegContext | Pointer to the dispatch function's context. The caller fills this context in before calling the register function to indicate to the register function which Software SMI input value the dispatch function should be invoked for. |
[out] | DispatchHandle | Handle generated by the dispatcher to track the function instance. |
EFI_SUCCESS | The dispatch function has been successfully registered and the SMI source has been enabled. |
EFI_DEVICE_ERROR | The SW driver was unable to enable the SMI source. |
EFI_INVALID_PARAMETER | RegisterContext is invalid. The SW SMI input value is not within valid range. |
EFI_OUT_OF_RESOURCES | There is not enough memory (system or SMM) to manage this child. |
EFI_OUT_OF_RESOURCES | A unique software SMI value could not be assigned for this dispatch. |
Definition at line 236 of file PchSmiDispatchSmm.c.
EFI_STATUS EFIAPI SmmSwDispatch2UnRegister | ( | IN CONST EFI_SMM_SW_DISPATCH2_PROTOCOL * | This, |
IN EFI_HANDLE | DispatchHandle | ||
) |
Unregister a child SMI source dispatch function for the specified software SMI.
This service removes the handler associated with DispatchHandle so that it will no longer be called in response to a software SMI.
[in] | This | Pointer to the EFI_SMM_SW_DISPATCH2_PROTOCOL instance. |
[in] | DispatchHandle | Handle of dispatch function to deregister. |
EFI_SUCCESS | The dispatch function has been successfully unregistered. |
EFI_INVALID_PARAMETER | The DispatchHandle was not valid. |
Definition at line 304 of file PchSmiDispatchSmm.c.
EFI_STATUS SmmSwDispatcher | ( | IN EFI_HANDLE | DispatchHandle, |
IN CONST VOID * | RegisterContext, | ||
IN OUT VOID * | CommBuffer, | ||
IN OUT UINTN * | CommBufferSize | ||
) |
Dispatch registered SMM handlers
DispatchHandle | The unique handle assigned to this handler by SmiHandlerRegister(). |
RegisterContext | Points to an optional handler context which was specified when the handler was registered. |
CommBuffer | A pointer to a collection of data in memory that will be conveyed from a non-SMM environment into an SMM environment. |
CommBufferSize | The size of the CommBuffer. |
Definition at line 90 of file PchSmiDispatchSmm.c.
EFI_SMM_SW_DISPATCH2_PROTOCOL gSmmSwDispatch2 |
Definition at line 324 of file PchSmiDispatchSmm.c.
SMM_PCH_REGISTER mSmiPchReg |
Definition at line 20 of file PchSmiDispatchSmm.c.
EFI_SMM_CPU_PROTOCOL* mSmmCpuProtocol |
Definition at line 22 of file PchSmiDispatchSmm.c.
LIST_ENTRY mSmmSwDispatch2Queue = INITIALIZE_LIST_HEAD_VARIABLE (mSmmSwDispatch2Queue) |
Definition at line 23 of file PchSmiDispatchSmm.c.