From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c05::230; helo=mail-pg0-x230.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg0-x230.google.com (mail-pg0-x230.google.com [IPv6:2607:f8b0:400e:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8C13122402E10 for ; Wed, 28 Feb 2018 15:25:24 -0800 (PST) Received: by mail-pg0-x230.google.com with SMTP id i14so1570683pgv.3 for ; Wed, 28 Feb 2018 15:31:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=M2exM5VLuXx1dTMsf73s4Xi68vj4iJEh1YxIVTVMyoM=; b=EPyPG1QpVI4/SNK4RTClZmWdVyTe/JQU4+JYSj1pVRRumB48ecECuyne/Dz4Um6FRG 8pDWViU99/VKO7ycDzSCYSPVR60wxmFahSCkEN5+pCAn9yS12o4SshsiGqmnJdS2a/ph dnklLWvvnqIZ+Tx86YwZIU3ZXIaSxreritQuc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=M2exM5VLuXx1dTMsf73s4Xi68vj4iJEh1YxIVTVMyoM=; b=RlxDe69qaajeR13vqmbU8SyUhNsTYwS4y0Z5lUZoLeJHFUkH0ljNHqLU5cCWBfJOV6 73Cj+4P3/INLg6Wk+zW4tsiR8hLuK/bIEOU4CU7Jv9NG/TXsOeQtlV2J7QE5jFGvJ4v0 kgZ5K1i40Xsxrf40aW1xehzMAlilelwl2G/xpdI0LG3TJ8kElRKEK3LFOMZn4T6HWamd LCzUHjcWugj/aQY4MqufUDxpxEOnBFfv4sGad3kJtAmpOkdxbDMaHTdum1WMIBa/V1eA 5wyOG3nFzak9Y73vf0vxNXXGal1oFJuOzvC59XF3Ymbs4yQk/iqkrYgJCxVjhYKm1V72 5hHQ== X-Gm-Message-State: APf1xPCrdAzdEhfwebKJd9SROWE+DX2r+0a0FvrY6abLScj3xSLaaxb3 AGtD+/i+mFJsQSqvOmBagm6Wsg== X-Google-Smtp-Source: AG47ELsEXc+VETcbVphwrWh+dh9NqsIf2Q8EOZ8Nl9JgdTGBnq8NHY9iAUJic0YWNo0XR+F1GcfcKA== X-Received: by 10.101.81.76 with SMTP id g12mr5356893pgq.88.1519860691918; Wed, 28 Feb 2018 15:31:31 -0800 (PST) Received: from SZX1000114654 ([45.56.152.115]) by smtp.gmail.com with ESMTPSA id c7sm5713031pfg.36.2018.02.28.15.31.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2018 15:31:31 -0800 (PST) From: Guo Heyi X-Google-Original-From: Guo Heyi Date: Thu, 1 Mar 2018 07:31:26 +0800 To: Laszlo Ersek Cc: Guo Heyi , "Ni, Ruiyu" , Eric Dong , Ard Biesheuvel , edk2-devel@lists.01.org, Michael D Kinney , Star Zeng Message-ID: <20180228233126.GD27903@SZX1000114654> References: <1519697389-3525-2-git-send-email-heyi.guo@linaro.org> <563e76b9-ebbc-be09-d306-8dcb86f12112@Intel.com> <20180227093334.GA3918@SZX1000114654> <19deadb3-4d26-914c-c9f8-c6c6716746fa@Intel.com> <20180227104501.GD3918@SZX1000114654> <20180227114435.GH3918@SZX1000114654> <55c50dc9-4ce4-60a6-342c-35cd2f8d37cd@Intel.com> <17035d2f-3a5d-b3be-149d-d7179f173677@Intel.com> <20180228075348.GB27903@SZX1000114654> <7df05a7c-1161-5c4a-7720-5c27c6fd9129@redhat.com> MIME-Version: 1.0 In-Reply-To: <7df05a7c-1161-5c4a-7720-5c27c6fd9129@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [RFC v4 1/3] MdeModulePkg/PciHostBridgeDxe: Add support for address translation X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Feb 2018 23:25:24 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Feb 28, 2018 at 10:39:24AM +0100, Laszlo Ersek wrote: > On 02/28/18 08:53, Guo Heyi wrote: > > On Wed, Feb 28, 2018 at 03:25:03PM +0800, Ni, Ruiyu wrote: > > >> Heyi, > >> My understanding is this whole change is backward compatible. > >> Which means an old version of PciHostBridgeLib + new PciHostBridgeLib.h + > >> new PciHostBridgeDxe driver won't cause build failure. > >> right? > > > > Not really; as Laszlo indicated in one mail, some implementations of > > PciHostBridgeLib uses temporary PCI_ROOT_BRIDGE_APERTURE variables and only > > initialize Base and Limit fields of the variables, like the code in > > https://github.com/tianocore/edk2/blob/master/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c#L315 > > and > > https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c#L216 > > and > > https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c#L189 > > Right -- while Ray is asking whether this change can cause a build > failure (and no, it can't), it is true that some PciHostBridgeLib > instances don't fully clear some structures that "PciHostBridgeLib.h" > defines (only member-wise assignments exist). So client code has to be > patched up for functionality, not for build errors. > > > I'm also preparing the patches for these PciHostBridgeLib instances in edk2 > > tree, which are expected to be committed after PciHostBridgeLib.h change and > > before PciHostBridge driver change. > > That's a great idea; it should help with bisectability. > > In fact, you could submit those patches first (even independently); I > think they'd mostly just insert a few well-placed ZeroMem() calls. One > could argue that they should have been added right from the start (we > expected the "PciHostBridgeLib.h" structures to expand over time, just > missed a few init spots for them). That's a good idea. I'll do that. Thanks, Heyi > > Thanks, > Laszlo