From: Ali Saidi Date: Thu, 29 Jan 2004 01:23:40 +0000 (-0500) Subject: moved devices around in config space and support figuring out cpuid X-Git-Tag: m5_1.0_tutorial~409 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=00c49783ef406aaee227aff10624da9feeeb8ce8;p=gem5.git 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 --- 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: