diff options
author | Brandon Potter <brandon.potter@amd.com> | 2019-10-18 14:43:14 -0400 |
---|---|---|
committer | Bobby R. Bruce <bbruce@ucdavis.edu> | 2019-11-20 18:39:09 +0000 |
commit | b4c9996d894118be04cdf4ed793b35a1d5001942 (patch) | |
tree | cd3b53dd0d0f6c7cd10c71c72592d6859a33ff1f /src/dev | |
parent | 1c4d64fb104245e7e655113155be02a5209e46c0 (diff) | |
download | gem5-b4c9996d894118be04cdf4ed793b35a1d5001942.tar.xz |
base,tests: Expanded GTests for addr_range.hh
These tests assume the "end address" is not included in the range. This
exposed some bugs in addr_range.hh which have been fixed. Where
appropriate code comments in addr_range.hh have been extended to improve
understanding of the class's behavior.
Hard-coded AddrRange values in the project have been updated to take
into account that end address is now exclusive. The python params.py
interface has been updated to conform to this new standard.
Change-Id: Idd1e75d5771d198c4b8142b28de0f3a6e9007a52
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22427
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/dev')
-rw-r--r-- | src/dev/arm/gic_v2.cc | 20 | ||||
-rw-r--r-- | src/dev/arm/gic_v3_distributor.cc | 28 | ||||
-rw-r--r-- | src/dev/arm/gic_v3_its.cc | 2 | ||||
-rw-r--r-- | src/dev/arm/gic_v3_redistributor.cc | 2 |
4 files changed, 26 insertions, 26 deletions
diff --git a/src/dev/arm/gic_v2.cc b/src/dev/arm/gic_v2.cc index 20bd01570..df71068d4 100644 --- a/src/dev/arm/gic_v2.cc +++ b/src/dev/arm/gic_v2.cc @@ -51,16 +51,16 @@ #include "mem/packet.hh" #include "mem/packet_access.hh" -const AddrRange GicV2::GICD_IGROUPR (0x080, 0x0ff); -const AddrRange GicV2::GICD_ISENABLER (0x100, 0x17f); -const AddrRange GicV2::GICD_ICENABLER (0x180, 0x1ff); -const AddrRange GicV2::GICD_ISPENDR (0x200, 0x27f); -const AddrRange GicV2::GICD_ICPENDR (0x280, 0x2ff); -const AddrRange GicV2::GICD_ISACTIVER (0x300, 0x37f); -const AddrRange GicV2::GICD_ICACTIVER (0x380, 0x3ff); -const AddrRange GicV2::GICD_IPRIORITYR(0x400, 0x7ff); -const AddrRange GicV2::GICD_ITARGETSR (0x800, 0xbff); -const AddrRange GicV2::GICD_ICFGR (0xc00, 0xcff); +const AddrRange GicV2::GICD_IGROUPR (0x080, 0x100); +const AddrRange GicV2::GICD_ISENABLER (0x100, 0x180); +const AddrRange GicV2::GICD_ICENABLER (0x180, 0x200); +const AddrRange GicV2::GICD_ISPENDR (0x200, 0x280); +const AddrRange GicV2::GICD_ICPENDR (0x280, 0x300); +const AddrRange GicV2::GICD_ISACTIVER (0x300, 0x380); +const AddrRange GicV2::GICD_ICACTIVER (0x380, 0x400); +const AddrRange GicV2::GICD_IPRIORITYR(0x400, 0x800); +const AddrRange GicV2::GICD_ITARGETSR (0x800, 0xc00); +const AddrRange GicV2::GICD_ICFGR (0xc00, 0xd00); GicV2::GicV2(const Params *p) : BaseGic(p), diff --git a/src/dev/arm/gic_v3_distributor.cc b/src/dev/arm/gic_v3_distributor.cc index e38fa185c..77a8392fa 100644 --- a/src/dev/arm/gic_v3_distributor.cc +++ b/src/dev/arm/gic_v3_distributor.cc @@ -50,20 +50,20 @@ #include "dev/arm/gic_v3_cpu_interface.hh" #include "dev/arm/gic_v3_redistributor.hh" -const AddrRange Gicv3Distributor::GICD_IGROUPR (0x0080, 0x00ff); -const AddrRange Gicv3Distributor::GICD_ISENABLER (0x0100, 0x017f); -const AddrRange Gicv3Distributor::GICD_ICENABLER (0x0180, 0x01ff); -const AddrRange Gicv3Distributor::GICD_ISPENDR (0x0200, 0x027f); -const AddrRange Gicv3Distributor::GICD_ICPENDR (0x0280, 0x02ff); -const AddrRange Gicv3Distributor::GICD_ISACTIVER (0x0300, 0x037f); -const AddrRange Gicv3Distributor::GICD_ICACTIVER (0x0380, 0x03ff); -const AddrRange Gicv3Distributor::GICD_IPRIORITYR(0x0400, 0x07ff); -const AddrRange Gicv3Distributor::GICD_ITARGETSR (0x0800, 0x08ff); -const AddrRange Gicv3Distributor::GICD_ICFGR (0x0c00, 0x0cff); -const AddrRange Gicv3Distributor::GICD_IGRPMODR (0x0d00, 0x0d7f); -const AddrRange Gicv3Distributor::GICD_NSACR (0x0e00, 0x0eff); -const AddrRange Gicv3Distributor::GICD_CPENDSGIR (0x0f10, 0x0f1f); -const AddrRange Gicv3Distributor::GICD_SPENDSGIR (0x0f20, 0x0f2f); +const AddrRange Gicv3Distributor::GICD_IGROUPR (0x0080, 0x0100); +const AddrRange Gicv3Distributor::GICD_ISENABLER (0x0100, 0x0180); +const AddrRange Gicv3Distributor::GICD_ICENABLER (0x0180, 0x0200); +const AddrRange Gicv3Distributor::GICD_ISPENDR (0x0200, 0x0280); +const AddrRange Gicv3Distributor::GICD_ICPENDR (0x0280, 0x0300); +const AddrRange Gicv3Distributor::GICD_ISACTIVER (0x0300, 0x0380); +const AddrRange Gicv3Distributor::GICD_ICACTIVER (0x0380, 0x0400); +const AddrRange Gicv3Distributor::GICD_IPRIORITYR(0x0400, 0x0800); +const AddrRange Gicv3Distributor::GICD_ITARGETSR (0x0800, 0x0900); +const AddrRange Gicv3Distributor::GICD_ICFGR (0x0c00, 0x0d00); +const AddrRange Gicv3Distributor::GICD_IGRPMODR (0x0d00, 0x0d80); +const AddrRange Gicv3Distributor::GICD_NSACR (0x0e00, 0x0f00); +const AddrRange Gicv3Distributor::GICD_CPENDSGIR (0x0f10, 0x0f20); +const AddrRange Gicv3Distributor::GICD_SPENDSGIR (0x0f20, 0x0f30); const AddrRange Gicv3Distributor::GICD_IROUTER (0x6000, 0x7fe0); Gicv3Distributor::Gicv3Distributor(Gicv3 * gic, uint32_t it_lines) diff --git a/src/dev/arm/gic_v3_its.cc b/src/dev/arm/gic_v3_its.cc index ab0d8c2d0..d25117e30 100644 --- a/src/dev/arm/gic_v3_its.cc +++ b/src/dev/arm/gic_v3_its.cc @@ -50,7 +50,7 @@ #define COMMAND(x, method) { x, DispatchEntry(#x, method) } -const AddrRange Gicv3Its::GITS_BASER(0x0100, 0x0138); +const AddrRange Gicv3Its::GITS_BASER(0x0100, 0x0140); const uint32_t Gicv3Its::CTLR_QUIESCENT = 0x80000000; diff --git a/src/dev/arm/gic_v3_redistributor.cc b/src/dev/arm/gic_v3_redistributor.cc index 11a1f9d3e..75fd9b326 100644 --- a/src/dev/arm/gic_v3_redistributor.cc +++ b/src/dev/arm/gic_v3_redistributor.cc @@ -49,7 +49,7 @@ #include "mem/fs_translating_port_proxy.hh" const AddrRange Gicv3Redistributor::GICR_IPRIORITYR(SGI_base + 0x0400, - SGI_base + 0x041f); + SGI_base + 0x0420); Gicv3Redistributor::Gicv3Redistributor(Gicv3 * gic, uint32_t cpu_id) : gic(gic), |