From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8AD0C211B6C1B for ; Wed, 13 Jun 2018 20:08:15 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2018 20:08:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,221,1526367600"; d="scan'208";a="63013031" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 13 Jun 2018 20:08:15 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 13 Jun 2018 20:08:14 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.223]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.51]) with mapi id 14.03.0319.002; Thu, 14 Jun 2018 11:08:13 +0800 From: "Zeng, Star" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [edk2] [PATCH] MdeModulePkg/IncompPciDeviceSupport: Use correct descriptor length Thread-Index: AQHUAvQSB1RCWjky3U6NzPNB6A07OqRfE9zw Date: Thu, 14 Jun 2018 03:08:12 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103BB57CC2@shsmsx102.ccr.corp.intel.com> References: <20180613085351.18176-1-ruiyu.ni@intel.com> In-Reply-To: <20180613085351.18176-1-ruiyu.ni@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/IncompPciDeviceSupport: Use correct descriptor length X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jun 2018 03:08:15 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ruiy= u Ni Sent: Wednesday, June 13, 2018 4:54 PM To: edk2-devel@lists.01.org Cc: Zeng, Star Subject: [edk2] [PATCH] MdeModulePkg/IncompPciDeviceSupport: Use correct de= scriptor length Per PI spec, the Length value is the length of the ACPI descriptor in bytes= , excluding the first two fields. The patch fixes the code to report the correct descriptor length by excludi= ng 3-byte first two fields. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Star Zeng --- .../IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c | 4 = ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/Incompati= blePciDeviceSupport.c b/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDx= e/IncompatiblePciDeviceSupport.c index 149662d14d..da8daba87d 100644 --- a/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciD= eviceSupport.c +++ b/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatibleP +++ ciDeviceSupport.c @@ -5,7 +5,7 @@ Incompatible PCI Device Support protocol allows the PCI bus driver to su= pport resource allocation for some PCI devices that do not comply with the PCI= Specification. =20 -Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made availab= le under the terms and conditions of the BSD License which accompanies thi= s distribution. The full text of the license may be found at @@ -344,7 +34= 4,7 @@ PCheckDevice ( Dsc =3D (EFI_PCI_RESOUCE_DESCRIPTOR *) (ListPtr + 1); =20 AcpiPtr->Desc =3D ACPI_ADDRESS_SPACE_DESCRIPTOR; - AcpiPtr->Len =3D (UINT16) sizeof (EFI_ACPI_ADDRESS_SPACE_DESCRIPTO= R); + AcpiPtr->Len =3D (UINT16) sizeof=20 + (EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR) - 3; AcpiPtr->ResType =3D (UINT8) Dsc->ResType; AcpiPtr->GenFlag =3D (UINT8) Dsc->GenFlag; AcpiPtr->SpecificFlag =3D (UINT8) Dsc->SpecificFlag; -- 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel