Changeset 02055415 in mainline for arch/mips32/src/mm/tlb.c


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

ptlb command (currently usable on mips32 only).

File:
1 edited

Legend:

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

    rf5acb62 r02055415  
    6666         * Invalidate all entries.
    6767         */
    68         for (i = 0; i < TLB_SIZE; i++) {
     68        for (i = 0; i < TLB_ENTRY_COUNT; i++) {
    6969                cp0_index_write(i);
    7070                tlbwi();
     
    323323        ipl = interrupts_disable();
    324324       
    325         for (i = 0; i < TLB_SIZE; i++) {
     325        for (i = 0; i < TLB_ENTRY_COUNT; i++) {
    326326                cp0_index_write(i);
    327327                tlbr();
     
    400400}
    401401
     402/** Print contents of TLB. */
    402403void tlb_print(void)
    403404{
    404 }
     405        entry_lo_t lo0, lo1;
     406        entry_hi_t hi;
     407        int i;
     408
     409        printf("TLB:\n");
     410        for (i = 0; i < TLB_ENTRY_COUNT; i++) {
     411                cp0_index_write(i);
     412
     413                tlbr();
     414               
     415                hi.value = cp0_entry_hi_read();
     416                lo0.value = cp0_entry_lo0_read();
     417                lo1.value = cp0_entry_lo1_read();
     418               
     419                printf("%d: asid=%d, vpn2=%d\tg[0]=%d, v[0]=%d, d[0]=%d, c[0]=%B, pfn[0]=%d\n"
     420                       "\t\t\tg[1]=%d, v[1]=%d, d[1]=%d, c[1]=%B, pfn[1]=%d\n",
     421                       i, hi.asid, hi.vpn2, lo0.g, lo0.v, lo0.d, lo0.c, lo0.pfn,
     422                       lo1.g, lo1.v, lo1.d, lo1.c, lo1.pfn);
     423        }
     424}
Note: See TracChangeset for help on using the changeset viewer.