From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web08.8197.1623853246895528051 for ; Wed, 16 Jun 2021 07:20:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i4utpk3R; spf=pass (domain: kernel.org, ip: 198.145.29.99, mailfrom: ardb@kernel.org) Received: by mail.kernel.org (Postfix) with ESMTPSA id 4FE8B6109D for ; Wed, 16 Jun 2021 14:20:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623853246; bh=ZCbvu/ZO4uQqfofgj3Xf6msM5SsCuZS6mIAGSyS9Yeo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=i4utpk3RTHcdCqYyN39UcyIvQfXbwD78FnbQ60F3Kh50BLOX7jX1hQJ7Hnh5nkLzq S3Z1HkfnGHDSnaCQKyFSGRRYmHXBQ0DuQ2A6hwUDwqnudbAMUgKUrtXDqokKES7P7q PL0HujJSHlMG8uhTXz1NmvCroIuIe/7Z6HyLF6C6MFlVR966+9q7rwJSj66hhDqlxC C/4QObgJSZ88Y1HEE/TgMELq0Xj39+RnNWD3SAA/emSVnyi2FlLg+0BTkD0WuAs3/h nds+ZQWafTK5p9a9bxBoyolBiNCLKE411Xh/k99WTIZ1zkIWoIV+sWTZm77L1AduQP NPdn4Rq8dsdgQ== Received: by mail-oi1-f174.google.com with SMTP id c13so2656977oib.13 for ; Wed, 16 Jun 2021 07:20:46 -0700 (PDT) X-Gm-Message-State: AOAM530jo2zsBk5XRrRA4stVXP4kwdQGMEks+yhzZQ1jrZaB513XJX3T i4VSNQ5GqxHxPSEIR235On78bPibaRZwwaHq5YE= X-Google-Smtp-Source: ABdhPJwIRXJfGthWOhu0q2X6LdnSffzmvwedmfuuTd+/vBOzIxfneWphA8NBFuS8vOYTG/z9xVjHk5ySU1KerpZk4zA= X-Received: by 2002:a54:460a:: with SMTP id p10mr7212523oip.47.1623853245704; Wed, 16 Jun 2021 07:20:45 -0700 (PDT) MIME-Version: 1.0 References: <20210526100724.5359-1-nhi@os.amperecomputing.com> <20210526100724.5359-18-nhi@os.amperecomputing.com> <5db4a526-8c62-3635-985f-0625b9040bc0@os.amperecomputing.com> In-Reply-To: <5db4a526-8c62-3635-985f-0625b9040bc0@os.amperecomputing.com> From: "Ard Biesheuvel" Date: Wed, 16 Jun 2021 16:20:34 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-platforms][PATCH v2 16/32] AmpereAltraPkg: Add PciHostBridge driver To: Nhi Pham Cc: Leif Lindholm , edk2-devel-groups-io , Vu Nguyen , Thang Nguyen , Chuong Tran , Phong Vo , Michael D Kinney , Ard Biesheuvel , Nate DeSimone Content-Type: text/plain; charset="UTF-8" On Tue, 15 Jun 2021 at 17:54, Nhi Pham wrote: > > On 6/9/21 12:29, Ard Biesheuvel wrote: > > On Wed, 26 May 2021 at 12:12, Nhi Pham wrote: > >> From: Vu Nguyen > >> > >> The roles of this driver: > >> * Consume PcieCoreLib to initialize all enable PCIe controllers. > >> * Produce neccessary protocols like RootBridgeIo an ResourceAllocation > >> which will be used later by PciBus. > >> > >> Cc: Thang Nguyen > >> Cc: Chuong Tran > >> Cc: Phong Vo > >> Cc: Leif Lindholm > >> Cc: Michael D Kinney > >> Cc: Ard Biesheuvel > >> Cc: Nate DeSimone > >> > >> Signed-off-by: Vu Nguyen > > Why do you need a re-implementation of PciHostBridgeDxe for any of > > this? There is very little h/w specific code there, and it is all > > customizable using PciHostBridgeLib and PciSegmentLib (among others) > > > > There are a couple of examples of this in edk2-platforms - please take > > a look at those, and if that does not give you enough wiggle room, > > let's see if we can accommodate your needs in PciHostBridgeDxe itself. > > > Hi Leif, Ard, > > Thanks for your comments. The current implementation which has little > deltas comparing with the standard one has been well-tested. It's a good > idea that we need to re-implement it based on Ard's suggestion, but it > will take time and we need to make sure that it is well-tested > internally before getting it out. That is reasonable. > So, we want to keep this current > implementation but we will start looking at working the > re-implementation in the future. > I would prefer to wait for this to happen, rather than merge 4000+ lines of code which are almost identical to the original, without any agreement on when it can be removed again. Thanks, Ard.