From nobody Sat Apr 27 06:07:19 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 152888002188367.41715692275113; Wed, 13 Jun 2018 01:53:41 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 009072128B326; Wed, 13 Jun 2018 01:53:41 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 B1E872124FDA7 for ; Wed, 13 Jun 2018 01:53:39 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2018 01:53:39 -0700 Received: from ray-dev.ccr.corp.intel.com ([10.239.9.4]) by orsmga005.jf.intel.com with ESMTP; 13 Jun 2018 01:53:38 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,218,1526367600"; d="scan'208";a="232200841" From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Wed, 13 Jun 2018 16:53:51 +0800 Message-Id: <20180613085351.18176-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.16.1.windows.1 Subject: [edk2] [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: , Cc: Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 excluding 3-byte first two fields. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Star Zeng Reviewed-by: 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/IncompatiblePciD= eviceSupport.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 available under the terms and conditions of the BSD = License which accompanies this distribution. The full text of the license may be = found at @@ -344,7 +344,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 (EFI_ACPI_ADDRESS_SPACE_DESCRIPTO= R) - 3; AcpiPtr->ResType =3D (UINT8) Dsc->ResType; AcpiPtr->GenFlag =3D (UINT8) Dsc->GenFlag; AcpiPtr->SpecificFlag =3D (UINT8) Dsc->SpecificFlag; --=20 2.16.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel