From d1a7316799d9f49ed42ccc57514c06e464f2ceeb Mon Sep 17 00:00:00 2001 From: Conrad Pankoff Date: Sun, 11 Aug 2019 14:51:30 +1000 Subject: [PATCH] Kernel: Print out PCI devices during boot This will make boot logs much more useful on real hardware, by showing exactly what Serenity is trying to boot on. --- Kernel/init.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Kernel/init.cpp b/Kernel/init.cpp index e846d0da77..edfe0e34d3 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -215,6 +216,16 @@ extern "C" [[noreturn]] void init() MemoryManager::initialize(); PIT::initialize(); + PCI::enumerate_all([](const PCI::Address& address, PCI::ID id) { + kprintf("PCI device: bus=%d slot=%d function=%d id=%w:%w\n", + address.bus(), + address.slot(), + address.function(), + id.vendor_id, + id.device_id + ); + }); + new BXVGADevice; auto e1000 = E1000NetworkAdapter::autodetect();