Subversion Repositories HelenOS

Rev

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

Rev 2071 Rev 2720
Line 465... Line 465...
465
void tlb_print(void)
465
void tlb_print(void)
466
{
466
{
467
    page_mask_t mask;
467
    page_mask_t mask;
468
    entry_lo_t lo0, lo1;
468
    entry_lo_t lo0, lo1;
469
    entry_hi_t hi, hi_save;
469
    entry_hi_t hi, hi_save;
470
    int i;
470
    unsigned int i;
471
 
471
 
472
    hi_save.value = cp0_entry_hi_read();
472
    hi_save.value = cp0_entry_hi_read();
473
 
473
   
474
    printf("TLB:\n");
474
    printf("#  ASID VPN2   MASK G V D C PFN\n");
-
 
475
    printf("-- ---- ------ ---- - - - - ------\n");
-
 
476
   
475
    for (i = 0; i < TLB_ENTRY_COUNT; i++) {
477
    for (i = 0; i < TLB_ENTRY_COUNT; i++) {
476
        cp0_index_write(i);
478
        cp0_index_write(i);
477
        tlbr();
479
        tlbr();
478
       
480
       
479
        mask.value = cp0_pagemask_read();
481
        mask.value = cp0_pagemask_read();
480
        hi.value = cp0_entry_hi_read();
482
        hi.value = cp0_entry_hi_read();
481
        lo0.value = cp0_entry_lo0_read();
483
        lo0.value = cp0_entry_lo0_read();
482
        lo1.value = cp0_entry_lo1_read();
484
        lo1.value = cp0_entry_lo1_read();
483
       
485
       
484
        printf("%d: asid=%d, vpn2=%d, mask=%d\tg[0]=%d, v[0]=%d, d[0]=%d, c[0]=%hhd, pfn[0]=%d\n"
486
        printf("%-2u %-4u %#6x %#4x %1u %1u %1u %1u %#6x\n",
485
               "\t\t\t\tg[1]=%d, v[1]=%d, d[1]=%d, c[1]=%hhd, pfn[1]=%d\n",
487
            i, hi.asid, hi.vpn2, mask.mask,
486
               i, hi.asid, hi.vpn2, mask.mask, lo0.g, lo0.v, lo0.d, lo0.c, lo0.pfn,
488
            lo0.g, lo0.v, lo0.d, lo0.c, lo0.pfn);
-
 
489
        printf("                    %1u %1u %1u %1u %#6x\n",
487
               lo1.g, lo1.v, lo1.d, lo1.c, lo1.pfn);
490
            lo1.g, lo1.v, lo1.d, lo1.c, lo1.pfn);
488
    }
491
    }
489
   
492
   
490
    cp0_entry_hi_write(hi_save.value);
493
    cp0_entry_hi_write(hi_save.value);
491
}
494
}
492
 
495