[edk2-devel] [edk2-platforms Patch 13/28] Vlv2TbltDevicePkg/AcpiPlatform: Fix the error from InstallAcpiTable

Sun, Zailiang zailiang.sun at intel.com
Fri Jul 12 02:37:15 UTC 2019


Reviewed-By: Zailiang Sun <zailiang.sun at intel.com>

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, July 11, 2019 3:05 AM
To: devel at edk2.groups.io
Cc: Gary Lin <glin at suse.com>; Sun, Zailiang <zailiang.sun at intel.com>; Qian, Yi <yi.qian at intel.com>
Subject: [edk2-platforms Patch 13/28] Vlv2TbltDevicePkg/AcpiPlatform: Fix the error from InstallAcpiTable

From: Gary Lin <glin at 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.sun at intel.com>
Cc: Yi Qian <yi.qian at intel.com>
Cc: Michael D Kinney <michael.d.kinney at intel.com>
Signed-off-by: Gary Lin <glin at 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 (#43628): https://edk2.groups.io/g/devel/message/43628
Mute This Topic: https://groups.io/mt/32419734/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list