Subversion Repositories HelenOS

Rev

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

Rev 3022 Rev 4055
Line 74... Line 74...
74
 
74
 
75
    as->arch.itsb = (tsb_entry_t *) tsb;
75
    as->arch.itsb = (tsb_entry_t *) tsb;
76
    as->arch.dtsb = (tsb_entry_t *) (tsb + ITSB_ENTRY_COUNT *
76
    as->arch.dtsb = (tsb_entry_t *) (tsb + ITSB_ENTRY_COUNT *
77
        sizeof(tsb_entry_t));
77
        sizeof(tsb_entry_t));
78
 
78
 
79
    memsetb((uintptr_t) as->arch.itsb,
79
    memsetb(as->arch.itsb,
80
        (ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) * sizeof(tsb_entry_t), 0);
80
        (ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) * sizeof(tsb_entry_t), 0);
81
#endif
81
#endif
82
    return 0;
82
    return 0;
83
}
83
}
84
 
84
 
Line 162... Line 162...
162
 
162
 
163
    tsb_base.base = ((uintptr_t) as->arch.itsb) >> MMU_PAGE_WIDTH;
163
    tsb_base.base = ((uintptr_t) as->arch.itsb) >> MMU_PAGE_WIDTH;
164
    itsb_base_write(tsb_base.value);
164
    itsb_base_write(tsb_base.value);
165
    tsb_base.base = ((uintptr_t) as->arch.dtsb) >> MMU_PAGE_WIDTH;
165
    tsb_base.base = ((uintptr_t) as->arch.dtsb) >> MMU_PAGE_WIDTH;
166
    dtsb_base_write(tsb_base.value);
166
    dtsb_base_write(tsb_base.value);
-
 
167
   
-
 
168
#if defined (US3)
-
 
169
    /*
-
 
170
     * Clear the extension registers.
-
 
171
     * In HelenOS, primary and secondary context registers contain
-
 
172
     * equal values and kernel misses (context 0, ie. the nucleus context)
-
 
173
     * are excluded from the TSB miss handler, so it makes no sense
-
 
174
     * to have separate TSBs for primary, secondary and nucleus contexts.
-
 
175
     * Clearing the extension registers will ensure that the value of the
-
 
176
     * TSB Base register will be used as an address of TSB, making the code
-
 
177
     * compatible with the US port.
-
 
178
     */
-
 
179
    itsb_primary_extension_write(0);
-
 
180
    itsb_nucleus_extension_write(0);
-
 
181
    dtsb_primary_extension_write(0);
-
 
182
    dtsb_secondary_extension_write(0);
-
 
183
    dtsb_nucleus_extension_write(0);
-
 
184
#endif
167
#endif
185
#endif
168
}
186
}
169
 
187
 
170
/** Perform sparc64-specific tasks when an address space is removed from the
188
/** Perform sparc64-specific tasks when an address space is removed from the
171
 * processor.
189
 * processor.