mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
Kernel/PCI: Add helper to determine if device can access IO space
This commit is contained in:
@@ -204,6 +204,10 @@ void disable_memory_space(Address address)
|
||||
{
|
||||
write16(address, PCI_COMMAND, read16(address, PCI_COMMAND) & ~(1 << 1));
|
||||
}
|
||||
bool is_io_space_enabled(Address address)
|
||||
{
|
||||
return (read16(address, PCI_COMMAND) & 1) != 0;
|
||||
}
|
||||
|
||||
void enable_interrupt_line(Address address)
|
||||
{
|
||||
|
||||
@@ -204,6 +204,7 @@ private:
|
||||
};
|
||||
|
||||
ID get_id(PCI::Address);
|
||||
bool is_io_space_enabled(Address);
|
||||
void enumerate(Function<void(Address, ID)> callback);
|
||||
void enable_interrupt_line(Address);
|
||||
void disable_interrupt_line(Address);
|
||||
|
||||
Reference in New Issue
Block a user