mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
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:
parent
6c03fdc1ef
commit
36a82188a8
2 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -204,6 +204,7 @@ void enumerate(Function<void(Address, ID)> callback);
|
|||
void enable_interrupt_line(Address);
|
||||
void disable_interrupt_line(Address);
|
||||
u8 get_interrupt_line(Address);
|
||||
void set_interrupt_line(Address, u8);
|
||||
void raw_access(Address, u32, size_t, u32);
|
||||
u32 get_BAR0(Address);
|
||||
u32 get_BAR1(Address);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue