{
for (int x = 0; x < CPU_MAX; x++) {
iccrpr[x] = 0xff;
- cpuEnabled[x] = false;
+ cpuControl[x] = 0;
cpuPriority[x] = 0xff;
cpuBpr[x] = GICC_BPR_MINIMUM;
// Initialize cpu highest int
new EventFunctionWrapper([this, x]{ postDelayedInt(x); },
"Post Interrupt to CPU");
}
- DPRINTF(Interrupt, "cpuEnabled[0]=%d cpuEnabled[1]=%d\n", cpuEnabled[0],
- cpuEnabled[1]);
+ DPRINTF(Interrupt, "cpuEnabled[0]=%d cpuEnabled[1]=%d\n", cpuEnabled(0),
+ cpuEnabled(1));
gem5ExtensionsEnabled = false;
}
case GICC_IIDR:
return GICC_400_IIDR_VALUE;
case GICC_CTLR:
- return cpuEnabled[ctx];
+ return cpuControl[ctx];
case GICC_PMR:
return cpuPriority[ctx];
case GICC_BPR:
return cpuBpr[ctx];
case GICC_IAR:
- if (enabled && cpuEnabled[ctx]) {
+ if (enabled && cpuEnabled(ctx)) {
int active_int = cpuHighestInt[ctx];
IAR iar = 0;
iar.ack_id = active_int;
{
switch(daddr) {
case GICC_CTLR:
- cpuEnabled[ctx] = data;
+ cpuControl[ctx] = data;
break;
case GICC_PMR:
cpuPriority[ctx] = data;
panic("Tried to write Gic cpu at offset %#x\n", daddr);
break;
}
- if (cpuEnabled[ctx]) updateIntState(-1);
+ if (cpuEnabled(ctx)) updateIntState(-1);
}
GicV2::BankedRegs&
int dest = swi.cpu_list;
DPRINTF(IPI, "Generating softIRQ from CPU %d for CPU %d\n",
ctx, dest);
- if (cpuEnabled[dest]) {
+ if (cpuEnabled(dest)) {
cpuSgiPendingExt[dest] |= (1 << swi.sgi_id);
DPRINTF(IPI, "SGI[%d]=%#x\n", dest,
cpuSgiPendingExt[dest]);
// interrupt all
for (int i = 0; i < sys->numContexts(); i++) {
DPRINTF(IPI, "Processing CPU %d\n", i);
- if (!cpuEnabled[i])
+ if (!cpuEnabled(i))
continue;
cpuSgiPendingExt[i] |= 1 << swi.sgi_id;
DPRINTF(IPI, "SGI[%d]=%#x\n", swi.sgi_id,
// Interrupt requesting cpu only
DPRINTF(IPI, "Generating softIRQ from CPU %d for CPU %d\n",
ctx, ctx);
- if (cpuEnabled[ctx]) {
+ if (cpuEnabled(ctx)) {
cpuSgiPendingExt[ctx] |= (1 << swi.sgi_id);
DPRINTF(IPI, "SGI[%d]=%#x\n", ctx,
cpuSgiPendingExt[ctx]);
uint8_t cpu_list;
cpu_list = 0;
for (int x = 0; x < sys->numContexts(); x++)
- cpu_list |= cpuEnabled[x] ? 1 << x : 0;
+ cpu_list |= cpuEnabled(x) ? 1 << x : 0;
swi.cpu_list = cpu_list;
break;
case 2:
swi.cpu_list);
for (int i = 0; i < sys->numContexts(); i++) {
DPRINTF(IPI, "Processing CPU %d\n", i);
- if (!cpuEnabled[i])
+ if (!cpuEnabled(i))
continue;
if (swi.cpu_list & (1 << i))
cpuSgiPending[swi.sgi_id] |= (1 << i) << (8 * ctx);
GicV2::updateIntState(int hint)
{
for (int cpu = 0; cpu < sys->numContexts(); cpu++) {
- if (!cpuEnabled[cpu])
+ if (!cpuEnabled(cpu))
continue;
/*@todo use hint to do less work. */
/* @todo make this work for more than one cpu, need to handle 1:N, N:N
* models */
- if (enabled && cpuEnabled[cpu] &&
+ if (enabled && cpuEnabled(cpu) &&
(highest_pri < getCpuPriority(cpu)) &&
!(getActiveInt(cpu, intNumToWord(highest_int))
& (1 << intNumToBit(highest_int)))) {
GicV2::updateRunPri()
{
for (int cpu = 0; cpu < sys->numContexts(); cpu++) {
- if (!cpuEnabled[cpu])
+ if (!cpuEnabled(cpu))
continue;
uint8_t maxPriority = 0xff;
for (int i = 0; i < itLines; i++) {
SERIALIZE_ARRAY(intPriority, GLOBAL_INT_LINES);
SERIALIZE_ARRAY(cpuTarget, GLOBAL_INT_LINES);
SERIALIZE_ARRAY(intConfig, INT_BITS_MAX * 2);
- SERIALIZE_ARRAY(cpuEnabled, CPU_MAX);
+ SERIALIZE_ARRAY(cpuControl, CPU_MAX);
SERIALIZE_ARRAY(cpuPriority, CPU_MAX);
SERIALIZE_ARRAY(cpuBpr, CPU_MAX);
SERIALIZE_ARRAY(cpuHighestInt, CPU_MAX);
UNSERIALIZE_ARRAY(intPriority, GLOBAL_INT_LINES);
UNSERIALIZE_ARRAY(cpuTarget, GLOBAL_INT_LINES);
UNSERIALIZE_ARRAY(intConfig, INT_BITS_MAX * 2);
- UNSERIALIZE_ARRAY(cpuEnabled, CPU_MAX);
+ UNSERIALIZE_ARRAY(cpuControl, CPU_MAX);
UNSERIALIZE_ARRAY(cpuPriority, CPU_MAX);
UNSERIALIZE_ARRAY(cpuBpr, CPU_MAX);
UNSERIALIZE_ARRAY(cpuHighestInt, CPU_MAX);