diff options
author | Dun Tan <dun.tan@intel.com> | 2024-06-12 10:59:53 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-08-28 15:25:27 +0000 |
commit | eef29d5100b4f4879d8280f5074ccc00e5067e01 (patch) | |
tree | d056d7b0fc2ac5515032d9cbcc865d62797e7ab0 /StandaloneMmPkg | |
parent | 0806fb60d4502c05f378cdbf4cdeca9be5ff502a (diff) | |
download | edk2-eef29d5100b4f4879d8280f5074ccc00e5067e01.zip edk2-eef29d5100b4f4879d8280f5074ccc00e5067e01.tar.gz edk2-eef29d5100b4f4879d8280f5074ccc00e5067e01.tar.bz2 |
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>
Diffstat (limited to 'StandaloneMmPkg')
4 files changed, 89 insertions, 0 deletions
diff --git a/StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.c b/StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.c new file mode 100644 index 0000000..a985d9b --- /dev/null +++ b/StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.c @@ -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;
+}
diff --git a/StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.h b/StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.h new file mode 100644 index 0000000..1e98aa1 --- /dev/null +++ b/StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.h @@ -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
diff --git a/StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.inf b/StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.inf new file mode 100644 index 0000000..acfc5e4 --- /dev/null +++ b/StandaloneMmPkg/Drivers/MmCommunicationDxe/MmCommunicationDxe.inf @@ -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]
diff --git a/StandaloneMmPkg/StandaloneMmPkg.dsc b/StandaloneMmPkg/StandaloneMmPkg.dsc index fc2c124..20a05d0 100644 --- a/StandaloneMmPkg/StandaloneMmPkg.dsc +++ b/StandaloneMmPkg/StandaloneMmPkg.dsc @@ -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
|