Subversion Repositories HelenOS

Rev

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

Rev 2131 Rev 2422
Line 52... Line 52...
52
 
52
 
53
#ifdef CONFIG_TSB
53
#ifdef CONFIG_TSB
54
#include <arch/mm/tsb.h>
54
#include <arch/mm/tsb.h>
55
#endif
55
#endif
56
 
56
 
57
static void dtlb_pte_copy(pte_t *t, bool ro);
57
static void dtlb_pte_copy(pte_t *t, index_t index, bool ro);
58
static void itlb_pte_copy(pte_t *t);
58
static void itlb_pte_copy(pte_t *t, index_t index);
59
static void do_fast_instruction_access_mmu_miss_fault(istate_t *istate, const
59
static void do_fast_instruction_access_mmu_miss_fault(istate_t *istate,
60
    char *str);
60
    const char *str);
61
static void do_fast_data_access_mmu_miss_fault(istate_t *istate,
61
static void do_fast_data_access_mmu_miss_fault(istate_t *istate,
62
     tlb_tag_access_reg_t tag, const char *str);
62
    tlb_tag_access_reg_t tag, const char *str);
63
static void do_fast_data_access_protection_fault(istate_t *istate,
63
static void do_fast_data_access_protection_fault(istate_t *istate,
64
    tlb_tag_access_reg_t tag, const char *str);
64
    tlb_tag_access_reg_t tag, const char *str);
65
 
65
 
66
char *context_encoding[] = {
66
char *context_encoding[] = {
67
    "Primary",
67
    "Primary",
68
    "Secondary",
68
    "Secondary",
69
    "Nucleus",
69
    "Nucleus",
Line 90... Line 90...
90
 * @param frame Physical frame address.
90
 * @param frame Physical frame address.
91
 * @param pagesize Page size.
91
 * @param pagesize Page size.
92
 * @param locked True for permanent mappings, false otherwise.
92
 * @param locked True for permanent mappings, false otherwise.
93
 * @param cacheable True if the mapping is cacheable, false otherwise.
93
 * @param cacheable True if the mapping is cacheable, false otherwise.
94
 */
94
 */
95
void dtlb_insert_mapping(uintptr_t page, uintptr_t frame, int pagesize, bool
95
void dtlb_insert_mapping(uintptr_t page, uintptr_t frame, int pagesize,
96
    locked, bool cacheable)
96
    bool locked, bool cacheable)
97
{
97
{
98
    tlb_tag_access_reg_t tag;
98
    tlb_tag_access_reg_t tag;
99
    tlb_data_t data;
99
    tlb_data_t data;
100
    page_address_t pg;
100
    page_address_t pg;
101
    frame_address_t fr;
101
    frame_address_t fr;
Line 124... Line 124...
124
    dtlb_data_in_write(data.value);
124
    dtlb_data_in_write(data.value);
125
}
125
}
126
 
126
 
127
/** Copy PTE to TLB.
127
/** Copy PTE to TLB.
128
 *
128
 *
129
 * @param t Page Table Entry to be copied.
129
 * @param t     Page Table Entry to be copied.
-
 
130
 * @param index Zero if lower 8K-subpage, one if higher 8K-subpage.
130
 * @param ro If true, the entry will be created read-only, regardless of its w
131
 * @param ro    If true, the entry will be created read-only, regardless of its
131
 *  field.
132
 *      w field.
132
 */
133
 */
133
void dtlb_pte_copy(pte_t *t, bool ro)
134
void dtlb_pte_copy(pte_t *t, index_t index, bool ro)
134
{
135
{
135
    tlb_tag_access_reg_t tag;
136
    tlb_tag_access_reg_t tag;
136
    tlb_data_t data;
137
    tlb_data_t data;
137
    page_address_t pg;
138
    page_address_t pg;
138
    frame_address_t fr;
139
    frame_address_t fr;
139
 
140
 
140
    pg.address = t->page;
141
    pg.address = t->page + (index << MMU_PAGE_WIDTH);
141
    fr.address = t->frame;
142
    fr.address = t->frame + (index << MMU_PAGE_WIDTH);
142
 
143
 
143
    tag.value = 0;
144
    tag.value = 0;
144
    tag.context = t->as->asid;
145
    tag.context = t->as->asid;
145
    tag.vpn = pg.vpn;
146
    tag.vpn = pg.vpn;
146
   
147
 
147
    dtlb_tag_access_write(tag.value);
148
    dtlb_tag_access_write(tag.value);
148
   
149
 
149
    data.value = 0;
150
    data.value = 0;
150
    data.v = true;
151
    data.v = true;
151
    data.size = PAGESIZE_8K;
152
    data.size = PAGESIZE_8K;
152
    data.pfn = fr.pfn;
153
    data.pfn = fr.pfn;
153
    data.l = false;
154
    data.l = false;
Line 156... Line 157...
156
    data.cv = t->c;
157
    data.cv = t->c;
157
#endif /* CONFIG_VIRT_IDX_DCACHE */
158
#endif /* CONFIG_VIRT_IDX_DCACHE */
158
    data.p = t->k;      /* p like privileged */
159
    data.p = t->k;      /* p like privileged */
159
    data.w = ro ? false : t->w;
160
    data.w = ro ? false : t->w;
160
    data.g = t->g;
161
    data.g = t->g;
161
   
162
 
162
    dtlb_data_in_write(data.value);
163
    dtlb_data_in_write(data.value);
163
}
164
}
164
 
165
 
165
/** Copy PTE to ITLB.
166
/** Copy PTE to ITLB.
166
 *
167
 *
167
 * @param t Page Table Entry to be copied.
168
 * @param t     Page Table Entry to be copied.
-
 
169
 * @param index Zero if lower 8K-subpage, one if higher 8K-subpage.
168
 */
170
 */
169
void itlb_pte_copy(pte_t *t)
171
void itlb_pte_copy(pte_t *t, index_t index)
170
{
172
{
171
    tlb_tag_access_reg_t tag;
173
    tlb_tag_access_reg_t tag;
172
    tlb_data_t data;
174
    tlb_data_t data;
173
    page_address_t pg;
175
    page_address_t pg;
174
    frame_address_t fr;
176
    frame_address_t fr;
175
 
177
 
176
    pg.address = t->page;
178
    pg.address = t->page + (index << MMU_PAGE_WIDTH);
177
    fr.address = t->frame;
179
    fr.address = t->frame + (index << MMU_PAGE_WIDTH);
178
 
180
 
179
    tag.value = 0;
181
    tag.value = 0;
180
    tag.context = t->as->asid;
182
    tag.context = t->as->asid;
181
    tag.vpn = pg.vpn;
183
    tag.vpn = pg.vpn;
182
   
184
   
Line 194... Line 196...
194
   
196
   
195
    itlb_data_in_write(data.value);
197
    itlb_data_in_write(data.value);
196
}
198
}
197
 
199
 
198
/** ITLB miss handler. */
200
/** ITLB miss handler. */
199
void fast_instruction_access_mmu_miss(int n, istate_t *istate)
201
void fast_instruction_access_mmu_miss(unative_t unused, istate_t *istate)
200
{
202
{
201
    uintptr_t va = ALIGN_DOWN(istate->tpc, PAGE_SIZE);
203
    uintptr_t va = ALIGN_DOWN(istate->tpc, PAGE_SIZE);
-
 
204
    index_t index = (istate->tpc >> MMU_PAGE_WIDTH) % MMU_PAGES_PER_PAGE;
202
    pte_t *t;
205
    pte_t *t;
203
 
206
 
204
    page_table_lock(AS, true);
207
    page_table_lock(AS, true);
205
    t = page_mapping_find(AS, va);
208
    t = page_mapping_find(AS, va);
206
    if (t && PTE_EXECUTABLE(t)) {
209
    if (t && PTE_EXECUTABLE(t)) {
207
        /*
210
        /*
208
         * The mapping was found in the software page hash table.
211
         * The mapping was found in the software page hash table.
209
         * Insert it into ITLB.
212
         * Insert it into ITLB.
210
         */
213
         */
211
        t->a = true;
214
        t->a = true;
212
        itlb_pte_copy(t);
215
        itlb_pte_copy(t, index);
213
#ifdef CONFIG_TSB
216
#ifdef CONFIG_TSB
214
        itsb_pte_copy(t);
217
        itsb_pte_copy(t, index);
215
#endif
218
#endif
216
        page_table_unlock(AS, true);
219
        page_table_unlock(AS, true);
217
    } else {
220
    } else {
218
        /*
221
        /*
219
         * Forward the page fault to the address space page fault
222
         * Forward the page fault to the address space page fault
220
         * handler.
223
         * handler.
221
         */    
224
         */    
222
        page_table_unlock(AS, true);
225
        page_table_unlock(AS, true);
223
        if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
226
        if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
224
            do_fast_instruction_access_mmu_miss_fault(istate,
227
            do_fast_instruction_access_mmu_miss_fault(istate,
225
                __FUNCTION__);
228
                __FUNCTION__);
226
        }
229
        }
227
    }
230
    }
228
}
231
}
229
 
232
 
230
/** DTLB miss handler.
233
/** DTLB miss handler.
231
 *
234
 *
232
 * Note that some faults (e.g. kernel faults) were already resolved by the
235
 * Note that some faults (e.g. kernel faults) were already resolved by the
233
 * low-level, assembly language part of the fast_data_access_mmu_miss handler.
236
 * low-level, assembly language part of the fast_data_access_mmu_miss handler.
-
 
237
 *
-
 
238
 * @param tag Content of the TLB Tag Access register as it existed when the
-
 
239
 *    trap happened. This is to prevent confusion created by clobbered
-
 
240
 *    Tag Access register during a nested DTLB miss.
-
 
241
 * @param istate Interrupted state saved on the stack.
234
 */
242
 */
235
void fast_data_access_mmu_miss(int n, istate_t *istate)
243
void fast_data_access_mmu_miss(tlb_tag_access_reg_t tag, istate_t *istate)
236
{
244
{
237
    tlb_tag_access_reg_t tag;
-
 
238
    uintptr_t va;
245
    uintptr_t va;
-
 
246
    index_t index;
239
    pte_t *t;
247
    pte_t *t;
240
 
248
 
241
    tag.value = dtlb_tag_access_read();
249
    va = ALIGN_DOWN((uint64_t) tag.vpn << MMU_PAGE_WIDTH, PAGE_SIZE);
242
    va = tag.vpn << PAGE_WIDTH;
250
    index = tag.vpn % MMU_PAGES_PER_PAGE;
243
 
251
 
244
    if (tag.context == ASID_KERNEL) {
252
    if (tag.context == ASID_KERNEL) {
245
        if (!tag.vpn) {
253
        if (!tag.vpn) {
246
            /* NULL access in kernel */
254
            /* NULL access in kernel */
247
            do_fast_data_access_mmu_miss_fault(istate, tag,
255
            do_fast_data_access_mmu_miss_fault(istate, tag,
248
                __FUNCTION__);
256
                __FUNCTION__);
249
        }
257
        }
250
        do_fast_data_access_mmu_miss_fault(istate, tag, "Unexpected "
258
        do_fast_data_access_mmu_miss_fault(istate, tag, "Unexpected "
251
            "kernel page fault.");
259
            "kernel page fault.");
252
    }
260
    }
253
 
261
 
254
    page_table_lock(AS, true);
262
    page_table_lock(AS, true);
255
    t = page_mapping_find(AS, va);
263
    t = page_mapping_find(AS, va);
256
    if (t) {
264
    if (t) {
257
        /*
265
        /*
258
         * The mapping was found in the software page hash table.
266
         * The mapping was found in the software page hash table.
259
         * Insert it into DTLB.
267
         * Insert it into DTLB.
260
         */
268
         */
261
        t->a = true;
269
        t->a = true;
262
        dtlb_pte_copy(t, true);
270
        dtlb_pte_copy(t, index, true);
263
#ifdef CONFIG_TSB
271
#ifdef CONFIG_TSB
264
        dtsb_pte_copy(t, true);
272
        dtsb_pte_copy(t, index, true);
265
#endif
273
#endif
266
        page_table_unlock(AS, true);
274
        page_table_unlock(AS, true);
267
    } else {
275
    } else {
268
        /*
276
        /*
269
         * Forward the page fault to the address space page fault handler.
277
         * Forward the page fault to the address space page fault
-
 
278
         * handler.
270
         */    
279
         */    
271
        page_table_unlock(AS, true);
280
        page_table_unlock(AS, true);
272
        if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
281
        if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
273
            do_fast_data_access_mmu_miss_fault(istate, tag,
282
            do_fast_data_access_mmu_miss_fault(istate, tag,
274
                __FUNCTION__);
283
                __FUNCTION__);
275
        }
284
        }
276
    }
285
    }
277
}
286
}
278
 
287
 
279
/** DTLB protection fault handler. */
288
/** DTLB protection fault handler.
-
 
289
 *
-
 
290
 * @param tag Content of the TLB Tag Access register as it existed when the
-
 
291
 *    trap happened. This is to prevent confusion created by clobbered
-
 
292
 *    Tag Access register during a nested DTLB miss.
-
 
293
 * @param istate Interrupted state saved on the stack.
-
 
294
 */
280
void fast_data_access_protection(int n, istate_t *istate)
295
void fast_data_access_protection(tlb_tag_access_reg_t tag, istate_t *istate)
281
{
296
{
282
    tlb_tag_access_reg_t tag;
-
 
283
    uintptr_t va;
297
    uintptr_t va;
-
 
298
    index_t index;
284
    pte_t *t;
299
    pte_t *t;
285
 
300
 
286
    tag.value = dtlb_tag_access_read();
301
    va = ALIGN_DOWN((uint64_t) tag.vpn << MMU_PAGE_WIDTH, PAGE_SIZE);
287
    va = tag.vpn << PAGE_WIDTH;
302
    index = tag.vpn % MMU_PAGES_PER_PAGE;   /* 16K-page emulation */
288
 
303
 
289
    page_table_lock(AS, true);
304
    page_table_lock(AS, true);
290
    t = page_mapping_find(AS, va);
305
    t = page_mapping_find(AS, va);
291
    if (t && PTE_WRITABLE(t)) {
306
    if (t && PTE_WRITABLE(t)) {
292
        /*
307
        /*
Line 294... Line 309...
294
         * writable. Demap the old mapping and insert an updated mapping
309
         * writable. Demap the old mapping and insert an updated mapping
295
         * into DTLB.
310
         * into DTLB.
296
         */
311
         */
297
        t->a = true;
312
        t->a = true;
298
        t->d = true;
313
        t->d = true;
299
        dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_SECONDARY, va);
314
        dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_SECONDARY,
-
 
315
            va + index * MMU_PAGE_SIZE);
300
        dtlb_pte_copy(t, false);
316
        dtlb_pte_copy(t, index, false);
301
#ifdef CONFIG_TSB
317
#ifdef CONFIG_TSB
302
        dtsb_pte_copy(t, false);
318
        dtsb_pte_copy(t, index, false);
303
#endif
319
#endif
304
        page_table_unlock(AS, true);
320
        page_table_unlock(AS, true);
305
    } else {
321
    } else {
306
        /*
322
        /*
307
         * Forward the page fault to the address space page fault
323
         * Forward the page fault to the address space page fault
308
         * handler.
324
         * handler.
309
         */    
325
         */    
310
        page_table_unlock(AS, true);
326
        page_table_unlock(AS, true);
311
        if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) {
327
        if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) {
312
            do_fast_data_access_protection_fault(istate, tag,
328
            do_fast_data_access_protection_fault(istate, tag,
313
                __FUNCTION__);
329
                __FUNCTION__);
314
        }
330
        }
315
    }
331
    }
316
}
332
}
317
 
333
 
