StandaloneMmPkg: Add a new MmCommunicationDxe driver

Add a new MmCommunicationDxe driver. The driver is to:
  
1.Install gEfiMmCommunication2ProtocolGuid
  
2.Install gEfiMmCommunicationProtocolGuid
  
3.Create the notifications of some protocols and event that
    the Standalone Mm requires

Signed-off-by: Dun Tan <dun.tan@intel.com>
This commit is contained in:
Dun Tan 2024-06-12 10:59:53 +08:00 committed by mergify[bot]
parent 0806fb60d4
commit eef29d5100
4 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,30 @@
/** @file
MmCommunicationDxe driver produces MmCommunication protocol and
create the notifications of some protocols and event.
Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include "MmCommunicationDxe.h"
/**
The Entry Point for MmCommunicateDxe driver.
@param ImageHandle The firmware allocated handle for the EFI image.
@param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The entry point is executed successfully.
@retval Other Some error occurred when executing this entry point.
**/
EFI_STATUS
EFIAPI
MmCommunicationEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
return EFI_SUCCESS;
}

View File

@ -0,0 +1,11 @@
/** @file
Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef MM_COMMUNICATION_DXE_H_
#define MM_COMMUNICATION_DXE_H_
#endif

View File

@ -0,0 +1,37 @@
## @file
# MmCommunicationDxe driver produces MmCommunication protocol and
# create the notifications of some protocols and event.
#
# Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x0001001A
BASE_NAME = MmCommunicationDxe
FILE_GUID = 8d4b8bc7-e66b-4be2-add8-4988e08743ed
MODULE_TYPE = DXE_RUNTIME_DRIVER
VERSION_STRING = 1.0
PI_SPECIFICATION_VERSION = 0x00010032
ENTRY_POINT = MmCommunicationEntryPoint
[Sources]
MmCommunicationDxe.c
MmCommunicationDxe.h
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
UefiCpuPkg/UefiCpuPkg.dec
StandaloneMmPkg/StandaloneMmPkg.dec
[LibraryClasses]
UefiDriverEntryPoint
[Guids]
[Protocols]
[Depex]

View File

@ -78,6 +78,16 @@
[LibraryClasses.common.MM_STANDALONE]
MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/StandaloneMmMemoryAllocationLib.inf
[LibraryClasses.common.DXE_RUNTIME_DRIVER]
UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
################################################################################
#
# Pcd Section - list of all EDK II PCD Entries defined by this Platform
@ -121,6 +131,7 @@
StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf
StandaloneMmPkg/Library/SmmLockBoxMmDependency/SmmLockBoxMmDependency.inf
StandaloneMmPkg/Library/MmPlatformHobProducerLibNull/MmPlatformHobProducerLibNull.inf
StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.inf
[Components.AARCH64, Components.ARM]
StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf