TianoCore EDK2 master
Loading...
Searching...
No Matches
Mmi.c File Reference
#include "StandaloneMmCore.h"

Go to the source code of this file.

Data Structures

struct  MMI_ENTRY
 
struct  MMI_HANDLER
 

Macros

#define MMI_ENTRY_SIGNATURE   SIGNATURE_32('m','m','i','e')
 
#define MMI_HANDLER_SIGNATURE   SIGNATURE_32('m','m','i','h')
 

Functions

BOOLEAN RemoveMmiHandler (IN MMI_HANDLER *MmiHandler, IN MMI_ENTRY *MmiEntry)
 
MMI_ENTRY *EFIAPI MmCoreFindMmiEntry (IN EFI_GUID *HandlerType, IN BOOLEAN Create)
 
EFI_STATUS EFIAPI MmiManage (IN CONST EFI_GUID *HandlerType, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
 
EFI_STATUS EFIAPI MmiHandlerRegister (IN EFI_MM_HANDLER_ENTRY_POINT Handler, IN CONST EFI_GUID *HandlerType OPTIONAL, OUT EFI_HANDLE *DispatchHandle)
 
EFI_STATUS EFIAPI MmiHandlerUnRegister (IN EFI_HANDLE DispatchHandle)
 

Variables

UINTN mMmiManageCallingDepth = 0
 
LIST_ENTRY mRootMmiHandlerList = INITIALIZE_LIST_HEAD_VARIABLE (mRootMmiHandlerList)
 
LIST_ENTRY mMmiEntryList = INITIALIZE_LIST_HEAD_VARIABLE (mMmiEntryList)
 

Detailed Description

MMI management.

Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.
Copyright (c) 2016 - 2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Mmi.c.

Macro Definition Documentation

◆ MMI_ENTRY_SIGNATURE

#define MMI_ENTRY_SIGNATURE   SIGNATURE_32('m','m','i','e')

Definition at line 20 of file Mmi.c.

◆ MMI_HANDLER_SIGNATURE

#define MMI_HANDLER_SIGNATURE   SIGNATURE_32('m','m','i','h')

Definition at line 30 of file Mmi.c.

Function Documentation

◆ MmCoreFindMmiEntry()

MMI_ENTRY *EFIAPI MmCoreFindMmiEntry ( IN EFI_GUID HandlerType,
IN BOOLEAN  Create 
)

Finds the MMI entry for the requested handler type.

Parameters
HandlerTypeThe type of the interrupt
CreateCreate a new entry if not found
Returns
MMI entry

Definition at line 93 of file Mmi.c.

◆ MmiHandlerRegister()

EFI_STATUS EFIAPI MmiHandlerRegister ( IN EFI_MM_HANDLER_ENTRY_POINT  Handler,
IN CONST EFI_GUID *HandlerType  OPTIONAL,
OUT EFI_HANDLE DispatchHandle 
)

Registers a handler to execute within MM.

Parameters
HandlerHandler service function pointer.
HandlerTypePoints to the handler type or NULL for root MMI handlers.
DispatchHandleOn return, contains a unique handle which can be used to later unregister the handler function.
Return values
EFI_SUCCESSHandler register success.
EFI_INVALID_PARAMETERHandler or DispatchHandle is NULL.

Definition at line 356 of file Mmi.c.

◆ MmiHandlerUnRegister()

EFI_STATUS EFIAPI MmiHandlerUnRegister ( IN EFI_HANDLE  DispatchHandle)

Unregister a handler in MM.

Parameters
DispatchHandleThe handle that was specified when the handler was registered.
Return values
EFI_SUCCESSHandler function was successfully unregistered.
EFI_INVALID_PARAMETERDispatchHandle does not refer to a valid handle.

Definition at line 416 of file Mmi.c.

◆ MmiManage()

EFI_STATUS EFIAPI MmiManage ( IN CONST EFI_GUID HandlerType,
IN CONST VOID *Context  OPTIONAL,
IN OUT VOID *CommBuffer  OPTIONAL,
IN OUT UINTN *CommBufferSize  OPTIONAL 
)

Manage MMI of a particular type.

Parameters
HandlerTypePoints to the handler type or NULL for root MMI handlers.
ContextPoints to an optional context buffer.
CommBufferPoints to the optional communication buffer.
CommBufferSizePoints to the size of the optional communication buffer.
Return values
EFI_WARN_INTERRUPT_SOURCE_PENDINGInterrupt source was processed successfully but not quiesced.
EFI_INTERRUPT_PENDINGOne or more MMI sources could not be quiesced.
EFI_NOT_FOUNDInterrupt source was not handled or quiesced.
EFI_SUCCESSInterrupt source was handled and quiesced.

Definition at line 160 of file Mmi.c.

◆ RemoveMmiHandler()

BOOLEAN RemoveMmiHandler ( IN MMI_HANDLER MmiHandler,
IN MMI_ENTRY MmiEntry 
)

Remove MmiHandler and free the memory it used. If MmiEntry is empty, remove MmiEntry and free the memory it used.

Parameters
MmiHandlerPoints to MMI handler.
MmiEntryPoints to MMI Entry or NULL for root MMI handlers.
Return values
TRUEMmiEntry is removed.
FALSEMmiEntry is not removed.

Definition at line 59 of file Mmi.c.

Variable Documentation

◆ mMmiEntryList

LIST_ENTRY mMmiEntryList = INITIALIZE_LIST_HEAD_VARIABLE (mMmiEntryList)

Definition at line 46 of file Mmi.c.

◆ mMmiManageCallingDepth

UINTN mMmiManageCallingDepth = 0

Definition at line 43 of file Mmi.c.

◆ mRootMmiHandlerList

LIST_ENTRY mRootMmiHandlerList = INITIALIZE_LIST_HEAD_VARIABLE (mRootMmiHandlerList)

Definition at line 45 of file Mmi.c.