mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-30 21:28:59 +00:00
Kernel/PCI: Add helper to determine if device can access IO space
This commit is contained in:
parent
2cd1f928e1
commit
0669dd82e2
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/supercomputer7
Commit: 0669dd82e2
Pull-request: https://github.com/SerenityOS/serenity/pull/6277
Reviewed-by: https://github.com/ElectrodeYT
Reviewed-by: https://github.com/awesomekling
2 changed files with 5 additions and 0 deletions
|
@ -204,6 +204,10 @@ void disable_memory_space(Address address)
|
||||||
{
|
{
|
||||||
write16(address, PCI_COMMAND, read16(address, PCI_COMMAND) & ~(1 << 1));
|
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)
|
void enable_interrupt_line(Address address)
|
||||||
{
|
{
|
||||||
|
|
|
@ -204,6 +204,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
ID get_id(PCI::Address);
|
ID get_id(PCI::Address);
|
||||||
|
bool is_io_space_enabled(Address);
|
||||||
void enumerate(Function<void(Address, ID)> callback);
|
void enumerate(Function<void(Address, ID)> callback);
|
||||||
void enable_interrupt_line(Address);
|
void enable_interrupt_line(Address);
|
||||||
void disable_interrupt_line(Address);
|
void disable_interrupt_line(Address);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue