From e097b7a0a1ff1a6e95d7c75f1c127e6b96a35b6a Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Mon, 22 Aug 2022 15:05:35 +0200 Subject: [PATCH] bandit: fix return value for empty slots. --- devices/common/pci/bandit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devices/common/pci/bandit.cpp b/devices/common/pci/bandit.cpp index 9ecc6b6..8c4d4de 100644 --- a/devices/common/pci/bandit.cpp +++ b/devices/common/pci/bandit.cpp @@ -79,7 +79,7 @@ uint32_t Bandit::pci_cfg_read(uint32_t reg_offs, uint32_t size) this->pci_name.c_str(), reg_offs); } - return 0; + return 0xFFFFFFFFUL; // PCI spec §6.1 } void Bandit::pci_cfg_write(uint32_t reg_offs, uint32_t value, uint32_t size) @@ -134,7 +134,7 @@ uint32_t Bandit::read(uint32_t reg_start, uint32_t offset, int size) "%s err: read attempt from non-existing PCI device %d", this->name.c_str(), idsel); - result = 0; + return 0xFFFFFFFFUL; // PCI spec §6.1 } } } else { @@ -272,7 +272,7 @@ uint32_t Chaos::read(uint32_t reg_start, uint32_t offset, int size) "%s err: read attempt from non-existing VCI device %d", this->name.c_str(), idsel); - result = 0; + return 0xFFFFFFFFUL; // PCI spec §6.1 } } else { result = this->config_addr;