forked from Bananymous/banan-os
1000th COMMIT: Kernel: Add basic E1000 driver
This driver is only capable to read mac address and enable and read link status
This commit is contained in:
@@ -7,6 +7,14 @@ namespace Kernel
|
||||
|
||||
class PCIDevice
|
||||
{
|
||||
public:
|
||||
enum class BarType
|
||||
{
|
||||
INVAL,
|
||||
MEM,
|
||||
IO,
|
||||
};
|
||||
|
||||
public:
|
||||
PCIDevice(uint8_t, uint8_t, uint8_t);
|
||||
|
||||
@@ -24,6 +32,9 @@ namespace Kernel
|
||||
uint8_t subclass() const { return m_subclass; }
|
||||
uint8_t prog_if() const { return m_prog_if; }
|
||||
|
||||
BarType read_bar_type(uint8_t) const;
|
||||
uint64_t read_bar_address(uint8_t) const;
|
||||
|
||||
void enable_bus_mastering() const;
|
||||
void disable_bus_mastering() const;
|
||||
|
||||
@@ -41,6 +52,8 @@ namespace Kernel
|
||||
uint8_t m_class_code;
|
||||
uint8_t m_subclass;
|
||||
uint8_t m_prog_if;
|
||||
|
||||
uint8_t m_header_type;
|
||||
};
|
||||
|
||||
class PCI
|
||||
|
||||
Reference in New Issue
Block a user