Subversion Repositories HelenOS

Rev

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

Rev 2071 Rev 2078
Line 325... Line 325...
325
   
325
   
326
    printf("I-TLB contents:\n");
326
    printf("I-TLB contents:\n");
327
    for (i = 0; i < ITLB_ENTRY_COUNT; i++) {
327
    for (i = 0; i < ITLB_ENTRY_COUNT; i++) {
328
        d.value = itlb_data_access_read(i);
328
        d.value = itlb_data_access_read(i);
329
        t.value = itlb_tag_read_read(i);
329
        t.value = itlb_tag_read_read(i);
330
       
330
 
331
        printf("%d: vpn=%#llx, context=%d, v=%d, size=%d, nfo=%d, "
331
        printf("%d: vpn=%#llx, context=%d, v=%d, size=%d, nfo=%d, "
332
            "ie=%d, soft2=%#x, diag=%#x, pfn=%#x, soft=%#x, l=%d, "
332
            "ie=%d, soft2=%#x, diag=%#x, pfn=%#x, soft=%#x, l=%d, "
333
            "cp=%d, cv=%d, e=%d, p=%d, w=%d, g=%d\n", i, t.vpn,
333
            "cp=%d, cv=%d, e=%d, p=%d, w=%d, g=%d\n", i, t.vpn,
334
            t.context, d.v, d.size, d.nfo, d.ie, d.soft2, d.diag,
334
            t.context, d.v, d.size, d.nfo, d.ie, d.soft2, d.diag,
335
            d.pfn, d.soft, d.l, d.cp, d.cv, d.e, d.p, d.w, d.g);
335
            d.pfn, d.soft, d.l, d.cp, d.cv, d.e, d.p, d.w, d.g);
Line 406... Line 406...
406
{
406
{
407
    int i;
407
    int i;
408
    tlb_data_t d;
408
    tlb_data_t d;
409
    tlb_tag_read_reg_t t;
409
    tlb_tag_read_reg_t t;
410
 
410
 
-
 
411
    /*
-
 
412
     * Walk all ITLB and DTLB entries and remove all unlocked mappings.
-
 
413
     *
-
 
414
     * The kernel doesn't use global mappings so any locked global mappings
-
 
415
     * found  must have been created by someone else. Their only purpose now
-
 
416
     * is to collide with proper mappings. Invalidate immediately. It should
-
 
417
     * be safe to invalidate them as late as now.
-
 
418
     */
-
 
419
 
411
    for (i = 0; i < ITLB_ENTRY_COUNT; i++) {
420
    for (i = 0; i < ITLB_ENTRY_COUNT; i++) {
412
        d.value = itlb_data_access_read(i);
421
        d.value = itlb_data_access_read(i);
413
        if (!d.l) {
422
        if (!d.l || d.g) {
414
            t.value = itlb_tag_read_read(i);
423
            t.value = itlb_tag_read_read(i);
415
            d.v = false;
424
            d.v = false;
416
            itlb_tag_access_write(t.value);
425
            itlb_tag_access_write(t.value);
417
            itlb_data_access_write(i, d.value);
426
            itlb_data_access_write(i, d.value);
418
        }
427
        }
419
    }
428
    }
420
   
429
   
421
    for (i = 0; i < DTLB_ENTRY_COUNT; i++) {
430
    for (i = 0; i < DTLB_ENTRY_COUNT; i++) {
422
        d.value = dtlb_data_access_read(i);
431
        d.value = dtlb_data_access_read(i);
423
        if (!d.l) {
432
        if (!d.l || d.g) {
424
            t.value = dtlb_tag_read_read(i);
433
            t.value = dtlb_tag_read_read(i);
425
            d.v = false;
434
            d.v = false;
426
            dtlb_tag_access_write(t.value);
435
            dtlb_tag_access_write(t.value);
427
            dtlb_data_access_write(i, d.value);
436
            dtlb_data_access_write(i, d.value);
428
        }
437
        }