mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-01 18:39:16 +00:00
feat(kernel/pci): add device initialization method for PCI devices
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -982,6 +982,18 @@ namespace PCI
|
||||
}
|
||||
}
|
||||
|
||||
void Manager::InitializeDevice(PCIDevice Device, Memory::PageTable *Table)
|
||||
{
|
||||
this->MapPCIAddresses(Device, Table);
|
||||
|
||||
PCI::PCIDeviceHeader *Header = Device.Header;
|
||||
|
||||
Header->Command |= PCI_COMMAND_MASTER |
|
||||
PCI_COMMAND_IO |
|
||||
PCI_COMMAND_MEMORY;
|
||||
Header->Command &= ~PCI_COMMAND_INTX_DISABLE;
|
||||
}
|
||||
|
||||
void Manager::EnumerateFunction(uint64_t DeviceAddress, uint32_t Function, PCIDevice dev)
|
||||
{
|
||||
dev.Function = Function;
|
||||
|
Reference in New Issue
Block a user