Odd bug with PCI enumeration
diff --git a/src/kernel/main.c b/src/kernel/main.c
index 8682681..83aa9a8 100644
--- a/src/kernel/main.c
+++ b/src/kernel/main.c
@@ -77,7 +77,6 @@
kprintf("initializing tasks\n");
init_tasks();
kprintf("\ndone initializing tasks\n");
- asm volatile("sti");
#ifdef TEST_THREADS
spawn_thread(other_thread, NULL);
@@ -95,15 +94,18 @@
{
for (int func = 0; func < 8; func++)
{
- struct pci_vendor *v = pci_check_vendor(bus, slot, func, NULL);
- if (v)
+ uint vendor;
+
+ struct pci_vendor *v = pci_check_vendor(bus, slot, func, &vendor);
+
+ if (vendor != ~0)
{
- kprintf("%s\n", v->name);
+ kprintf("%d %d %d %d\n", bus, slot, func, vendor);
}
}
}
}
-
+
while (true)
asm volatile("hlt");