From nobody Sat May 10 07:08:16 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) client-ip=80.81.252.135; envelope-from=seabios-bounces@seabios.org; helo=mail.coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org Return-Path: Received: from mail.coreboot.org (mail.coreboot.org [80.81.252.135]) by mx.zohomail.com with SMTPS id 1500470465960959.9639078650619; Wed, 19 Jul 2017 06:21:05 -0700 (PDT) Received: from [127.0.0.1] (helo=ra.coresystems.de) by mail.coreboot.org with esmtp (Exim 4.86_2) (envelope-from ) id 1dXosL-0004gs-1O; Wed, 19 Jul 2017 15:18:49 +0200 Received: from mail-lf0-f68.google.com ([209.85.215.68]) by mail.coreboot.org with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.86_2) (envelope-from ) id 1dXos4-0004dS-Vq for seabios@seabios.org; Wed, 19 Jul 2017 15:18:44 +0200 Received: by mail-lf0-f68.google.com with SMTP id p11so4292650lfd.1 for ; Wed, 19 Jul 2017 06:20:27 -0700 (PDT) Received: from zuban32-isp.intra.ispras.ru (bran.ispras.ru. [83.149.199.196]) by smtp.gmail.com with ESMTPSA id 62sm6826lfz.20.2017.07.19.06.20.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Jul 2017 06:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=m759tikvzbmSTciKP72VDICgSiqKngbEySkWB6wqQKE=; b=ri9euXakhi5fMLKyBik++GRo/e/i0b227mANF1tpDnQ5gRFiLuSDckF81BvnVqkUm5 qeg1HZu/SynSyMMhSZdMaE0FTC6QfmseLoeFrtV2SS321sqQt9a3+gzLX+dw5DczBJzc JRdFFaKH5yOEcBBGXvqBwiwJRnfPI0pFMROA1oox4YgriSNBRjwM/anNhGXnST6Wj/TJ H7ClyI0EPpmWv9vqzUaApTM8Z2tidtMz8aDHLw3XOzHqGPEcGY/zp2EtsRqWGpPmG1vM +rJAQ8Qar8I4CKDY3pzaqEh0hgMAKUILOtTWm/zUrMuGHtP08/sjwjjbWh4VJzgu+teA 6J/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=m759tikvzbmSTciKP72VDICgSiqKngbEySkWB6wqQKE=; b=kxu/jE10wuqLg+zhiZ93yi4EzLXSJGYELp7Q0nAuk6ANYCsNviXcP9z97JHTFxKnw9 FlCujAnckiD9JapBUAabFquMCcXiNJA4ysirVjk0YYYRoqv8mg7YBcF9Weroigqw3qEm W6thQEz9bYxwb88vVsa9evOuRVCpQnh9Wef5bvemOtfIhGYfIwsUseX9oe+GoX80MoMO V6NW5b0fXaV3wrzGXEB5NMGds4SJvCo3GCl0kh8tIrG1oXQBAf9yiZVvo3/olXvwRMIG GyoEg1jGD6fpeahGa5+qVD9xrZ/5ufoYJ6n3T3ngf2oUfQlmW3TQnCjtYOI0FVfeOQAu A9eQ== X-Gm-Message-State: AIVw112ZXtt/MAktWOksJAaudpH7UQhBHd4CwZ6cn0D4eYag8vbl20zh 2IRTN/5eBy6Ps0c6 X-Received: by 10.25.170.3 with SMTP id t3mr18480lfe.51.1500470425604; Wed, 19 Jul 2017 06:20:25 -0700 (PDT) From: Aleksandr Bezzubikov To: seabios@seabios.org Date: Wed, 19 Jul 2017 16:20:14 +0300 Message-Id: <1500470414-7911-3-git-send-email-zuban32s@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500470414-7911-1-git-send-email-zuban32s@gmail.com> References: <1500470414-7911-1-git-send-email-zuban32s@gmail.com> X-Spam-Score: -2.7 (--) Subject: [SeaBIOS] [RFC PATCH 2/2] pci: enable RedHat pci bridges to reserve more buses X-BeenThere: seabios@seabios.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SeaBIOS mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: marcel@redhat.com, qemu-devel@nongnu.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: seabios-bounces@seabios.org Sender: "SeaBIOS" X-Duff: Orig. Duff, Duff Lite, Duff Dry, Duff Dark, Raspberry Duff, Lady Duff, Red Duff, Tartar Control Duff X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In case of RedHat PCI bridges reserve additional buses, which number is pro= vided in a vendor-specific capability. Signed-off-by: Aleksandr Bezzubikov --- src/fw/pciinit.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index 08221e6..b6f3a01 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -578,9 +578,17 @@ pci_bios_init_bus_rec(int bus, u8 *pci_bus) pci_bios_init_bus_rec(secbus, pci_bus); =20 if (subbus !=3D *pci_bus) { + u16 vendor =3D pci_config_readw(bdf, PCI_VENDOR_ID); + u8 res_bus =3D 0; + if (vendor =3D=3D 0x1b36) { + u8 cap =3D pci_find_capability_bdf(bdf, PCI_CAP_ID_VNDR, 0= ); + if (cap) { + res_bus =3D pci_config_readb(bdf, cap + 16); + } + } dprintf(1, "PCI: subordinate bus =3D 0x%x -> 0x%x\n", - subbus, *pci_bus); - subbus =3D *pci_bus; + subbus, *pci_bus + res_bus); + subbus =3D *pci_bus + res_bus; } else { dprintf(1, "PCI: subordinate bus =3D 0x%x\n", subbus); } --=20 2.7.4 _______________________________________________ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios