Subversion Repositories HelenOS

Rev

Rev 4129 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4129 Rev 4433
Line 69... Line 69...
69
        cnt = TSB_ENTRY_COUNT;
69
        cnt = TSB_ENTRY_COUNT;
70
    else
70
    else
71
        cnt = pages;
71
        cnt = pages;
72
   
72
   
73
    for (i = 0; i < cnt; i++) {
73
    for (i = 0; i < cnt; i++) {
74
        ((tsb_entry_t *) as->arch.tsb_description.tsb_base)[
74
        ((tsb_entry_t *) PA2KA(as->arch.tsb_description.tsb_base))[
75
            (i0 + i) & (TSB_ENTRY_COUNT - 1)].data.v = false;
75
            (i0 + i) & (TSB_ENTRY_COUNT - 1)].data.v = false;
76
    }
76
    }
77
}
77
}
78
 
78
 
79
/** Copy software PTE to ITSB.
79
/** Copy software PTE to ITSB.
Line 87... Line 87...
87
    index_t entry;
87
    index_t entry;
88
 
88
 
89
    as = t->as;
89
    as = t->as;
90
    entry = (t->page >> MMU_PAGE_WIDTH) & TSB_INDEX_MASK;
90
    entry = (t->page >> MMU_PAGE_WIDTH) & TSB_INDEX_MASK;
91
    ASSERT(entry < TSB_ENTRY_COUNT);
91
    ASSERT(entry < TSB_ENTRY_COUNT);
92
    tsb = &((tsb_entry_t *) as->arch.tsb_description.tsb_base)[entry];
92
    tsb = &((tsb_entry_t *) PA2KA(as->arch.tsb_description.tsb_base))[entry];
93
 
93
 
94
    /*
94
    /*
95
     * We use write barriers to make sure that the TSB load
95
     * We use write barriers to make sure that the TSB load
96
     * won't use inconsistent data or that the fault will
96
     * won't use inconsistent data or that the fault will
97
     * be repeated.
97
     * be repeated.
Line 99... Line 99...
99
 
99
 
100
    tsb->data.v = false;
100
    tsb->data.v = false;
101
 
101
 
102
    write_barrier();
102
    write_barrier();
103
 
103
 
104
    tsb->tag.context = as->asid;
-
 
105
    tsb->tag.va_tag = t->page >> VA_TAG_PAGE_SHIFT;
104
    tsb->tag.va_tag = t->page >> VA_TAG_PAGE_SHIFT;
106
 
105
 
107
    tsb->data.value = 0;
106
    tsb->data.value = 0;
108
    tsb->data.nfo = false;
107
    tsb->data.nfo = false;
109
    tsb->data.ra = t->frame >> MMU_FRAME_WIDTH;
108
    tsb->data.ra = t->frame >> MMU_FRAME_WIDTH;
Line 133... Line 132...
133
    index_t entry;
132
    index_t entry;
134
 
133
 
135
    as = t->as;
134
    as = t->as;
136
    entry = (t->page >> MMU_PAGE_WIDTH) & TSB_INDEX_MASK;
135
    entry = (t->page >> MMU_PAGE_WIDTH) & TSB_INDEX_MASK;
137
    ASSERT(entry < TSB_ENTRY_COUNT);
136
    ASSERT(entry < TSB_ENTRY_COUNT);
138
    tsb = &((tsb_entry_t *) as->arch.tsb_description.tsb_base)[entry];
137
    tsb = &((tsb_entry_t *) PA2KA(as->arch.tsb_description.tsb_base))[entry];
139
 
138
 
140
    /*
139
    /*
141
     * We use write barriers to make sure that the TSB load
140
     * We use write barriers to make sure that the TSB load
142
     * won't use inconsistent data or that the fault will
141
     * won't use inconsistent data or that the fault will
143
     * be repeated.
142
     * be repeated.
Line 145... Line 144...
145
 
144
 
146
    tsb->data.v = false;
145
    tsb->data.v = false;
147
 
146
 
148
    write_barrier();
147
    write_barrier();
149
 
148
 
150
    tsb->tag.context = as->asid;
-
 
151
    tsb->tag.va_tag = t->page >> VA_TAG_PAGE_SHIFT;
149
    tsb->tag.va_tag = t->page >> VA_TAG_PAGE_SHIFT;
152
 
150
 
153
    tsb->data.value = 0;
151
    tsb->data.value = 0;
154
    tsb->data.nfo = false;
152
    tsb->data.nfo = false;
155
    tsb->data.ra = t->frame >> MMU_FRAME_WIDTH;
153
    tsb->data.ra = t->frame >> MMU_FRAME_WIDTH;