Kernel: Add PCI::get_programming_interface(PCI::Address)

This returns the programming interface at a given PCI address.
This is sometimes referred to as "prog-if" on other systems.
This commit is contained in:
Andreas Kling 2020-09-03 20:59:58 +02:00
parent 9b9c752dbe
commit 2e01f1f9b9
Notes: sideshowbarker 2024-07-19 02:55:10 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -193,6 +193,11 @@ u8 get_class(Address address)
return read8(address, PCI_CLASS);
}
u8 get_programming_interface(Address address)
{
return read8(address, PCI_PROG_IF);
}
u16 get_subsystem_id(Address address)
{
return read16(address, PCI_SUBSYSTEM_ID);

View file

@ -208,6 +208,7 @@ u32 get_BAR3(Address);
u32 get_BAR4(Address);
u32 get_BAR5(Address);
u8 get_revision_id(Address);
u8 get_programming_interface(Address);
u8 get_subclass(Address);
u8 get_class(Address);
u16 get_subsystem_id(Address);