Subversion Repositories HelenOS

Rev

Rev 3771 | Rev 3862 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3771 Rev 3835
Line 72... Line 72...
72
    "Nucleus",
72
    "Nucleus",
73
    "Reserved"
73
    "Reserved"
74
};
74
};
75
#endif
75
#endif
76
 
76
 
-
 
77
/*
77
mmu_fault_status_area_t mmu_fault_status_areas[MAX_NUM_STRANDS]
78
 * Invalidate all non-locked DTLB and ITLB entries.
78
     __attribute__ ((aligned (64)));
-
 
79
 
79
 */
80
void tlb_arch_init(void)
80
void tlb_arch_init(void)
81
{
81
{
82
    uint64_t errno;
-
 
83
    /*
-
 
84
     * Invalidate all non-locked DTLB and ITLB entries.
-
 
85
     */
-
 
86
   
-
 
87
    tlb_invalidate_all();
82
    tlb_invalidate_all();
88
 
-
 
89
    /*
-
 
90
     * Set the MMU fault status area for the current CPU.
-
 
91
     */
-
 
92
    uint64_t myid;
-
 
93
    __hypercall_fast_ret1(0, 0, 0, 0, 0, CPU_MYID, &myid);
-
 
94
    errno = __hypercall_fast1(MMU_FAULT_AREA_CONF,
-
 
95
            KA2PA(&(mmu_fault_status_areas[myid])));
-
 
96
    if (errno != EOK) {
-
 
97
        panic("Could not set MMU fault area for CPU %d, errno = %d.\n",
-
 
98
            myid, errno);
-
 
99
    }
-
 
100
    printf("Setting MMU fault area for CPU %d at %x.\n", myid, KA2PA(&(mmu_fault_status_areas[myid])));
-
 
101
#if 0
-
 
102
    /*
-
 
103
     * Clear both SFSRs.
-
 
104
     */
-
 
105
    dtlb_sfsr_write(0);
-
 
106
    itlb_sfsr_write(0);
-
 
107
#endif
-
 
108
}
83
}
109
 
84
 
110
/** Insert privileged mapping into DMMU TLB.
85
/** Insert privileged mapping into DMMU TLB.
111
 *
86
 *
112
 * @param page      Virtual page address.
87
 * @param page      Virtual page address.