From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 5591A81F91 for ; Tue, 7 Feb 2017 16:58:29 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 07 Feb 2017 16:58:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208,217";a="1092102422" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 07 Feb 2017 16:58:28 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 7 Feb 2017 16:58:28 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 7 Feb 2017 16:58:27 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.59]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Wed, 8 Feb 2017 08:58:26 +0800 From: "Ni, Ruiyu" To: Laszlo Ersek , "edk2-devel@ml01.01.org" CC: "Fan, Jeff" Thread-Topic: [edk2] [PATCH v3 6/6] MdePkg/Pci22.h: Deprecate out-of-Spec IncompatiblePciDevice macros Thread-Index: AQHSgPL8lD1PO5UtUk2oxUBtiC35xKFdS1UAgAD+wHA= Date: Wed, 8 Feb 2017 00:58:26 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B89997B@SHSMSX104.ccr.corp.intel.com> References: <20170207033305.609040-1-ruiyu.ni@intel.com> <20170207033305.609040-7-ruiyu.ni@intel.com> <1d671f45-3c0f-e036-7f93-8708c6e4ef68@redhat.com> In-Reply-To: <1d671f45-3c0f-e036-7f93-8708c6e4ef68@redhat.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDQ0YjE1MTgtZGRiZi00ZjMxLTgxOWYtMGY3ZWJmNjY1MDcyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjlreUtQZHZtcWU2NjRVMzJsOERiK2RKMUwreDJYSlwvR2hPU2c5Nk1IVXFzPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [PATCH v3 6/6] MdePkg/Pci22.h: Deprecate out-of-Spec IncompatiblePciDevice macros X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2017 00:58:29 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable These macros comply with the spec so I had no reason to deprecate them. But I did want to avoid using them in drivers. Maybe I could just deprecate the two macros PCI_ACPI_UNUSED and PCI_BAR_NOC= HANGE. What do you think? Regards, Ray From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Lasz= lo Ersek Sent: Wednesday, February 8, 2017 1:43 AM To: Ni, Ruiyu ; edk2-devel@ml01.01.org Cc: Fan, Jeff Subject: Re: [edk2] [PATCH v3 6/6] MdePkg/Pci22.h: Deprecate out-of-Spec In= compatiblePciDevice macros On 02/07/17 04:33, Ruiyu Ni wrote: > DEVICE_ID_NOCARE is defined as 0xFFFF but Spec says (UINT64) -1 > should be used to match any VendorId/DeviceId/RevisionId/ > SubsystemVendorId/SubsystemDeviceId. > > PCI_BAR_OLD_ALIGN/PCI_BAR_EVEN_ALIGN/PCI_BAR_SQUAD_ALIGN/ > PCI_BAR_DQUAD_ALIGN are defined but Spec doesn't have such > definitions. > > PCI_BAR_ALL is defined as 0xFF but Spec says (UINT64) -1 should be > used to match all BARs. > > All of the above macros are marked as deprecated. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ruiyu Ni > > Reviewed-by: Liming Gao > > Cc: Jeff Fan > > --- > MdePkg/Include/IndustryStandard/Pci22.h | 24 +++++++++++++++++------- > 1 file changed, 17 insertions(+), 7 deletions(-) > > diff --git a/MdePkg/Include/IndustryStandard/Pci22.h b/MdePkg/Include/Ind= ustryStandard/Pci22.h > index 4cf8389..5dec65d 100644 > --- a/MdePkg/Include/IndustryStandard/Pci22.h > +++ b/MdePkg/Include/IndustryStandard/Pci22.h > @@ -7,7 +7,7 @@ > PC Card Standard, 8.0 > PCI Power Management Interface Specifiction, Revision 1.2 > > - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
> Copyright (c) 2014 - 2015, Hewlett-Packard Development Company, L.P. > This program and the accompanying materials > are licensed and made available under the terms and conditions of the = BSD License > @@ -780,14 +780,25 @@ typedef struct { > /// > } EFI_PCI_CAPABILITY_HOTPLUG; > > -#define DEVICE_ID_NOCARE 0xFFFF > +/// > +/// Below macros (till PCI_BAR_NOCHANGE) were used by EfiIncompatiblePci= DeviceSupport Protocol. > +/// > +#ifndef DISABLE_NEW_DEPRECATED_INTERFACES > + > +/// > +/// [ATTENTION] These macros are deprecated because they don't match Spe= c or not defined in Spec. > +/// > +#define DEVICE_ID_NOCARE 0xFFFF ///< Deprecated. Valu= e doesn't match Spec. > +#define PCI_BAR_OLD_ALIGN 0xFFFFFFFFFFFFFFFFULL ///< Deprecated. Valu= e isn't defined in Spec. > +#define PCI_BAR_EVEN_ALIGN 0xFFFFFFFFFFFFFFFEULL ///< Deprecated. Valu= e isn't defined in Spec. > +#define PCI_BAR_SQUAD_ALIGN 0xFFFFFFFFFFFFFFFDULL ///< Deprecated. Valu= e isn't defined in Spec. > +#define PCI_BAR_DQUAD_ALIGN 0xFFFFFFFFFFFFFFFCULL ///< Deprecated. Valu= e isn't defined in Spec. > +#define PCI_BAR_ALL 0xFF ///< Deprecated. Valu= e doesn't match Spec. > + > +#endif > > #define PCI_ACPI_UNUSED 0 > #define PCI_BAR_NOCHANGE 0 Any particular reason for not deprecating these two macros? Is it an oversight, or is it intentional to keep them? (If they comply with the spec, then replacing them in patch #5 seems unwarranted.) Thanks, Laszlo > -#define PCI_BAR_OLD_ALIGN 0xFFFFFFFFFFFFFFFFULL > -#define PCI_BAR_EVEN_ALIGN 0xFFFFFFFFFFFFFFFEULL > -#define PCI_BAR_SQUAD_ALIGN 0xFFFFFFFFFFFFFFFDULL > -#define PCI_BAR_DQUAD_ALIGN 0xFFFFFFFFFFFFFFFCULL > > #define PCI_BAR_IDX0 0x00 > #define PCI_BAR_IDX1 0x01 > @@ -795,7 +806,6 @@ typedef struct { > #define PCI_BAR_IDX3 0x03 > #define PCI_BAR_IDX4 0x04 > #define PCI_BAR_IDX5 0x05 > -#define PCI_BAR_ALL 0xFF > > /// > /// EFI PCI Option ROM definitions > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel