From 00c49783ef406aaee227aff10624da9feeeb8ce8 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Wed, 28 Jan 2004 20:23:40 -0500 Subject: moved devices around in config space and support figuring out cpuid from cchip register dev/tsunami_cchip.cc: added support for figuring out which cpu you are --HG-- extra : convert_revision : 7862678a259931bb0a5b2ca8ad298a704bd272ec --- dev/tsunami_cchip.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'dev/tsunami_cchip.cc') diff --git a/dev/tsunami_cchip.cc b/dev/tsunami_cchip.cc index 9c14bc3b0..9dba502e4 100644 --- a/dev/tsunami_cchip.cc +++ b/dev/tsunami_cchip.cc @@ -49,8 +49,7 @@ TsunamiCChip::read(MemReqPtr req, uint8_t *data) req->vaddr, req->size); Addr daddr = (req->paddr & addr_mask) >> 6; -// ExecContext *xc = req->xc; -// int cpuid = xc->cpu_id; + ExecContext *xc = req->xc; switch (req->size) { @@ -63,7 +62,7 @@ TsunamiCChip::read(MemReqPtr req, uint8_t *data) panic("TSDEV_CC_MTR not implemeted\n"); return No_Fault; case TSDEV_CC_MISC: - *(uint64_t*)data = misc; + *(uint64_t*)data = misc | (xc->cpu_id & 0x3); return No_Fault; case TSDEV_CC_AAR0: case TSDEV_CC_AAR1: -- cgit v1.2.3