summaryrefslogtreecommitdiff
path: root/dev/pciconfigall.cc
diff options
context:
space:
mode:
authorAndrew Schultz <alschult@umich.edu>2004-02-10 22:35:18 -0500
committerAndrew Schultz <alschult@umich.edu>2004-02-10 22:35:18 -0500
commite72e8b28c8579f56b36b89f1b6cbfba169202f1e (patch)
tree50608e364cd77ec54f5730f140652563f4ff221a /dev/pciconfigall.cc
parentf7c4d57260d1ce43089a3a8e05915be782912632 (diff)
downloadgem5-e72e8b28c8579f56b36b89f1b6cbfba169202f1e.tar.xz
Fix masking of read/write address to get read/write offset
Changed base_linux.ini file to use physical addresses dev/alpha_console.cc: dev/pciconfigall.cc: dev/tsunami_cchip.cc: dev/tsunami_io.cc: dev/tsunami_pchip.cc: Fix masking of read/write address to get read/write offset dev/tsunami_uart.cc: Fix masking of read/write address to get read/write offset Also added add_child call that was missed dev/tsunami_uart.hh: Changed size to 0x8 --HG-- extra : convert_revision : 1468ca43167bfb28b28c4510401a1ebad683e102
Diffstat (limited to 'dev/pciconfigall.cc')
-rw-r--r--dev/pciconfigall.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/dev/pciconfigall.cc b/dev/pciconfigall.cc
index 0c1efd898..63943c7be 100644
--- a/dev/pciconfigall.cc
+++ b/dev/pciconfigall.cc
@@ -68,7 +68,7 @@ PCIConfigAll::read(MemReqPtr &req, uint8_t *data)
DPRINTF(PCIConfigAll, "read va=%#x size=%d\n",
req->vaddr, req->size);
- Addr daddr = (req->paddr & size);
+ Addr daddr = (req->paddr - (addr & PA_IMPL_MASK));
int device = (daddr >> 11) & 0x1F;
int func = (daddr >> 8) & 0x7;
@@ -112,7 +112,7 @@ PCIConfigAll::read(MemReqPtr &req, uint8_t *data)
Fault
PCIConfigAll::write(MemReqPtr &req, const uint8_t *data)
{
- Addr daddr = (req->paddr & size);
+ Addr daddr = (req->paddr - (addr & PA_IMPL_MASK));
int device = (daddr >> 11) & 0x1F;
int func = (daddr >> 8) & 0x7;