git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: more compact log message
[lunaix-os.git]
/
lunaix-os
/
hal
/
pci.c
diff --git
a/lunaix-os/hal/pci.c
b/lunaix-os/hal/pci.c
index aa6acd16f036ff0adb8b2c864a0370a54ae750a9..229335c841d3675364b2bda84ce8ddef836a5f6a 100644
(file)
--- a/
lunaix-os/hal/pci.c
+++ b/
lunaix-os/hal/pci.c
@@
-62,6
+62,13
@@
pci_probe_device(int bus, int dev, int funct)
.device_info = reg1,
.intr_info = intr };
.device_info = reg1,
.intr_info = intr };
+ kprintf("dev.%d:%d:%d %x:%x\n",
+ bus,
+ dev,
+ funct,
+ PCI_DEV_VENDOR(reg1),
+ PCI_DEV_DEVID(reg1));
+
pci_probe_msi_info(device);
pci_probe_bar_info(device);
pci_probe_msi_info(device);
pci_probe_bar_info(device);
@@
-73,7
+80,7
@@
pci_probe()
{
// 暴力扫描所有PCI设备
// XXX: 尽管最多会有256条PCI总线,但就目前而言,只考虑bus #0就足够了
{
// 暴力扫描所有PCI设备
// XXX: 尽管最多会有256条PCI总线,但就目前而言,只考虑bus #0就足够了
- for (int bus = 0; bus <
1
; bus++) {
+ for (int bus = 0; bus <
256
; bus++) {
for (int dev = 0; dev < 32; dev++) {
pci_probe_device(bus, dev, 0);
}
for (int dev = 0; dev < 32; dev++) {
pci_probe_device(bus, dev, 0);
}