From: Gary Lin <g...@suse.com>

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 <zailiang....@intel.com>
Cc: Yi Qian <yi.q...@intel.com>
Cc: Michael D Kinney <michael.d.kin...@intel.com>
Signed-off-by: Gary Lin <g...@suse.com>
---
 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,
                                       &TableHandle
                                       );
           ASSERT_EFI_ERROR (AcpiStatus);
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43501): https://edk2.groups.io/g/devel/message/43501
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]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to