summaryrefslogtreecommitdiff
path: root/src/dev
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev')
-rw-r--r--src/dev/arm/Gic.py4
-rw-r--r--src/dev/arm/gic_v3.cc5
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);