1 class PCIDevice
: public Device
4 void rw_config(uint8_t addr
, unsigned len
, uint32_t *data
, bool read
);
13 uint8_t subclass_code
;
19 Array
<uint32_t, 6> bar
;
21 uint16_t subvendor_id
;
22 uint16_t subdevice_id
;
31 void PCIDevice::config_rw(uint8_t addr
, unsigned len
, uint32_t *data
, bool read
)
33 RegisterIO
reg(addr
, len
, data
, read
);
35 /* These are required to be implemented */
36 reg
.io(&this->vendor_id
, 0x00, READONLY
);
37 reg
.io(&this->device_id
, 0x02, READONLY
);
38 reg
.io(&this->command
, 0x04);
39 reg
.io(&this->status
, 0x06);
40 reg
.io(&this->rid
, 0x08, READONLY
);
41 reg
.io(&this->prog_if
, 0x09, READONLY
);
42 reg
.io(&this->subclass_code
, 0x0A, READONLY
);
43 reg
.io(&this->class_code
, 0x0B, READONLY
);
44 reg
.io(&this->headt
, 0x0E);