From nobody Sat Apr 20 09:36:15 2024 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; spf=none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=linux.intel.com Return-Path: Received: from mail.coreboot.org (mail.coreboot.org [80.81.252.135]) by mx.zohomail.com with SMTPS id 1533626298559110.07392748008158; Tue, 7 Aug 2018 00:18:18 -0700 (PDT) Received: from [127.0.0.1] (helo=ra.coreboot.org) by mail.coreboot.org with esmtp (Exim 4.86_2) (envelope-from ) id 1fmwGb-0005UV-1z; Tue, 07 Aug 2018 09:18:53 +0200 Received: from mga14.intel.com ([192.55.52.115]) by mail.coreboot.org with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1fmwGM-0005UD-HZ for seabios@seabios.org; Tue, 07 Aug 2018 09:18:51 +0200 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Aug 2018 00:16:51 -0700 Received: from liujing-dell.bj.intel.com ([10.238.145.49]) by orsmga005.jf.intel.com with ESMTP; 07 Aug 2018 00:16:49 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,454,1526367600"; d="scan'208";a="246778268" From: Jing Liu To: seabios@seabios.org Date: Tue, 7 Aug 2018 15:20:17 +0800 Message-Id: <1533626417-16065-1-git-send-email-jing2.liu@linux.intel.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Score: -2.5 (--) Subject: [SeaBIOS] [PATCH] pci: add RedHat PCI BRIDGE capability 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: lersek@redhat.com, anthony.xu@intel.com, kraxel@redhat.com 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: RDMRC_1 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Add a device-specific capability for the RedHat PCI BRIDGE to enable reserving additional resources. Signed-off-by: Jing Liu --- src/fw/pciinit.c | 9 ++++++--- src/hw/pci_ids.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index 3a2f747..0265e9d 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -525,9 +525,12 @@ static void pci_bios_init_platform(void) =20 static u8 pci_find_resource_reserve_capability(u16 bdf) { - if (pci_config_readw(bdf, PCI_VENDOR_ID) =3D=3D PCI_VENDOR_ID_REDHAT && - pci_config_readw(bdf, PCI_DEVICE_ID) =3D=3D - PCI_DEVICE_ID_REDHAT_ROOT_PORT) { + u16 vendor_id =3D pci_config_readw(bdf, PCI_VENDOR_ID); + u16 device_id =3D pci_config_readw(bdf, PCI_DEVICE_ID); + + if (vendor_id =3D=3D PCI_VENDOR_ID_REDHAT && + (device_id =3D=3D PCI_DEVICE_ID_REDHAT_ROOT_PORT || + device_id =3D=3D PCI_DEVICE_ID_REDHAT_BRIDGE)) { u8 cap =3D 0; do { cap =3D pci_find_capability(bdf, PCI_CAP_ID_VNDR, cap); diff --git a/src/hw/pci_ids.h b/src/hw/pci_ids.h index 38fa2ca..1096461 100644 --- a/src/hw/pci_ids.h +++ b/src/hw/pci_ids.h @@ -2265,6 +2265,7 @@ =20 #define PCI_VENDOR_ID_REDHAT 0x1b36 #define PCI_DEVICE_ID_REDHAT_ROOT_PORT 0x000C +#define PCI_DEVICE_ID_REDHAT_BRIDGE 0x0001 =20 #define PCI_VENDOR_ID_TEKRAM 0x1de1 #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 --=20 1.8.3.1 _______________________________________________ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios