Line 161... |
Line 161... |
break;
|
break;
|
default:
|
default:
|
/* Mask reserved bits in DTLBMR and DTLBMR registers */
|
/* Mask reserved bits in DTLBMR and DTLBMR registers */
|
if ( (regno >= SPR_DTLBMR_BASE(0)) && (regno < SPR_DTLBTR_LAST(3))) {
|
if ( (regno >= SPR_DTLBMR_BASE(0)) && (regno < SPR_DTLBTR_LAST(3))) {
|
if((regno & 0xff) < 0x80)
|
if((regno & 0xff) < 0x80)
|
cpu_state.sprs[regno] = ((value / config.dmmu.pagesize) * config.dmmu.pagesize) |
|
cpu_state.sprs[regno] = DADDR_PAGE(value) |
|
(value & (SPR_DTLBMR_V | SPR_DTLBMR_PL1 | SPR_DTLBMR_CID | SPR_DTLBMR_LRU));
|
(value & (SPR_DTLBMR_V | SPR_DTLBMR_PL1 | SPR_DTLBMR_CID | SPR_DTLBMR_LRU));
|
else
|
else
|
cpu_state.sprs[regno] = ((value / config.dmmu.pagesize) * config.dmmu.pagesize) |
|
cpu_state.sprs[regno] = DADDR_PAGE(value) |
|
(value & (SPR_DTLBTR_CC | SPR_DTLBTR_CI | SPR_DTLBTR_WBC | SPR_DTLBTR_WOM |
|
(value & (SPR_DTLBTR_CC | SPR_DTLBTR_CI | SPR_DTLBTR_WBC | SPR_DTLBTR_WOM |
|
SPR_DTLBTR_A | SPR_DTLBTR_D | SPR_DTLBTR_URE | SPR_DTLBTR_UWE | SPR_DTLBTR_SRE |
|
SPR_DTLBTR_A | SPR_DTLBTR_D | SPR_DTLBTR_URE | SPR_DTLBTR_UWE | SPR_DTLBTR_SRE |
|
SPR_DTLBTR_SWE));
|
SPR_DTLBTR_SWE));
|
}
|
}
|
|
|
/* Mask reseved bits in ITLBMR and ITLBMR registers */
|
/* Mask reseved bits in ITLBMR and ITLBMR registers */
|
if ( (regno >= SPR_ITLBMR_BASE(0)) && (regno < SPR_ITLBTR_LAST(3))) {
|
if ( (regno >= SPR_ITLBMR_BASE(0)) && (regno < SPR_ITLBTR_LAST(3))) {
|
TRACE_(immu)("Writting to an mmu way (reg: %"PRIx16", value: %"PRIx32")\n",
|
TRACE_(immu)("Writting to an mmu way (reg: %"PRIx16", value: %"PRIx32")\n",
|
regno, value);
|
regno, value);
|
if((regno & 0xff) < 0x80)
|
if((regno & 0xff) < 0x80)
|
cpu_state.sprs[regno] = ((value / config.immu.pagesize) * config.immu.pagesize) |
|
cpu_state.sprs[regno] = IADDR_PAGE(value) |
|
(value & (SPR_ITLBMR_V | SPR_ITLBMR_PL1 | SPR_ITLBMR_CID | SPR_ITLBMR_LRU));
|
(value & (SPR_ITLBMR_V | SPR_ITLBMR_PL1 | SPR_ITLBMR_CID | SPR_ITLBMR_LRU));
|
else
|
else
|
cpu_state.sprs[regno] = ((value / config.immu.pagesize) * config.immu.pagesize) |
|
cpu_state.sprs[regno] = IADDR_PAGE(value) |
|
(value & (SPR_ITLBTR_CC | SPR_ITLBTR_CI | SPR_ITLBTR_WBC | SPR_ITLBTR_WOM |
|
(value & (SPR_ITLBTR_CC | SPR_ITLBTR_CI | SPR_ITLBTR_WBC | SPR_ITLBTR_WOM |
|
SPR_ITLBTR_A | SPR_ITLBTR_D | SPR_ITLBTR_SXE | SPR_ITLBTR_UXE));
|
SPR_ITLBTR_A | SPR_ITLBTR_D | SPR_ITLBTR_SXE | SPR_ITLBTR_UXE));
|
|
|
#if DYNAMIC_EXECUTION
|
#if DYNAMIC_EXECUTION
|
if(cpu_state.sprs[SPR_SR] & SPR_SR_IME) {
|
if(cpu_state.sprs[SPR_SR] & SPR_SR_IME) {
|