From ea0fb3b4104a83734445db51ecf1c49ffb549575 Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Mon, 25 Jul 2022 12:51:55 +0200 Subject: [PATCH] bandit: initialize address mask register. --- devices/common/pci/bandit.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/devices/common/pci/bandit.cpp b/devices/common/pci/bandit.cpp index 33f0a20..8b5de5b 100644 --- a/devices/common/pci/bandit.cpp +++ b/devices/common/pci/bandit.cpp @@ -58,6 +58,11 @@ Bandit::Bandit(int bridge_num, std::string name) : PCIHost(), PCIDevice(name) // make several PCI config space registers read-only this->pci_wr_cmd = [](uint16_t cmd) {}; // command register this->pci_wr_cache_lnsz = [](uint8_t val) {}; // cache line size register + + // set the bits in the fine address space field of the address mask register + // that correspond to the 32MB assigned PCI address space of this Bandit. + // This initialization is implied by the device functionality. + this->addr_mask = 3 << ((bridge_num & 3) * 2); } uint32_t Bandit::pci_cfg_read(uint32_t reg_offs, uint32_t size)