318
/** Print contents of both TLBs. */
334
/** Print contents of both TLBs. */
Line 326... Line 342...
326
    for (i = 0; i < ITLB_ENTRY_COUNT; i++) {
342
    for (i = 0; i < ITLB_ENTRY_COUNT; i++) {
327
        d.value = itlb_data_access_read(i);
343
        d.value = itlb_data_access_read(i);
328
        t.value = itlb_tag_read_read(i);
344
        t.value = itlb_tag_read_read(i);
329
 
345
 
330
        printf("%d: vpn=%#llx, context=%d, v=%d, size=%d, nfo=%d, "
346
        printf("%d: vpn=%#llx, context=%d, v=%d, size=%d, nfo=%d, "
331
            "ie=%d, soft2=%#x, diag=%#x, pfn=%#x, soft=%#x, l=%d, "
347
            "ie=%d, soft2=%#x, diag=%#x, pfn=%#x, soft=%#x, l=%d, "
332
            "cp=%d, cv=%d, e=%d, p=%d, w=%d, g=%d\n", i, t.vpn,
348
            "cp=%d, cv=%d, e=%d, p=%d, w=%d, g=%d\n", i, t.vpn,
333
            t.context, d.v, d.size, d.nfo, d.ie, d.soft2, d.diag,
349
            t.context, d.v, d.size, d.nfo, d.ie, d.soft2, d.diag,
334
            d.pfn, d.soft, d.l, d.cp, d.cv, d.e, d.p, d.w, d.g);
350
            d.pfn, d.soft, d.l, d.cp, d.cv, d.e, d.p, d.w, d.g);
335
    }
351
    }
336
 
352
 
337
    printf("D-TLB contents:\n");
353
    printf("D-TLB contents:\n");
338
    for (i = 0; i < DTLB_ENTRY_COUNT; i++) {
354
    for (i = 0; i < DTLB_ENTRY_COUNT; i++) {
339
        d.value = dtlb_data_access_read(i);
355
        d.value = dtlb_data_access_read(i);
340
        t.value = dtlb_tag_read_read(i);
356
        t.value = dtlb_tag_read_read(i);
341
       
357
       
342
        printf("%d: vpn=%#llx, context=%d, v=%d, size=%d, nfo=%d, "
358
        printf("%d: vpn=%#llx, context=%d, v=%d, size=%d, nfo=%d, "
343
            "ie=%d, soft2=%#x, diag=%#x, pfn=%#x, soft=%#x, l=%d, "
359
            "ie=%d, soft2=%#x, diag=%#x, pfn=%#x, soft=%#x, l=%d, "
344
            "cp=%d, cv=%d, e=%d, p=%d, w=%d, g=%d\n", i, t.vpn,
360
            "cp=%d, cv=%d, e=%d, p=%d, w=%d, g=%d\n", i, t.vpn,
345
            t.context, d.v, d.size, d.nfo, d.ie, d.soft2, d.diag,
361
            t.context, d.v, d.size, d.nfo, d.ie, d.soft2, d.diag,
346
            d.pfn, d.soft, d.l, d.cp, d.cv, d.e, d.p, d.w, d.g);
362
            d.pfn, d.soft, d.l, d.cp, d.cv, d.e, d.p, d.w, d.g);
347
    }
363
    }
348
 
364
 
349
}
365
}
350
 
366
 
351
void do_fast_instruction_access_mmu_miss_fault(istate_t *istate, const char
367
void do_fast_instruction_access_mmu_miss_fault(istate_t *istate,
352
    *str)
368
    const char *str)
353
{
369
{
354
    fault_if_from_uspace(istate, "%s\n", str);
370
    fault_if_from_uspace(istate, "%s\n", str);
355
    dump_istate(istate);
371
    dump_istate(istate);
356
    panic("%s\n", str);
372
    panic("%s\n", str);
357
}
373
}
358
 
374
 
359
void do_fast_data_access_mmu_miss_fault(istate_t *istate, tlb_tag_access_reg_t
375
void do_fast_data_access_mmu_miss_fault(istate_t *istate,
360
    tag, const char *str)
376
    tlb_tag_access_reg_t tag, const char *str)
