Reviewed-By: Zailiang Sun
-Original Message-
From: Kinney, Michael D
Sent: Thursday, July 11, 2019 3:05 AM
To: devel@edk2.groups.io
Cc: Gary Lin ; Sun, Zailiang ; Qian, Yi
Subject: [edk2-platforms Patch 13/28] Vlv2TbltDevicePkg/AcpiPlatform: Fix the
error from InstallAcpiTable
From: Gary Lin
The firmware crashed when installing ACPI tables:
ASSERT_EFI_ERROR (Status = Invalid Parameter) ASSERT [AcpiPlatform]
edk2-platforms/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c(1162):
!EFI_ERROR (AcpiStatus)
The 'Size' from ReadSection() is not the size of the ACPI table so
InstallAcpiTable() returned EFI_INVALID_PARAMETER.
Use the 'Length' from the header to avoid the crash.
Cc: Zailiang Sun
Cc: Yi Qian
Cc: Michael D Kinney
Signed-off-by: Gary Lin
---
Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
index f3efc41e31..72edc1bc1e 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
+++ b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c
@@ -1152,7 +1152,7 @@ AcpiPlatformEntryPoint (
AcpiStatus = AcpiTable->InstallAcpiTable (
AcpiTable,
CurrentTable,
- Size,
+ CurrentTable->Length,
);
ASSERT_EFI_ERROR (AcpiStatus);
--
2.21.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#43628): https://edk2.groups.io/g/devel/message/43628
Mute This Topic: https://groups.io/mt/32419734/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-