From 10342a643f4a6f89a86746c42f2ebcc1f02359f0 Mon Sep 17 00:00:00 2001 From: jyao1 Date: Mon, 3 Dec 2012 01:06:28 +0000 Subject: [PATCH] Fix build error. ACPI4.0/5.0 have clear description: FIRMWARE_CTRL: If the X_FIRMWARE_CTRL field contains a non zero value then this field must be zero. X_FIRMWARE_CTRL: This field is used when the physical address of the FACS is above 4GB. If the FIRMWARE_CTRL field contains a non zero value then this field must be zero. Update code in AcpiSupport/AcpiTable when it produces this field to set one only. Update code in AcpiS3Save when it consumes this field, check 0 value. Signed-off-by: jiewen.yao@intel.com Reviewed-by: star.zeng@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13981 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c index dfd1669ab1..56a83125e6 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c @@ -720,7 +720,7 @@ AddTableToList ( // Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and // vice-versa. // - if ((UINT64)(UINTN)AcpiSupportInstance->Facs3 < BASE_4GB) { + if ((UINT64)(UINTN)AcpiTableInstance->Facs3 < BASE_4GB) { AcpiTableInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiTableInstance->Facs3; } else { Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3; @@ -849,7 +849,7 @@ AddTableToList ( // Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and // vice-versa. // - if ((UINT64)(UINTN)AcpiSupportInstance->Facs3 < BASE_4GB) { + if ((UINT64)(UINTN)AcpiTableInstance->Facs3 < BASE_4GB) { AcpiTableInstance->Fadt3->FirmwareCtrl = (UINT32) (UINTN) AcpiTableInstance->Facs3; } else { Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Facs3;