From 644e5790cdc59f9234a84ede77de9d8f9aa0327b Mon Sep 17 00:00:00 2001 From: Dongyan Qian Date: Tue, 17 Mar 2026 11:44:53 +0800 Subject: [PATCH] OvmfPkg/VirtMmCommunicationDxe: enable loongarch64 For QEMU version support references, please see: https://github.com/qemu/qemu/commit/e1092f765d9c0bf33762a03fe45e3d0de86c86a6 Suggested-by: Gerd Hoffmann Signed-off-by: Dongyan Qian Cc: Chao Li Cc: Bibo Mao Cc: Xianglai Li Cc: Bo Zhu Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Mike Beaton --- OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.c | 2 ++ .../VirtMmCommunicationDxe/VirtMmCommunication.inf | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.c b/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.c index 20f2806ea4..90d28b2980 100644 --- a/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.c +++ b/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.c @@ -406,6 +406,8 @@ ReturnErrorStatus: " 'qemu-system-aarch64 -device uefi-vars-sysbus'\n" #elif defined (MDE_CPU_RISCV64) " 'qemu-system-riscv64 -device uefi-vars-sysbus'\n" + #elif defined (MDE_CPU_LOONGARCH64) + " 'qemu-system-loongarch64 -device uefi-vars-sysbus'\n" #else #error unsupported architecture #endif diff --git a/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.inf b/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.inf index c7e7dcfb3f..99da655b33 100644 --- a/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.inf +++ b/OvmfPkg/VirtMmCommunicationDxe/VirtMmCommunication.inf @@ -13,7 +13,7 @@ MODULE_TYPE = DXE_RUNTIME_DRIVER VERSION_STRING = 1.0 ENTRY_POINT = VirtMmCommunication2Initialize - VALID_ARCHITECTURES = X64 AARCH64 RISCV64 + VALID_ARCHITECTURES = X64 AARCH64 RISCV64 LOONGARCH64 [Sources] VirtMmCommunication.c @@ -23,7 +23,7 @@ QemuHwInfo.c QemuMmio.c -[Sources.AARCH64, Sources.RISCV64] +[Sources.AARCH64, Sources.RISCV64, Sources.LOONGARCH64] QemuFdt.c QemuMmio.c @@ -32,7 +32,7 @@ MdeModulePkg/MdeModulePkg.dec OvmfPkg/OvmfPkg.dec -[Packages.AARCH64, Packages.RISCV64] +[Packages.AARCH64, Packages.RISCV64, Packages.LOONGARCH64] EmbeddedPkg/EmbeddedPkg.dec [LibraryClasses] @@ -48,7 +48,7 @@ DxeHardwareInfoLib QemuFwCfgLib -[LibraryClasses.AARCH64, LibraryClasses.RISCV64] +[LibraryClasses.AARCH64, LibraryClasses.RISCV64, LibraryClasses.LOONGARCH64] FdtLib [FeaturePcd] @@ -60,7 +60,7 @@ gEfiMmCommunication2ProtocolGuid ## PRODUCES gEfiSmmVariableProtocolGuid ## PRODUCES -[Protocols.AARCH64, Protocols.RISCV64] +[Protocols.AARCH64, Protocols.RISCV64, Protocols.LOONGARCH64] gFdtClientProtocolGuid [Guids] @@ -72,5 +72,5 @@ [Depex] gEfiCpuArchProtocolGuid -[Depex.AARCH64, Depex.RISCV64] +[Depex.AARCH64, Depex.RISCV64, Depex.LOONGARCH64] gFdtClientProtocolGuid