summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhuyunfei <zhuyunfei@loongson.cn>2026-07-02 14:06:32 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2026-07-02 11:18:20 +0000
commitf714e37e3b71ff02ec0b63c9710d679753f9cbb2 (patch)
treee8d192b3ff7b6696767eb5225622d47469a7b2bc
parent019a537496799dbc4cfa3d3c448690ec971faf74 (diff)
downloadedk2-f714e37e3b71ff02ec0b63c9710d679753f9cbb2.tar.gz
edk2-f714e37e3b71ff02ec0b63c9710d679753f9cbb2.zip
OvmfPkg/LoongArchVirt: Fix ResetSystemLibConstructor signature and header
The ResetSystemLibConstructor was incorrectly declared with EFI_API and a UEFI driver entry point signature (ImageHandle, SystemTable), but it is actually a library constructor that should use EFIAPI and take no arguments (VOID) as per EDK2 library constructor conventions. This mismatch caused compilation errors when enabling TPM2 support for LoongArchVirt. - Add missing <IndustryStandard/Acpi.h> include - Replace EFI_API with EFIAPI - Change constructor signature from (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) to (VOID) Signed-off-by: zhuyunfei <zhuyunfei@loongson.cn> Signed-off-by: gaoqihang <gaoqihang@loongson.cn> Reviewed-by: qiandongyan <qiandongyan@loongson.cn> Reviewed-by: lichao <lichao@loongson.cn>
-rw-r--r--OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGed.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGed.c b/OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGed.c
index a88ed2ace4..405f0e0c63 100644
--- a/OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGed.c
+++ b/OvmfPkg/LoongArchVirt/Library/ResetSystemAcpiLib/BaseResetSystemAcpiGed.c
@@ -10,6 +10,7 @@
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/QemuFwCfgLib.h>
+#include <IndustryStandard/Acpi.h>
#include "ResetSystemAcpiGed.h"
/**
@@ -130,10 +131,9 @@ Done:
@retval EFI_NOT_FOUND Failed to initialize mPowerManager.
**/
EFI_STATUS
-EFI_API
+EFIAPI
ResetSystemLibConstructor (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+ VOID
)
{
EFI_STATUS Status;