mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Hide PCI logs behind a debug flag like other logs
This commit is contained in:
parent
833f0beeed
commit
6fe18a0417
Notes:
sideshowbarker
2024-07-19 12:41:46 +09:00
Author: https://github.com/deoxxa Commit: https://github.com/SerenityOS/serenity/commit/6fe18a04172 Pull-request: https://github.com/SerenityOS/serenity/pull/450
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
|||
#include <Kernel/IO.h>
|
||||
#include <Kernel/PCI.h>
|
||||
|
||||
//#define PCI_DEBUG
|
||||
|
||||
#define PCI_VENDOR_ID 0x00 // word
|
||||
#define PCI_DEVICE_ID 0x02 // word
|
||||
#define PCI_COMMAND 0x04 // word
|
||||
|
@ -70,7 +72,9 @@ void enumerate_functions(int type, u8 bus, u8 slot, u8 function, Function<void(A
|
|||
callback(address, { read_field<u16>(address, PCI_VENDOR_ID), read_field<u16>(address, PCI_DEVICE_ID) });
|
||||
if (read_type(address) == PCI_TYPE_BRIDGE) {
|
||||
u8 secondary_bus = read_field<u8>(address, PCI_SECONDARY_BUS);
|
||||
#ifdef PCI_DEBUG
|
||||
kprintf("PCI: Found secondary bus: %u\n", secondary_bus);
|
||||
#endif
|
||||
ASSERT(secondary_bus != bus);
|
||||
enumerate_bus(type, secondary_bus, callback);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue