Allow setting PCI status register

Don't always return 0 when reading it. The status register contains some bits that Open Firmware uses to set some properties.
A PCI device can set a default status register value to set those bits.
	this->status = 0x02B0; // 0000  0 01 0  1 0 1 1  0000 Capabilities List, 66 MHz, Fast Back-to-Back, DevSel Speed: Medium
This commit is contained in:
joevt 2022-08-22 02:35:29 -07:00
parent 6af8b52376
commit 6fad095730

View File

@ -33,7 +33,7 @@ PCIDevice::PCIDevice(std::string name)
{
this->pci_name = name;
this->pci_rd_stat = []() { return 0; };
this->pci_rd_stat = [this]() { return this->status; };
this->pci_rd_cmd = [this]() { return this->command; };
this->pci_rd_bist = []() { return 0; };
this->pci_rd_lat_timer = [this]() { return this->lat_timer; };