diff options
author | Gary Lin <glin@suse.com> | 2019-07-02 14:50:44 +0800 |
---|---|---|
committer | Michael D Kinney <michael.d.kinney@intel.com> | 2019-07-12 17:29:36 -0700 |
commit | 3ca17630b7bed9aa5601f2db94252646f869e3a4 (patch) | |
tree | f99dad2a704452f21c55dcaca02e24f1cb039057 /Platform | |
parent | 709e3837b643a835876cf609d3bac90421ca9c34 (diff) |
Vlv2TbltDevicePkg/AcpiPlatform: Fix the error from InstallAcpiTable
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@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Zailiang Sun <zailiang.sun@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'Platform')
-rw-r--r-- | Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c b/Platform/Intel/Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.c index f3efc41e..72edc1bc 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);
|