Changeset 0bd4f56d in mainline


Ignore:
Timestamp:
2005-12-12T19:40:57Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c52ed6b
Parents:
6ed8b3a
Message:

Weaken the assumption, that PageMask register contains the right mask everytime.
As a result, TLB exceptions will explicitly write this register when filling TLB entry.
Adjust tlb_print() on mips32 to print PageMask as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/src/mm/tlb.c

    r6ed8b3a r0bd4f56d  
    6969                tlbwi();
    7070        }
     71
    7172               
    7273        /*
     
    118119                cp0_entry_lo1_write(lo.value);
    119120        }
     121        cp0_pagemask_write(TLB_PAGE_MASK_16K);
    120122        tlbwr();
    121123
     
    186188        else
    187189                cp0_entry_lo1_write(lo.value);
     190        cp0_pagemask_write(TLB_PAGE_MASK_16K);
    188191        tlbwi();
    189192
     
    261264        else
    262265                cp0_entry_lo1_write(lo.value);
     266        cp0_pagemask_write(TLB_PAGE_MASK_16K);
    263267        tlbwi();
    264268
     
    369373void tlb_print(void)
    370374{
     375        page_mask_t mask;
    371376        entry_lo_t lo0, lo1;
    372377        entry_hi_t hi;
     
    378383                tlbr();
    379384               
     385                mask.value = cp0_pagemask_read();
    380386                hi.value = cp0_entry_hi_read();
    381387                lo0.value = cp0_entry_lo0_read();
    382388                lo1.value = cp0_entry_lo1_read();
    383389               
    384                 printf("%d: asid=%d, vpn2=%d\tg[0]=%d, v[0]=%d, d[0]=%d, c[0]=%B, pfn[0]=%d\n"
    385                        "\t\t\tg[1]=%d, v[1]=%d, d[1]=%d, c[1]=%B, pfn[1]=%d\n",
    386                        i, hi.asid, hi.vpn2, lo0.g, lo0.v, lo0.d, lo0.c, lo0.pfn,
     390                printf("%d: asid=%d, vpn2=%d, mask=%d\tg[0]=%d, v[0]=%d, d[0]=%d, c[0]=%B, pfn[0]=%d\n"
     391                       "\t\t\t\tg[1]=%d, v[1]=%d, d[1]=%d, c[1]=%B, pfn[1]=%d\n",
     392                       i, hi.asid, hi.vpn2, mask.mask, lo0.g, lo0.v, lo0.d, lo0.c, lo0.pfn,
    387393                       lo1.g, lo1.v, lo1.d, lo1.c, lo1.pfn);
    388394        }
Note: See TracChangeset for help on using the changeset viewer.