Changeset 89f61be in mainline


Ignore:
Timestamp:
2013-03-22T07:26:33Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8fe2c9bd
Parents:
ddfd158
Message:

Fix conversion from pfn to address in tlb_print().

File:
1 edited

Legend:

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

    rddfd158 r89f61be  
    4848#include <symtab.h>
    4949
    50 #define VPN_SHIFT       12     
     50#define PFN_SHIFT       12
     51#define VPN_SHIFT       12
    5152#define ADDR2VPN(a)     ((a) >> VPN_SHIFT)
    5253#define ADDR2VPN2(a)    (ADDR2VPN((a)) >> 1)
    5354#define VPN2ADDR(vpn)   ((vpn) << VPN_SHIFT)
    5455#define VPN22ADDR(vpn2) (VPN2ADDR(vpn2) << 1)
     56#define PFN2ADDR(pfn)   ((pfn) << PFN_SHIFT)
    5557
    5658#define BANK_SELECT_BIT(a)      (((a) >> PAGE_WIDTH) & 1)
     
    294296                printf("%-4u %-6u %0#10x %-#6x  %1u%1u%1u%1u  %0#10x\n",
    295297                    i, hi.asid, VPN22ADDR(hi.vpn2), mask.mask,
    296                     lo0.g, lo0.v, lo0.d, lo0.c, lo0.pfn << FRAME_WIDTH);
     298                    lo0.g, lo0.v, lo0.d, lo0.c, PFN2ADDR(lo0.pfn));
    297299                printf("                               %1u%1u%1u%1u  %0#10x\n",
    298                     lo1.g, lo1.v, lo1.d, lo1.c, lo1.pfn << FRAME_WIDTH);
     300                    lo1.g, lo1.v, lo1.d, lo1.c, PFN2ADDR(lo1.pfn));
    299301        }
    300302       
Note: See TracChangeset for help on using the changeset viewer.