diff options
author | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2019-04-05 13:33:01 +0100 |
---|---|---|
committer | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2019-04-25 12:48:41 +0000 |
commit | c366e19e623ecd2d7e7ee8abb6582f95ce8a2b80 (patch) | |
tree | 0f26366363648864249b715086ff0394765eabc0 /src/dev | |
parent | 8f010ce138a9b09b0a30e3d53df88662045fcc29 (diff) | |
download | gem5-c366e19e623ecd2d7e7ee8abb6582f95ce8a2b80.tar.xz |
dev-arm: Check for maximum number of supported PE in GICv3
This is currently set to 256
Change-Id: If7bb2847c22f29bfa0cb4ebf4a7984ee43ab4e29
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18390
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/dev')
-rw-r--r-- | src/dev/arm/Gic.py | 4 | ||||
-rw-r--r-- | src/dev/arm/gic_v3.cc | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/dev/arm/Gic.py b/src/dev/arm/Gic.py index 6f7c8d973..8bc155fff 100644 --- a/src/dev/arm/Gic.py +++ b/src/dev/arm/Gic.py @@ -178,3 +178,7 @@ class Gicv3(BaseGic): "HV maintenance interrupt." "ARM strongly recommends that maintenance interrupts " "are configured to use INTID 25 (PPI Interrupt).") + + cpu_max = Param.Unsigned(256, + "Maximum number of PE. This is affecting the maximum number of " + "redistributors") diff --git a/src/dev/arm/gic_v3.cc b/src/dev/arm/gic_v3.cc index a6bd3d8fd..cfc7df579 100644 --- a/src/dev/arm/gic_v3.cc +++ b/src/dev/arm/gic_v3.cc @@ -58,6 +58,11 @@ Gicv3::init() redistributors.resize(sys->numContexts(), nullptr); cpuInterfaces.resize(sys->numContexts(), nullptr); + panic_if(sys->numContexts() > params()->cpu_max, + "Exceeding maximum number of PEs supported by GICv3: " + "using %u while maximum is %u\n", sys->numContexts(), + params()->cpu_max); + for (int i = 0; i < sys->numContexts(); i++) { redistributors[i] = new Gicv3Redistributor(this, i); cpuInterfaces[i] = new Gicv3CPUInterface(this, i); |