74,12 → 74,37 |
}; |
#endif |
|
/* |
* Invalidate all non-locked DTLB and ITLB entries. |
*/ |
mmu_fault_status_area_t mmu_fault_status_areas[MAX_NUM_STRANDS] |
__attribute__ ((aligned (64))); |
|
void tlb_arch_init(void) |
{ |
uint64_t errno; |
/* |
* Invalidate all non-locked DTLB and ITLB entries. |
*/ |
|
tlb_invalidate_all(); |
|
/* |
* Set the MMU fault status area for the current CPU. |
*/ |
uint64_t myid; |
__hypercall_fast_ret1(0, 0, 0, 0, 0, CPU_MYID, &myid); |
errno = __hypercall_fast1(MMU_FAULT_AREA_CONF, |
KA2PA(&(mmu_fault_status_areas[myid]))); |
if (errno != EOK) { |
panic("Could not set MMU fault area for CPU %d, errno = %d.\n", |
myid, errno); |
} |
printf("Setting MMU fault area for CPU %d at %x.\n", myid, KA2PA(&(mmu_fault_status_areas[myid]))); |
#if 0 |
/* |
* Clear both SFSRs. |
*/ |
dtlb_sfsr_write(0); |
itlb_sfsr_write(0); |
#endif |
} |
|
/** Insert privileged mapping into DMMU TLB. |