diff options
author | Travis Geiselbrecht <geist@foobox.com> | 2022-10-19 00:21:57 -0700 |
---|---|---|
committer | Travis Geiselbrecht <geist@foobox.com> | 2022-10-19 00:24:10 -0700 |
commit | 96231b132f3b52cb8579e04429a10cea443f63a3 (patch) | |
tree | 8e6fe1acd5294b2682cf5b8d6bab2b8838fc1136 | |
parent | 208bae5feb2d4a3ee4115475ad01b66dc8a214a2 (diff) | |
download | lk-96231b132f3b52cb8579e04429a10cea443f63a3.tar.gz |
[bus][pci] make the pci bus dump on bootup use a little less horizontal space
Should fit better on an 80 column display
-rw-r--r-- | dev/bus/pci/bus_mgr/bus_mgr.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/dev/bus/pci/bus_mgr/bus_mgr.cpp b/dev/bus/pci/bus_mgr/bus_mgr.cpp index d817c2be..9c9756af 100644 --- a/dev/bus/pci/bus_mgr/bus_mgr.cpp +++ b/dev/bus/pci/bus_mgr/bus_mgr.cpp @@ -324,8 +324,13 @@ status_t pci_bus_mgr_allocate_irq(const pci_location_t loc, uint *irqbase) { } void pci_dump_bar(const pci_bar_t *bar, int index) { - printf("BAR %d: addr %-#16llx size %-#16zx io %d 64bit %d prefetch %d\n", - index, bar->addr, bar->size, bar->io, bar->size_64, bar->prefetchable); + if (bar->addr >= UINT32_MAX || bar->size >= UINT32_MAX) { + printf("BAR %d: addr %-#16llx size %-#16zx io %d 64b %d pref %d\n", + index, bar->addr, bar->size, bar->io, bar->size_64, bar->prefetchable); + } else { + printf("BAR %d: addr %-#8llx size %-#8zx io %d 64b %d pref %d\n", + index, bar->addr, bar->size, bar->io, bar->size_64, bar->prefetchable); + } } void pci_dump_bars(pci_bar_t bar[6], size_t count) { |