forked from Bananymous/banan-os
Kernel: PCI devices now report their prog_if
This commit is contained in:
parent
cd03a95128
commit
cf0320e47d
|
@ -20,6 +20,7 @@ namespace Kernel
|
|||
|
||||
uint8_t class_code() const { return m_class_code; }
|
||||
uint8_t subclass() const { return m_subclass; }
|
||||
uint8_t prog_if() const { return m_prog_if; }
|
||||
|
||||
private:
|
||||
uint8_t m_bus;
|
||||
|
@ -28,6 +29,7 @@ namespace Kernel
|
|||
|
||||
uint8_t m_class_code;
|
||||
uint8_t m_subclass;
|
||||
uint8_t m_prog_if;
|
||||
};
|
||||
|
||||
class PCI
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace Kernel
|
|||
controller = res.value();
|
||||
break;
|
||||
default:
|
||||
dprintln("unsupported storage device (pci subclass {2H})", pci_device.subclass());
|
||||
dprintln("unsupported storage device (pci {2H}.{2H}.{2H})", pci_device.class_code(), pci_device.subclass(), pci_device.prog_if());
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -90,6 +90,7 @@ namespace Kernel
|
|||
uint32_t type = read_word(0x0A);
|
||||
m_class_code = (uint8_t)(type >> 8);
|
||||
m_subclass = (uint8_t)(type);
|
||||
m_prog_if = read_byte(0x09);
|
||||
}
|
||||
|
||||
uint32_t PCIDevice::read_dword(uint8_t offset) const
|
||||
|
|
Loading…
Reference in New Issue