361
{
377
{
362
    uintptr_t va;
378
    uintptr_t va;
363
 
379
 
364
    va = tag.vpn << PAGE_WIDTH;
380
    va = tag.vpn << MMU_PAGE_WIDTH;
365
 
-
 
-
 
381
    if (tag.context) {
366
    fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, va,
382
        fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, va,
367
        tag.context);
383
            tag.context);
-
 
384
    }
368
    dump_istate(istate);
385
    dump_istate(istate);
369
    printf("Faulting page: %p, ASID=%d\n", va, tag.context);
386
    printf("Faulting page: %p, ASID=%d\n", va, tag.context);
370
    panic("%s\n", str);
387
    panic("%s\n", str);
371
}
388
}
372
 
389
 
373
void do_fast_data_access_protection_fault(istate_t *istate, tlb_tag_access_reg_t
390
void do_fast_data_access_protection_fault(istate_t *istate,
374
    tag, const char *str)
391
    tlb_tag_access_reg_t tag, const char *str)
375
{
392
{
376
    uintptr_t va;
393
    uintptr_t va;
377
 
394
 
378
    va = tag.vpn << PAGE_WIDTH;
395
    va = tag.vpn << MMU_PAGE_WIDTH;
379
 
396
 
-
 
397
    if (tag.context) {
380
    fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, va,
398
        fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d)\n", str, va,
381
        tag.context);
399
            tag.context);
-
 
400
    }
382
    printf("Faulting page: %p, ASID=%d\n", va, tag.context);
401
    printf("Faulting page: %p, ASID=%d\n", va, tag.context);
383
    dump_istate(istate);
402
    dump_istate(istate);
384
    panic("%s\n", str);
403
    panic("%s\n", str);
385
}
404
}
386
 
405
 
Line 391... Line 410...
391
 
410
 
392
    sfsr.value = dtlb_sfsr_read();
411
    sfsr.value = dtlb_sfsr_read();
393
    sfar = dtlb_sfar_read();
412
    sfar = dtlb_sfar_read();
394
   
413
   
395
    printf("DTLB SFSR: asi=%#x, ft=%#x, e=%d, ct=%d, pr=%d, w=%d, ow=%d, "
414
    printf("DTLB SFSR: asi=%#x, ft=%#x, e=%d, ct=%d, pr=%d, w=%d, ow=%d, "
396
        "fv=%d\n", sfsr.asi, sfsr.ft, sfsr.e, sfsr.ct, sfsr.pr, sfsr.w,
415
        "fv=%d\n", sfsr.asi, sfsr.ft, sfsr.e, sfsr.ct, sfsr.pr, sfsr.w,
397
        sfsr.ow, sfsr.fv);
416
        sfsr.ow, sfsr.fv);
398
    printf("DTLB SFAR: address=%p\n", sfar);
417
    printf("DTLB SFAR: address=%p\n", sfar);
399
   
418
   
400
    dtlb_sfsr_write(0);
419
    dtlb_sfsr_write(0);
401
}
420
}
402
 
421
 
Line 479... Line 498...
479
   
498
   
480
    ctx.v = pc_save.v = mmu_primary_context_read();
499
    ctx.v = pc_save.v = mmu_primary_context_read();
481
    ctx.context = asid;
500
    ctx.context = asid;
482
    mmu_primary_context_write(ctx.v);
501
    mmu_primary_context_write(ctx.v);
483
   
502
   
484
    for (i = 0; i < cnt; i++) {
503
    for (i = 0; i < cnt * MMU_PAGES_PER_PAGE; i++) {
485
        itlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_PRIMARY, page + i *
504
        itlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_PRIMARY,
486
            PAGE_SIZE);
505
            page + i * MMU_PAGE_SIZE);
487
        dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_PRIMARY, page + i *
506
        dtlb_demap(TLB_DEMAP_PAGE, TLB_DEMAP_PRIMARY,
488
            PAGE_SIZE);
507
            page + i * MMU_PAGE_SIZE);
489
    }
508
    }
490
   
509
   
491
    mmu_primary_context_write(pc_save.v);
510
    mmu_primary_context_write(pc_save.v);
492
   
511
   
493
    nucleus_leave();
512
    nucleus_leave();