mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-27 00:29:18 +00:00
pci: Add command register mask.
The mask represents the list of bits that are allowed to change in the command register of PCI config space.
This commit is contained in:
parent
eef6d267c3
commit
61b1940397
@ -48,7 +48,7 @@ PCIBase::PCIBase(std::string name, PCIHeaderType hdr_type, int num_bars)
|
||||
FIXME: should register or unregister BAR mmio regions if (cmd & 2) changes.
|
||||
Or the mmio regions should be enabled/disabled.
|
||||
*/
|
||||
this->command = cmd;
|
||||
this->command = cmd & this->command_cfg;
|
||||
};
|
||||
this->pci_wr_bist = [](uint8_t val) {};
|
||||
this->pci_wr_lat_timer = [this](uint8_t val) { this->lat_timer = val; };
|
||||
|
@ -171,6 +171,9 @@ protected:
|
||||
uint32_t exp_rom_size = 0; // expansion ROM size in bytes
|
||||
|
||||
std::unique_ptr<uint8_t[]> exp_rom_data;
|
||||
|
||||
// 0 = not writable; 1 = bit is enabled in command register
|
||||
uint16_t command_cfg = 0xffff - (1<<3) - (1<<7); // disable: special cycles and stepping
|
||||
};
|
||||
|
||||
inline uint32_t pci_cfg_log(uint32_t value, AccessDetails &details) {
|
||||
|
Loading…
Reference in New Issue
Block a user