127c127,128
< lookupTable.insert(new_entry->range, new_entry);;
---
> i = lookupTable.insert(new_entry->range, new_entry);
> assert(i != lookupTable.end());
151c152
< tr.size = va + MachineBytes;
---
> tr.size = MachineBytes;
182a184
> MapIter i;
198a201,203
> DPRINTF(IPR, "TLB: Demapping Page va=%#x pid=%#d cid=%d r=%d\n",
> va, partition_id, context_id, real);
>
203c208
< tr.size = va + MachineBytes;
---
> tr.size = MachineBytes;
210a216
> DPRINTF(IPR, "TLB: Demapped page\n");
223a230,231
> DPRINTF(IPR, "TLB: Demapping Context pid=%#d cid=%d\n",
> partition_id, context_id);
241a250
> DPRINTF(TLB, "TLB: Demapping All pid=%#d\n", partition_id);
886a896,898
> bool ignore;
> int part_id;
> int ctx_id;
1005a1018,1052
> case ASI_IMMU_DEMAP:
> ignore = false;
> ctx_id = -1;
> part_id = tc->readMiscRegWithEffect(MISCREG_MMU_PART_ID);
> switch (bits(va,5,4)) {
> case 0:
> ctx_id = tc->readMiscRegWithEffect(MISCREG_MMU_P_CONTEXT);
> break;
> case 1:
> ignore = true;
> break;
> case 3:
> ctx_id = 0;
> break;
> default:
> ignore = true;
> }
>
> switch(bits(va,7,6)) {
> case 0: // demap page
> if (!ignore)
> tc->getITBPtr()->demapPage(mbits(va,63,13), part_id,
> bits(va,9,9), ctx_id);
> break;
> case 1: //demap context
> if (!ignore)
> tc->getITBPtr()->demapContext(part_id, ctx_id);
> break;
> case 2:
> tc->getITBPtr()->demapAll(part_id);
> break;
> default:
> panic("Invalid type for IMMU demap\n");
> }
> break;
1017a1065,1098
> case ASI_DMMU_DEMAP:
> ignore = false;
> ctx_id = -1;
> part_id = tc->readMiscRegWithEffect(MISCREG_MMU_PART_ID);
> switch (bits(va,5,4)) {
> case 0:
> ctx_id = tc->readMiscRegWithEffect(MISCREG_MMU_P_CONTEXT);
> break;
> case 1:
> ctx_id = tc->readMiscRegWithEffect(MISCREG_MMU_S_CONTEXT);
> break;
> case 3:
> ctx_id = 0;
> break;
> default:
> ignore = true;
> }
>
> switch(bits(va,7,6)) {
> case 0: // demap page
> if (!ignore)
> demapPage(mbits(va,63,13), part_id, bits(va,9,9), ctx_id);
> break;
> case 1: //demap context
> if (!ignore)
> demapContext(part_id, ctx_id);
> break;
> case 2:
> demapAll(part_id);
> break;
> default:
> panic("Invalid type for IMMU demap\n");
> }
> break;