From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: michael.d.kinney@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Wed, 10 Jul 2019 12:05:21 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2019 12:05:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,475,1557212400"; d="scan'208";a="171008186" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.241.98.74]) by orsmga006.jf.intel.com with ESMTP; 10 Jul 2019 12:05:20 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Gary Lin , Zailiang Sun , Yi Qian Subject: [edk2-platforms Patch 13/28] Vlv2TbltDevicePkg/AcpiPlatform: Fix the error from InstallAcpiTable Date: Wed, 10 Jul 2019 12:05:01 -0700 Message-Id: <20190710190516.6012-14-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190710190516.6012-1-michael.d.kinney@intel.com> References: <20190710190516.6012-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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, &TableHandle ); ASSERT_EFI_ERROR (AcpiStatus); -- 2.21.0.windows.1