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>
This commit is contained in:
zhuyunfei 2026-07-02 14:06:32 +08:00 committed by mergify[bot]
parent 019a537496
commit f714e37e3b

View file

@ -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;