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: zailiang.sun@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Thu, 11 Jul 2019 19:37:25 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2019 19:37:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,480,1557212400"; d="scan'208";a="168195539" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga007.fm.intel.com with ESMTP; 11 Jul 2019 19:37:25 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 11 Jul 2019 19:37:25 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.110]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.22]) with mapi id 14.03.0439.000; Fri, 12 Jul 2019 10:37:15 +0800 From: "Sun, Zailiang" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: Gary Lin , "Qian, Yi" Subject: Re: [edk2-platforms Patch 13/28] Vlv2TbltDevicePkg/AcpiPlatform: Fix the error from InstallAcpiTable Thread-Topic: [edk2-platforms Patch 13/28] Vlv2TbltDevicePkg/AcpiPlatform: Fix the error from InstallAcpiTable Thread-Index: AQHVN1J3AueQsGAOeUqUxJdvBPKTmabGRsQg Date: Fri, 12 Jul 2019 02:37:15 +0000 Message-ID: <7CB7EF03E15B5D48981329A508747A9850C963A4@SHSMSX104.ccr.corp.intel.com> References: <20190710190516.6012-1-michael.d.kinney@intel.com> <20190710190516.6012-14-michael.d.kinney@intel.com> In-Reply-To: <20190710190516.6012-14-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: zailiang.sun@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-By: Zailiang Sun -----Original Message----- From: Kinney, Michael D=20 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 t= he error from InstallAcpiTable From: Gary Lin The firmware crashed when installing ACPI tables: ASSERT_EFI_ERROR (Status =3D 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 =3D AcpiTable->InstallAcpiTable ( AcpiTable, CurrentTable, - Size, + CurrentTable->Length, &TableHandle ); ASSERT_EFI_ERROR (AcpiStatus); -- 2.21.0.windows.1