From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 36A3781FB4 for ; Tue, 7 Feb 2017 09:40:27 -0800 (PST) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AC7677FB67; Tue, 7 Feb 2017 17:40:27 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-81.phx2.redhat.com [10.3.116.81]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v17HeQnS007972; Tue, 7 Feb 2017 12:40:26 -0500 To: Ruiyu Ni , edk2-devel@ml01.01.org References: <20170207033305.609040-1-ruiyu.ni@intel.com> <20170207033305.609040-6-ruiyu.ni@intel.com> From: Laszlo Ersek Message-ID: <7cab4492-1bb7-d559-8ec4-74c7a0cf6e22@redhat.com> Date: Tue, 7 Feb 2017 18:40:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170207033305.609040-6-ruiyu.ni@intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 07 Feb 2017 17:40:27 +0000 (UTC) Subject: Re: [PATCH v3 5/6] OvmfPkg/IncompatiblePci: Do not use deprecated 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: Tue, 07 Feb 2017 17:40:27 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 02/07/17 04:33, Ruiyu Ni wrote: > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ruiyu Ni > Cc: Laszlo Ersek > --- > .../IncompatiblePciDeviceSupport.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c > index b6ff128..df9eb60 100644 > --- a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c > +++ b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c > @@ -4,6 +4,7 @@ > is not present), conserving 32-bit MMIO aperture for 32-bit BARs. > > Copyright (C) 2016, Red Hat, Inc. > + Copyright (c) 2017, 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 > @@ -66,19 +67,19 @@ STATIC CONST MMIO64_PREFERENCE mConfiguration = { > ) > ), > ACPI_ADDRESS_SPACE_TYPE_MEM, // ResType > - PCI_ACPI_UNUSED, // GenFlag > - PCI_ACPI_UNUSED, // SpecificFlag > + 0, // GenFlag > + 0, // SpecificFlag > 64, // AddrSpaceGranularity: > // aperture selection hint > // for BAR allocation PCI_ACPI_UNUSED expands to 0, so this is fine. > - PCI_ACPI_UNUSED, // AddrRangeMin > - PCI_BAR_OLD_ALIGN, // AddrRangeMax: > + 0, // AddrRangeMin > + 0, // AddrRangeMax: > // no special alignment > // for affected BARs PCI_BAR_OLD_ALIGN used to expand to 0xFFFFFFFFFFFFFFFFULL. In patch #2, the condtion that checks PCI_BAR_OLD_ALIGN is extended to cover both 0 (employed here) and the new macro OLD_ALIGN (which is being introduced in the same patch #2, for the old compat value 0xFFFFFFFFFFFFFFFFULL). So this looks good too. > - PCI_BAR_ALL, // AddrTranslationOffset: > + MAX_UINT64, // AddrTranslationOffset: > // hint covers all > // eligible BARs PCI_BAR_ALL expands to 0xFF. Patch #2 updates PciBusDxe to cover both 0xFF and MAX_UINT64. Okay. However, I notice whitespace corruption here: the "//" to the right of MAX_UINT64 no longer lines up with the rest of the comments. > - PCI_BAR_NOCHANGE // AddrLen: > + 0 // AddrLen: > // use probed BAR size > }, > // > PCI_BAR_NOCHANGE expands to 0, so this is fine. Ray, please fix up the whitespace corruption on the MAX_UINT64 line, before committing the patch. With that fixed: Reviewed-by: Laszlo Ersek Thanks! Laszlo