Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3834 → Rev 3835

/branches/sparc/kernel/arch/sparc64/src/mm/sun4v/tlb.c
74,37 → 74,12
};
#endif
 
mmu_fault_status_area_t mmu_fault_status_areas[MAX_NUM_STRANDS]
__attribute__ ((aligned (64)));
 
/*
* Invalidate all non-locked DTLB and ITLB entries.
*/
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.