From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=17.171.2.34; helo=mail-in24.apple.com; envelope-from=afish@apple.com; receiver=edk2-devel@lists.01.org Received: from mail-in24.apple.com (mail-out24.apple.com [17.171.2.34]) (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 36B5C210E0F8E for ; Fri, 1 Jun 2018 13:50:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1527886214; x=2391799814; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=i69n0/GQyKg8sSl0IVB/XRCI+iHX1lmG9a4hFgqQKK0=; b=jGUTMSoKiQ8GQZPgEpp6Kc7Ix2M2WEWGwHsUvcyopbuurXFh/5k73KLIV4ThlrVE WPBUWoGlSFvVyFzJxIIRecx6jBWl0uXNDW+fCtLxhoUu/+Jq1zmMLZ/O6nBeneS2 dsKwZgDdJye/DF7/EuErRhGk5UefUEPz4zdtKikFgacw88aadsZXjaoclzv/wuJc +CB9UDUCmtqktyuW07JkGx7LdBKGgnZNkRVjmbhoBLHDR5TyHwKlNZbQlFBtXDwr gu9V/XVMM/2ukplCPfv19vZnscaRftW7rKU0qxasfoRyCMjkQuSWhM1CM/IyCORq mfmwMVbq/e+eDj1N+lsrTQ==; X-AuditID: 11ab0218-0d1ff70000001a2c-e8-5b11b186a62c Received: from ma1-mtap-s03.corp.apple.com (ma1-mtap-s03.corp.apple.com [17.40.76.7]) (using TLS with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail-in24.apple.com (Apple Secure Mail Relay) with SMTP id D2.AA.06700.681B11B5; Fri, 1 Jun 2018 13:50:14 -0700 (PDT) MIME-version: 1.0 Received: from nwk-mmpp-sz10.apple.com (nwk-mmpp-sz10.apple.com [17.128.115.122]) by ma1-mtap-s03.corp.apple.com (Oracle Communications Messaging Server 8.0.2.2.20180329 64bit (built Mar 29 2018)) with ESMTPS id <0P9N005EJWJPYOI0@ma1-mtap-s03.corp.apple.com>; Fri, 01 Jun 2018 13:50:14 -0700 (PDT) Received: from [17.235.59.75] (unknown [17.235.59.75]) by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.2.20180403 64bit (built Apr 3 2018)) with ESMTPSA id <0P9N0008IWJNT190@nwk-mmpp-sz10.apple.com>; Fri, 01 Jun 2018 13:50:13 -0700 (PDT) X-Va-A: X-Va-T-CD: 803903dd66918d677506895fb793f755 X-Va-E-CD: 5aa62536fdac6fb68b67faaca3a6b192 X-Va-R-CD: 102b4971e1d4b9e5cd10bf7bdd220adf X-Va-CD: 0 X-Va-ID: d6946cbf-905f-4908-88c0-c88b5cd2b098 X-V-A: X-V-T-CD: 709bdf42f2ba4120645d9f44cf9181fd X-V-E-CD: 5aa62536fdac6fb68b67faaca3a6b192 X-V-R-CD: 102b4971e1d4b9e5cd10bf7bdd220adf X-V-CD: 0 X-V-ID: eb6c467c-d951-48ba-aac4-699b695ae3a4 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-01_13:,, signatures=0 Sender: afish@apple.com From: Andrew Fish Message-id: <5711A2C2-F8D1-452D-917C-107C680A78C3@apple.com> Date: Fri, 01 Jun 2018 13:50:10 -0700 In-reply-to: <201805281336.10118.wpaul@windriver.com> Cc: edk2-devel@lists.01.org, "Ni, Ruiyu" , Laszlo Ersek To: Bill Paul References: <110011b4-f9cc-9f8b-53f8-f12cfe7416b2@redhat.com> <734D49CCEBEEF84792F5B80ED585239D5BD0C8CB@SHSMSX104.ccr.corp.intel.com> <201805281336.10118.wpaul@windriver.com> X-Mailer: Apple Mail (2.3445.6.18) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHIsWRmVeSWpSXmKPExsUiqOHDrtu2UTDaYM9iTos9h44yWyw7toPF 4mXPanaLe3MnsjmweCze85LJo3v2PxaP9/uusnms37KVKYAlissmJTUnsyy1SN8ugSuj6fEp toIld5krJvdMZm1gfLmIuYuRk0NCwERix9GbrF2MXBxCAvuZJDZMus8EkuAVEJT4MfkeC4jN LBAmse39WzaIoo1MEs9XTGaGcPqZJLpfHmaDGMUu8efXDhYIW1ti5tUWdhi76XUrG4z9dMpx qDiXxIKtp1khbF2JiTM3QdlsEutPLGGCsLUk7p1/wAhj77j3H87+cm0q1ExOifNfJkLN1JH4 fOEoVG+2xKUz68HeFBYQl3h3ZhOYzSagLLFi/gd2iC9tJN5fXMQEUaMv8fzUUzCbRUBV4t7v E2D1nAKmEvuv/2SFhESixL7/PUA3cHCIAM3pXlkECYdNjBI3eu9B3aYk8X/XEeYJjLKzkAJy FlJAQthaEt8ftQLFOYBseYmD52UhwpoSz+59YoewtSWevLvAuoCRbRWjcG5iZo5uZp6RiV5i QUFOql5yfu4mRlACWc0ksYPxy2vDQ4wCHIxKPLw/HASjhVgTy4orcw8xSnOwKInzLg7iiBYS SE8sSc1OTS1ILYovKs1JLT7EyMTBKdXAGDr1zrnzzxvX+17fHfpBQSzKNmZ+WKR5StcVduWA o7JH44SVZ8elzkkq3M70j13h8PWpWw4rPg+J7OgsfPSqOm1JVuYhVm43w5Km3cE7inZLH7R/ c/71TrPPPzYE/ZTVXz+JPdu8bVqtREZW67qqrdN2JBU7z1/OI24gtUTOTmLrQlf7RTHrlViK MxINtZiLihMB4h+16AEDAAA= X-Content-Filtered-By: Mailman/MimeDel 2.1.26 Subject: Re: PciSegmentInfoLib instances 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: , X-List-Received-Date: Fri, 01 Jun 2018 20:50:15 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT > On May 28, 2018, at 1:36 PM, Bill Paul wrote: > > Of all the gin joints in all the towns in all the world, Ni, Ruiyu had to walk > into mine at 19:55 on Sunday 27 May 2018 and say: > >> No. There is no such instance. >> >> My understanding: >> Segment is just to separate the PCI devices to different groups. >> Each group of devices use the continuous BUS/IO/MMIO resource. >> Each group has a BASE PCIE address that can be used to access PCIE >> configuration in MMIO way. > > This makes it sound like an either/or design choice that a hardware designer > can make simply for some kind of convenience, and I don't think that's the > case. > Bill, I thought Ray was saying that a segmented API works on a non segmented architecture. I think that is a true statement. A single segment could also be comprised of multiple PCI host bridges. This was common on the old Intel PCI server chipsets. The Intel client chipsets hid everything behind PCI to PCI bridges and default PC behavior (OxCF8/0xCFC). I was not clear from your comment are you saying there is a place we are passing around bus/dev.func and it is broken? The device paths are covered since they start with an ACPI node, and they only store dev/func so you always get the same result even if buses get added. For a spec and implementation point of view we tried hard to make sure we did not have any limiting assumptions. Thanks, Andrew Fish > Segments typically indicate completely separate host/PCI interfaces. For > example, I've seen older Intel boards with both 32-bit/33MHz slots and 64- > bit/66MHz slots. This was not done with a bridge: each set of slots was tied > to a completely separate host PCI bridge and hence each was a separate > segment. This was required in order to support legacy 32-bit/33MHz devices > without forcing the 64-bit/66MHz devices down to 33MHz as well. > > With PCIe, on platforms other than Intel, each root complex would also be a > separate segment. Each root complex would have its own bus/dev/func namespace, > its own configuration space access method, and its own portion of the physical > address space into which to map BARs. This means that you could have two or > more different devices with the same bus/dev/func identifier tuple, meaning > they are not unique on a platform-wide basis. > > At the hardware level, PCIe may be implemented similarly on Intel too, but > they hide some of the details from you. The major difference is that even in > cases where you may have multiple PCIe channels, they all share the same > bus/dev/func namespace so that you can pretend the bus/dev/func tuples are > unique platform-wide. The case where you would need to advertise multiple > segments arises where there's some technical roadblock that prevents > implementing this illusion of a single namespace in a completely transparent > way. > > In the case of the 32-bit/64-bit hybrid design I mentioned above, scanning the > bus starting from bus0/dev0/func0 would only allow you to automatically > discover the 32-bit devices because there was no bridge between the 32-bit and > 64-bit spaces. The hardware allows you to issue configuration accesses to both > spaces using the same 0xcf8/0xcfc registers, but in order to autodiscover the > 64-bit devices, you needed know ahead of time to also scan starting at > bus1/dev0/func0. But the only way to know to do that was to check the > advertised segments in the ACPI device table and honor their starting bus > numbers. > >> So with the above understanding, even a platform which has single segment >> can be implemented as a multiple segments platform. > > I would speculate this might only be true on Intel. :) Intel is the only > platform that creates the illusion of a single bus/dev/func namespace for > multiple PCI "hoses," and it only does that for backward compatibility > purposes (i.e. to make Windows happy). Without that gimmick, each segment > would be a separate tree rooted at bus0/dev0/func0, and there wouldn't be much > point to doing that if you only had a single root complex. > > -Bill > >> Thanks/Ray >> >>> -----Original Message----- >>> From: edk2-devel On Behalf Of Laszlo >>> Ersek >>> Sent: Wednesday, May 23, 2018 3:38 PM >>> To: Ni, Ruiyu >>> Cc: edk2-devel-01 >>> Subject: [edk2] PciSegmentInfoLib instances >>> >>> Hi Ray, >>> >>> do you know of any open source, non-Null, PciSegmentInfoLib instance? >>> (Possibly outside of edk2?) >>> >>> More precisely, it's not the PciSegmentInfoLib instance itself that's of >>> particular interest, but the hardware and the platform support code that >>> offer multiple PCIe segments. >>> >>> Thanks >>> Laszlo >>> _______________________________________________ >>> edk2-devel mailing list >>> edk2-devel@lists.01.org >>> https://lists.01.org/mailman/listinfo/edk2-devel >> >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel > -- > ============================================================================= > -Bill Paul (510) 749-2329 | Senior Member of Technical Staff, > wpaul@windriver.com | Master of Unix-Fu - Wind River Systems > ============================================================================= > "I put a dollar in a change machine. Nothing changed." - George Carlin > ============================================================================= > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel