TianoCore EDK2 master
|
#include <Library/ArmLib.h>
#include <Library/ArmSmcLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/DxeServicesTableLib.h>
#include <Library/HobLib.h>
#include <Library/PcdLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Protocol/MmCommunication2.h>
#include <IndustryStandard/ArmStdSmc.h>
#include "MmCommunicate.h"
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | MmCommunication2Communicate (IN CONST EFI_MM_COMMUNICATION2_PROTOCOL *This, IN OUT VOID *CommBufferPhysical, IN OUT VOID *CommBufferVirtual, IN OUT UINTN *CommSize OPTIONAL) |
STATIC VOID EFIAPI | NotifySetVirtualAddressMap (IN EFI_EVENT Event, IN VOID *Context) |
STATIC EFI_STATUS | GetMmCompatibility () |
STATIC VOID EFIAPI | MmGuidedEventNotify (IN EFI_EVENT Event, IN VOID *Context) |
EFI_STATUS EFIAPI | MmCommunication2Initialize (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Copyright (c) 2016-2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file MmCommunication.c.
STATIC EFI_STATUS GetMmCompatibility | ( | ) |
Definition at line 248 of file MmCommunication.c.
EFI_STATUS EFIAPI MmCommunication2Communicate | ( | IN CONST EFI_MM_COMMUNICATION2_PROTOCOL * | This, |
IN OUT VOID * | CommBufferPhysical, | ||
IN OUT VOID * | CommBufferVirtual, | ||
IN OUT UINTN *CommSize | OPTIONAL | ||
) |
Communicates with a registered handler.
This function provides a service to send and receive messages from a registered UEFI service.
[in] | This | The EFI_MM_COMMUNICATION_PROTOCOL instance. |
[in,out] | CommBufferPhysical | Physical address of the MM communication buffer |
[in,out] | CommBufferVirtual | Virtual address of the MM communication buffer |
[in,out] | CommSize | The size of the data buffer being passed in. On input, when not omitted, the buffer should cover EFI_MM_COMMUNICATE_HEADER and the value of MessageLength field. On exit, the size of data being returned. Zero if the handler does not wish to reply with any data. This parameter is optional and may be NULL. |
EFI_SUCCESS | The message was successfully posted. |
EFI_INVALID_PARAMETER | CommBufferPhysical or CommBufferVirtual was NULL, or integer value pointed by CommSize does not cover EFI_MM_COMMUNICATE_HEADER and the value of MessageLength field. |
EFI_BAD_BUFFER_SIZE | The buffer is too large for the MM implementation. If this error is returned, the MessageLength field in the CommBuffer header or the integer pointed by CommSize, are updated to reflect the maximum payload size the implementation can accommodate. |
EFI_ACCESS_DENIED | The CommunicateBuffer parameter or CommSize parameter, if not omitted, are in address range that cannot be accessed by the MM environment. |
Definition at line 71 of file MmCommunication.c.
EFI_STATUS EFIAPI MmCommunication2Initialize | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The Entry Point for MM Communication
This function installs the MM communication protocol interface and finds out what type of buffer management will be required prior to invoking the communication SMC.
ImageHandle | The firmware allocated handle for the EFI image. |
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 340 of file MmCommunication.c.
Event notification that is fired when GUIDed Event Group is signaled.
Event | The Event that is being processed, not used. |
Context | Event Context, not used. |
Definition at line 305 of file MmCommunication.c.
Notification callback on SetVirtualAddressMap event.
This function notifies the MM communication protocol interface on SetVirtualAddressMap event and converts pointers used in this driver from physical to virtual address.
Event | SetVirtualAddressMap event. |
Context | A context when the SetVirtualAddressMap triggered. |
EFI_SUCCESS | The function executed successfully. |
Other | Some error occurred when executing this function. |
Definition at line 225 of file MmCommunication.c.
STATIC EFI_EVENT mGuidedEvent[ARRAY_SIZE(mGuidedEventGuid)] |
Definition at line 293 of file MmCommunication.c.
Definition at line 287 of file MmCommunication.c.
STATIC EFI_HANDLE mMmCommunicateHandle |
Definition at line 37 of file MmCommunication.c.
STATIC EFI_MM_COMMUNICATION2_PROTOCOL mMmCommunication2 |
Definition at line 204 of file MmCommunication.c.
STATIC ARM_MEMORY_REGION_DESCRIPTOR mNsCommBuffMemRegion |
Definition at line 29 of file MmCommunication.c.
Definition at line 32 of file MmCommunication.c.