Improve log messages
This commit is contained in:
parent
00cf512522
commit
0c4cd070ec
@ -10,6 +10,8 @@ Console_Init()
|
||||
{
|
||||
VGA_Init();
|
||||
DebugConsole_Init();
|
||||
|
||||
Console_Puts("Castor Operating System\n");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -9,9 +9,9 @@ void PCI_ScanBus();
|
||||
void
|
||||
PCI_Init()
|
||||
{
|
||||
kprintf("Initializing PCI\n");
|
||||
kprintf("PCI: Initializing ...\n");
|
||||
PCI_ScanBus();
|
||||
kprintf("PCI Initialization Done\n");
|
||||
kprintf("PCI: Initialization Done!\n");
|
||||
}
|
||||
|
||||
uint16_t
|
||||
@ -123,40 +123,40 @@ PCICheckFunction(uint32_t bus, uint32_t device, uint32_t func)
|
||||
|
||||
if (baseClass == PCI_CLASS_BRIDGE) {
|
||||
if (subClass == PCI_SCLASS_BRIDGE_HOST) {
|
||||
kprintf("PCI(%d,%d,%d): Host Bridge (%04x:%04x)\n",
|
||||
kprintf("PCI: (%d,%d,%d) Host Bridge (%04x:%04x)\n",
|
||||
bus, device, func, vendorId, deviceId);
|
||||
} else if (subClass == PCI_SCLASS_BRIDGE_ISA) {
|
||||
kprintf("PCI(%d,%d,%d): ISA Bridge (%04x:%04x)\n",
|
||||
kprintf("PCI: (%d,%d,%d) ISA Bridge (%04x:%04x)\n",
|
||||
bus, device, func, vendorId, deviceId);
|
||||
} else if (subClass == PCI_SCLASS_BRIDGE_PCI) {
|
||||
kprintf("PCI(%d,%d,%d): PCI-PCI Bridge (%04x:%04x)\n",
|
||||
kprintf("PCI: (%d,%d,%d) PCI-PCI Bridge (%04x:%04x)\n",
|
||||
bus, device, func, vendorId, deviceId);
|
||||
// Scan sub-bus
|
||||
} else if (subClass == PCI_SCLASS_BRIDGE_MISC) {
|
||||
kprintf("PCI(%d,%d,%d): Other Bridge (%04x:%04x)\n",
|
||||
kprintf("PCI: (%d,%d,%d) Other Bridge (%04x:%04x)\n",
|
||||
bus, device, func, vendorId, deviceId);
|
||||
}
|
||||
} else if (baseClass == PCI_CLASS_STORAGE) {
|
||||
if (subClass == PCI_SCLASS_STORAGE_SATA) {
|
||||
kprintf("PCI(%d,%d,%d): SATA Controller (%04x:%04x)\n",
|
||||
kprintf("PCI: (%d,%d,%d) SATA Controller (%04x:%04x)\n",
|
||||
bus, device, func, vendorId, deviceId);
|
||||
|
||||
AHCI_Init(bus, device, func);
|
||||
} else if (subClass == PCI_SCLASS_STORAGE_IDE) {
|
||||
kprintf("PCI(%d,%d,%d): IDE Controller (%04x:%04x)\n",
|
||||
kprintf("PCI: (%d,%d,%d) IDE Controller (%04x:%04x)\n",
|
||||
bus, device, func, vendorId, deviceId);
|
||||
}
|
||||
} else if ((baseClass == PCI_CLASS_NETWORK) && (subClass == 0x00)) {
|
||||
kprintf("PCI(%d,%d,%d): Ethernet (%04x:%04x)\n",
|
||||
kprintf("PCI: (%d,%d,%d) Ethernet (%04x:%04x)\n",
|
||||
bus, device, func, vendorId, deviceId);
|
||||
} else if ((baseClass == PCI_CLASS_GRAPHICS) && (subClass == 0x00)) {
|
||||
kprintf("PCI(%d,%d,%d): VGA (%04x:%04x)\n",
|
||||
kprintf("PCI: (%d,%d,%d) VGA (%04x:%04x)\n",
|
||||
bus, device, func, vendorId, deviceId);
|
||||
} else if ((baseClass == PCI_CLASS_BUS) && (subClass == PCI_SCLASS_BUS_SMBUS)) {
|
||||
kprintf("PCI(%d,%d,%d): SMBUS (%04x:%04x)\n",
|
||||
kprintf("PCI: (%d,%d,%d) SMBUS (%04x:%04x)\n",
|
||||
bus, device, func, vendorId, deviceId);
|
||||
} else {
|
||||
kprintf("PCI(%d,%d,%d): Unsupported (%04x:%04x %02x:%02x)\n",
|
||||
kprintf("PCI: (%d,%d,%d) Unsupported (%04x:%04x %02x:%02x)\n",
|
||||
bus, device, func, vendorId, deviceId, baseClass, subClass);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user