Using GicV2 without setting the gem5_extensions parameter in a
config with more than 8 is not allowed to prevent overflow of
the 8-bit mask.
Change-Id: I780c6985e8f44ed780b4f74f9a27805124e23a7b
Signed-off-by: Tiago Mück <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19288
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
/*
- * Copyright (c) 2010, 2013, 2015-2018 ARM Limited
+ * Copyright (c) 2010, 2013, 2015-2019 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
if (gem5ExtensionsEnabled) {
ctx_mask = ctx;
} else {
- // convert the CPU id number into a bit mask
- ctx_mask = power(2, ctx);
+ fatal_if(ctx >= 8,
+ "%s requires the gem5_extensions parameter to support "
+ "more than 8 cores\n", name());
+ // convert the CPU id number into a bit mask
+ ctx_mask = 1 << ctx;
}
return ctx_mask;
} else {