From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mx.groups.io with SMTP id smtpd.web11.52096.1677007100172355462 for ; Tue, 21 Feb 2023 11:18:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cfbtkKlG; spf=pass (domain: gmail.com, ip: 209.85.216.43, mailfrom: pedro.falcato@gmail.com) Received: by mail-pj1-f43.google.com with SMTP id h17-20020a17090aea9100b0023739b10792so651232pjz.1 for ; Tue, 21 Feb 2023 11:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=biKp8W9i0OqhMaeVwrtnPk3cT/KhwSV7BHEVGV2Vq+M=; b=cfbtkKlGKo8YMSSGuZDQIJQkZ5vIQabzMYn2vetzCDmq8msDzmZlI09Kgb2euMnGeu sphRkSRlA+2+lKvF7CV7aRB1Kvw+DapbM4IH3+h9Um7PUKo8gr7vhO3omykiia/4GzYH MEgfO1udu+tItwY8cDmRoQaKBNNOIVWJ3kOTLwNgcBK1yzBBjTObqNrbc1jdRxyYDqYT /cBz5Xl1Po1xTQebfg3lzhyrFpRQk2XAN1sYR7EcA++hF4E4EbhljbVlAlqj5No+bwFW KwdhZMKHlNSPLvQdl0TiZIuAP0boB5Cpv5ie1+TbI5LhFuV3ALZ8uGagCynKtdf70FR2 WGKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=biKp8W9i0OqhMaeVwrtnPk3cT/KhwSV7BHEVGV2Vq+M=; b=k05woShmt7QvCzeOjJM7L5MbSrxLgjxUUu292XIk6bexaIrT3SpvdfB5Te2aW1TuIM gAlXhHYZx0PFf16HmBEzOFCP0AvINCokxNbittvSgz/obagyLt5h3Ox7PTbEZt44l03n BsWsGlRKTIy2YmQpNpCtiKF+ov5qdtTYYoyFjc3M5lkNLnQw5Q5Pli2y5cn8Jle9/AcQ 9a5Tq3DEbRnnsFPZrA9SMmN6PIyiXJBDTH1KBE8TwiNQ5IRvy5/jGHAEa/Q6fkFSKse3 Bv27dhXDyusLlWf4VKB+73Hs9JXpOwPllccQkHOuqeQm/RdmVSbxClo/G4dM5S7mfUuP 3r6g== X-Gm-Message-State: AO0yUKVluk74cJeree94Av+19TKhuYxK1yhhNz2mP3e0jY+AgCYW0+dG t4bi+CU0mg14Ry5Fgchi4lgyqYPAaLmk9MrFBd8EIpOf+8o= X-Google-Smtp-Source: AK7set/BS4ueHf3jDbKz1VkBY79hE7ulHjey4yq/oJ/SyCHpP2jTDN1gimWVGVwq/UJT3lTIxiJeaHYQQAK1Fe33iKE= X-Received: by 2002:a17:90b:2704:b0:237:28e3:4f06 with SMTP id px4-20020a17090b270400b0023728e34f06mr528756pjb.62.1677007099259; Tue, 21 Feb 2023 11:18:19 -0800 (PST) MIME-Version: 1.0 References: <153cddfb.10e9.183a7eb0792.Coremail.yoshinoyatoko@163.com> <74daa6ed.1623.184553d61a8.Coremail.yoshinoyatoko@163.com> <229C72F3-0994-425F-8D89-B3CB3ACCA8CE@apple.com> <2ee1fd81.20a.1866204f2cb.Coremail.yoshinoyatoko@163.com> In-Reply-To: <2ee1fd81.20a.1866204f2cb.Coremail.yoshinoyatoko@163.com> From: "Pedro Falcato" Date: Tue, 21 Feb 2023 19:18:07 +0000 Message-ID: Subject: Re: [edk2-devel] PciBus scan: Does it support scan from EndBusNum to StartBusNum? To: devel@edk2.groups.io, yoshinoyatoko@163.com Content-Type: text/plain; charset="UTF-8" On Tue, Feb 21, 2023 at 3:08 AM Yoshinoya wrote: > > Hi > Usually PciBus scan is from low bus num to high bus num. > > So, does it support scan from end bus num to start bus num? > > Thanks Hi, What do you mean? Why do you want this? Do you want to number buses in reverse? That is technically doable (apart from probably the host bridge itself) but absolutely useless. If you mean "order of enumeration", then no. It is not possible. As PCI(e) topology works, you always start at the host bridge(s) (00:00.0) and its bus (bus 0, by definition), and then walk through whatever bridges you find. You cannot really start at any other place, unless you do some silly bruteforce method where you probe every bus for a device; and that method would not allow you to configure the buses and their BARs, as you need to. -- Pedro