From nobody Tue Oct 18 06:03:12 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ms3FD5F4wz4g89D; Tue, 18 Oct 2022 06:03:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ms3FD2k4Gz3c79; Tue, 18 Oct 2022 06:03:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666072992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SJeMVbhZ4CX+VWstPBOU1ZqmriuFSOTQqeoHHHEYm14=; b=uSNwxc0Sx/aeL6AJ2oCF2/pjb8XtEFHDphFYxVRd57yQYYbPUsQAmytQUuxkuDy9VXJcO4 13ZFPIoMiLRhVZ59a+xCI15bt5HLsLerAYDOOnhaT0RvrBnr78vecUXd//ZZfEPd8AA/M4 nbThkuUmUl+s5la2bWvPftcErjIUPXagR3X1OdnTGizVGewaRc4nxQSqU3rfs0+QpB0n55 X1aqIR/g8E4U7XC6D9cb+z2C6k77bNgMewXNqMVZsu2pEjQcEEq9owKSczxf9ZsJywT6eS B+W6Yr31neRtL0qWa4lItu1SJwMAv599teQPK2rh/XFlNviSyNGsxd7YNwqUAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ms3FD1qmxz1532; Tue, 18 Oct 2022 06:03:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29I63Clr097441; Tue, 18 Oct 2022 06:03:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29I63CsI097440; Tue, 18 Oct 2022 06:03:12 GMT (envelope-from git) Date: Tue, 18 Oct 2022 06:03:12 GMT Message-Id: <202210180603.29I63CsI097440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 2297a1633d86 - main - Add NO_LEGACY_PCIB kernel option to i386, amd64 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2297a1633d86fa098c4ed7b3e5ac5c7c708fbe8a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666072992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SJeMVbhZ4CX+VWstPBOU1ZqmriuFSOTQqeoHHHEYm14=; b=ulleKiZbpiiEhzW/XPvWq7Q5H4jWNQZbQF0NaKDSC4rTBZEzmIy4D2FVRbcz8OVkS6DPDz IMBjNDxTGFJauHBIJGlIGVwhVexwzEAPKrKu7MhpOizijrkCc23uvPTAB6caUT6MQDIzfW 6nrBAVZE8+bGBhyVsNaJ33O9qmyAw7mSR/tgGgCsr1+drhRSuViuk8IUFtIJbs3YXxwTXI /qewpDB3d6HUJoVkeOI15cONTVoFQbU+fhKMbp268mW3FIB7dRtiGP2bDZOu7wQRINU0xJ ohNRIhxlRJXv8Mzq3H6POOl4CYHjWJsBEgZ4CJt1UmDJ3ZudtYUIar4dGdzRxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666072992; a=rsa-sha256; cv=none; b=h6mE4ZhibVWxVfTV2Yh2zHyr4giFdeolCQ181FcaqlgEJ6w4qUnygkkBYLLJONa17k+t1a VQNsMSluqkQbwVKEIUI/CvwDD5TzF1ULvKNxEdOlXblU4ZX2FsVY119Y4QB6KMEdBQt1UE ee+aLFRIUyUh3SJR3VdULDycjQ3gg9pxoP5c3XLhSmq+7pQ8SIUqPTFc+AaqknCC9c0ZRU 3IYUObcwQw9WR23snaPcsGlwnapbFGMcykVdmCb5jvZm2ZZQDC6aDwuQ5p4who8humeFUm iiUzNnJATFRmnzTuje35ZYyPHCZSZROjSA9+eYj/Qg9ryGzk/KJVUGaLBKqZHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=2297a1633d86fa098c4ed7b3e5ac5c7c708fbe8a commit 2297a1633d86fa098c4ed7b3e5ac5c7c708fbe8a Author: Colin Percival AuthorDate: 2022-07-13 00:44:47 +0000 Commit: Colin Percival CommitDate: 2022-10-18 06:02:22 +0000 Add NO_LEGACY_PCIB kernel option to i386, amd64 On systems without a PCI bus, legacy_pcib_identify by default creates one anyway: legacy_pcib_identify: no bridge found, adding pcib0 anyway This commit adds a kernel option NO_LEGACY_PCIB which disables this, allowing systems to be fully PCI-free. Reviewed by: imp Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D35798 --- sys/conf/options.amd64 | 3 +++ sys/conf/options.i386 | 3 +++ sys/x86/pci/pci_bus.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64 index 8b98aa405953..66ccfb7bbddb 100644 --- a/sys/conf/options.amd64 +++ b/sys/conf/options.amd64 @@ -60,3 +60,6 @@ ISCI_LOGGING opt_isci.h # EFI Runtime services support EFIRT opt_efirt.h + +# Don't create a "legacy" PCI bridge if none is found. +NO_LEGACY_PCIB opt_cpu.h diff --git a/sys/conf/options.i386 b/sys/conf/options.i386 index f65592653a82..03e88b985107 100644 --- a/sys/conf/options.i386 +++ b/sys/conf/options.i386 @@ -104,3 +104,6 @@ XENHVM opt_global.h # options for the Intel C600 SAS driver (isci) ISCI_LOGGING opt_isci.h + +# Don't create a "legacy" PCI bridge if none is found. +NO_LEGACY_PCIB opt_cpu.h diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c index f2a919989f02..51679675ffb6 100644 --- a/sys/x86/pci/pci_bus.c +++ b/sys/x86/pci/pci_bus.c @@ -488,11 +488,13 @@ legacy_pcib_identify(driver_t *driver, device_t parent) * Note that pci_cfgregopen() thinks we have PCI devices.. */ if (!found) { +#ifndef NO_LEGACY_PCIB if (bootverbose) printf( "legacy_pcib_identify: no bridge found, adding pcib0 anyway\n"); child = BUS_ADD_CHILD(parent, 100, "pcib", 0); legacy_set_pcibus(child, 0); +#endif } }