mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Trace PCI devices on kernel framebuffer
This commit is contained in:
parent
ab1972627e
commit
77050b83e5
@ -58,6 +58,15 @@ EXTERNC void Entry(BootInfo *Info)
|
||||
PowerManager = new Power::Power;
|
||||
KPrint("Initializing PCI Manager");
|
||||
PCIManager = new PCI::PCI;
|
||||
foreach (auto hdr in PCIManager->GetDevices())
|
||||
{
|
||||
KPrint("Found PCI device: %s / %s / %s / %s / %s",
|
||||
PCI::Descriptors::GetVendorName(hdr->VendorID),
|
||||
PCI::Descriptors::GetDeviceName(hdr->VendorID, hdr->DeviceID),
|
||||
PCI::Descriptors::DeviceClasses[hdr->Class],
|
||||
PCI::Descriptors::GetSubclassName(hdr->Class, hdr->Subclass),
|
||||
PCI::Descriptors::GetProgIFName(hdr->Class, hdr->Subclass, hdr->ProgIF));
|
||||
}
|
||||
while (1)
|
||||
CPU::Halt();
|
||||
}
|
||||
|
@ -142,6 +142,7 @@ namespace PCI
|
||||
Vector<PCIDeviceHeader *> Devices;
|
||||
|
||||
public:
|
||||
Vector<PCIDeviceHeader *> &GetDevices() { return Devices; }
|
||||
void EnumerateFunction(uint64_t DeviceAddress, uint64_t Function);
|
||||
void EnumerateDevice(uint64_t BusAddress, uint64_t Device);
|
||||
void EnumerateBus(uint64_t BaseAddress, uint64_t Bus);
|
||||
|
Loading…
x
Reference in New Issue
Block a user