Kernel/PCI: Allow to set the PCI IRQ line of a device

This will be used later by the AHCI code to set the IRQ line to be 11,
if hardware by mistake changed the value to be something we can't deal
with.
This commit is contained in:
Liav A 2021-03-19 04:50:31 +02:00 committed by Andreas Kling
commit 36a82188a8
Notes: sideshowbarker 2024-07-18 21:11:46 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -222,6 +222,11 @@ u8 get_interrupt_line(Address address)
return read8(address, PCI_INTERRUPT_LINE);
}
void set_interrupt_line(Address address, u8 new_line)
{
write8(address, PCI_INTERRUPT_LINE, new_line);
}
u32 get_BAR0(Address address)
{
return read32(address, PCI_BAR0);