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>
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user