TianoCore EDK2 master
Loading...
Searching...
No Matches
EventHandle.c File Reference
#include <Base.h>
#include <Pi/PiMmCis.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
#include <Protocol/DebugSupport.h>
#include <Guid/ZeroGuid.h>
#include <Guid/MmramMemoryReserve.h>
#include <StandaloneMmCpu.h>

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI MmFoundationEntryRegister (IN CONST EFI_MM_CONFIGURATION_PROTOCOL *This, IN EFI_MM_ENTRY_POINT MmEntryPoint)
 
STATIC EFI_STATUS CheckBufferAddr (IN UINTN BufferAddr)
 
EFI_STATUS PiMmStandaloneMmCpuDriverEntry (IN UINTN EventId, IN UINTN CpuNumber, IN UINTN NsCommBufferAddr)
 
EFI_STATUS EFIAPI PiMmCpuTpFwRootMmiHandler (IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
 

Variables

EFI_MM_COMMUNICATE_HEADER ** PerCpuGuidedEventContext = NULL
 
EFI_MMRAM_DESCRIPTOR mNsCommBuffer
 
EFI_MMRAM_DESCRIPTOR mSCommBuffer
 
MP_INFORMATION_HOB_DATAmMpInformationHobData
 
EFI_MM_CONFIGURATION_PROTOCOL mMmConfig
 
STATIC EFI_MM_ENTRY_POINT mMmEntryPoint = NULL
 

Detailed Description

Copyright (c) 2016 HP Development Company, L.P. Copyright (c) 2016 - 2021, Arm Limited. All rights reserved. Copyright (c) 2021, Linaro Limited Copyright (c) 2023, Ventana Micro System Inc. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file EventHandle.c.

Function Documentation

◆ CheckBufferAddr()

STATIC EFI_STATUS CheckBufferAddr ( IN UINTN  BufferAddr)

Perform bounds check on the common buffer.

Parameters
[in]BufferAddrAddress of the common buffer.
Return values
EFI_SUCCESSSuccess.
EFI_ACCESS_DENIEDAccess not permitted.

Definition at line 69 of file EventHandle.c.

◆ MmFoundationEntryRegister()

EFI_STATUS EFIAPI MmFoundationEntryRegister ( IN CONST EFI_MM_CONFIGURATION_PROTOCOL This,
IN EFI_MM_ENTRY_POINT  MmEntryPoint 
)

Registers the MM foundation entry point.

Parameters
[in]ThisPointer to the MM Configuration protocol.
[in]MmEntryPointFunction pointer to the MM Entry point.
Return values
EFI_SUCCESSSuccess.

Definition at line 213 of file EventHandle.c.

◆ PiMmCpuTpFwRootMmiHandler()

EFI_STATUS EFIAPI PiMmCpuTpFwRootMmiHandler ( IN EFI_HANDLE  DispatchHandle,
IN CONST VOID *Context  OPTIONAL,
IN OUT VOID *CommBuffer  OPTIONAL,
IN OUT UINTN *CommBufferSize  OPTIONAL 
)

This function is the main entry point for an MM handler dispatch or communicate-based callback.

Parameters
DispatchHandleThe unique handle assigned to this handler by MmiHandlerRegister().
ContextPoints to an optional handler context which was specified when the handler was registered.
CommBufferA pointer to a collection of data in memory that will be conveyed from a non-MM environment into an MM environment.
CommBufferSizeThe size of the CommBuffer.
Returns
Status Code

Definition at line 241 of file EventHandle.c.

◆ PiMmStandaloneMmCpuDriverEntry()

EFI_STATUS PiMmStandaloneMmCpuDriverEntry ( IN UINTN  EventId,
IN UINTN  CpuNumber,
IN UINTN  NsCommBufferAddr 
)

The PI Standalone MM entry point for the CPU driver.

Parameters
[in]EventIdThe event Id.
[in]CpuNumberThe CPU number.
[in]NsCommBufferAddrAddress of the NS common buffer.
Return values
EFI_SUCCESSSuccess.
EFI_INVALID_PARAMETERA parameter was invalid.
EFI_ACCESS_DENIEDAccess not permitted.
EFI_OUT_OF_RESOURCESOut of resources.
EFI_UNSUPPORTEDOperation not supported.

Definition at line 120 of file EventHandle.c.

Variable Documentation

◆ mMmConfig

Initial value:
= {
0,
}
EFI_STATUS EFIAPI MmFoundationEntryRegister(IN CONST EFI_MM_CONFIGURATION_PROTOCOL *This, IN EFI_MM_ENTRY_POINT MmEntryPoint)
Definition: EventHandle.c:213

Definition at line 52 of file EventHandle.c.

◆ mMmEntryPoint

STATIC EFI_MM_ENTRY_POINT mMmEntryPoint = NULL

Definition at line 57 of file EventHandle.c.

◆ mMpInformationHobData

MP_INFORMATION_HOB_DATA* mMpInformationHobData

Definition at line 50 of file EventHandle.c.

◆ mNsCommBuffer

EFI_MMRAM_DESCRIPTOR mNsCommBuffer

Definition at line 47 of file EventHandle.c.

◆ mSCommBuffer

EFI_MMRAM_DESCRIPTOR mSCommBuffer

Definition at line 48 of file EventHandle.c.

◆ PerCpuGuidedEventContext

EFI_MM_COMMUNICATE_HEADER** PerCpuGuidedEventContext = NULL

Definition at line 44 of file EventHandle.c.