Page MenuHomeFreeBSD

Add NO_LEGACY_PCIB kernel option to i386, amd64

Authored by cperciva on Jul 13 2022, 12:46 AM.
Referenced Files
Unknown Object (File)
Mon, May 20, 3:43 PM
Unknown Object (File)
Sat, Apr 27, 12:37 AM
Unknown Object (File)
Sat, Apr 27, 12:36 AM
Unknown Object (File)
Sat, Apr 27, 12:36 AM
Unknown Object (File)
Fri, Apr 26, 10:37 PM
Unknown Object (File)
Apr 19 2024, 5:54 AM
Unknown Object (File)
Mar 4 2024, 6:01 AM
Unknown Object (File)
Mar 4 2024, 6:00 AM



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.

Sponsored by:

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

though maybe just remove it entirely?
Or fix the test to not make it when there's pcie in the system?

This revision is now accepted and ready to land.Jul 13 2022, 12:55 AM

I wasn't sure if this code was needed any more, so I figured adding an option to hide it was better than removing it entirely.

Simply turning it off when we have PCIE is a non-starter: The same system where I don't have a PCI bridge (running inside the Firecracker VM) also doesn't have PCIE.

jrtc27 added inline comments.

Why not ifndef out the if and comment? Leaving the comment outside the ifndef, and an empty block, makes it seem like something is still done in the legacy pcib case.


If I remove the if then the compiler complains that found is being set but not used I figured this was cleaner than sprinkling more ifndefs throughout the function.