1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:08:12 +00:00

Kernel/PCI: Add helper to determine if device can access IO space

This commit is contained in:
Liav A 2021-04-23 14:15:08 +03:00 committed by Andreas Kling
parent 2cd1f928e1
commit 0669dd82e2
2 changed files with 5 additions and 0 deletions

View file

@ -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)
{