Subversion Repositories HelenOS

Rev

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

Rev 1891 Rev 1892
Line 64... Line 64...
64
    if (!tsb)
64
    if (!tsb)
65
        return -1;
65
        return -1;
66
 
66
 
67
    as->arch.itsb = (tsb_entry_t *) tsb;
67
    as->arch.itsb = (tsb_entry_t *) tsb;
68
    as->arch.dtsb = (tsb_entry_t *) (tsb + ITSB_ENTRY_COUNT * sizeof(tsb_entry_t));
68
    as->arch.dtsb = (tsb_entry_t *) (tsb + ITSB_ENTRY_COUNT * sizeof(tsb_entry_t));
-
 
69
    memsetb((uintptr_t) as->arch.itsb, (ITSB_ENTRY_COUNT+DTSB_ENTRY_COUNT)*sizeof(tsb_entry_t), 0);
69
#endif
70
#endif
70
    return 0;
71
    return 0;
71
}
72
}
72
 
73
 
73
int as_destructor_arch(as_t *as)
74
int as_destructor_arch(as_t *as)
Line 84... Line 85...
84
int as_create_arch(as_t *as, int flags)
85
int as_create_arch(as_t *as, int flags)
85
{
86
{
86
#ifdef CONFIG_TSB
87
#ifdef CONFIG_TSB
87
    ipl_t ipl;
88
    ipl_t ipl;
88
 
89
 
89
    memsetb((uintptr_t) as->arch.itsb, (ITSB_ENTRY_COUNT+DTSB_ENTRY_COUNT)*sizeof(tsb_entry_t), 0);
-
 
90
    ipl = interrupts_disable();
90
    ipl = interrupts_disable();
91
    mutex_lock_active(&as->lock);   /* completely unnecessary, but polite */
91
    mutex_lock_active(&as->lock);   /* completely unnecessary, but polite */
92
    tsb_invalidate(as, 0, (count_t) -1);
92
    tsb_invalidate(as, 0, (count_t) -1);
93
    mutex_unlock(&as->lock);
93
    mutex_unlock(&as->lock);
94
    interrupts_restore(ipl);
94
    interrupts_restore(ipl);