diff options
author | adrian <adrian@FreeBSD.org> | 2013-09-29 10:14:16 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2013-09-29 10:14:16 +0000 |
commit | 6cadba08cd1ba50a069d07a831817dfbbd089039 (patch) | |
tree | b2f9b25e5fce711be26f707eab11cb1393810058 /sys/mips | |
parent | 692422280784cd0e0bfba12afc522bdc86c120d6 (diff) | |
download | FreeBSD-src-6cadba08cd1ba50a069d07a831817dfbbd089039.zip FreeBSD-src-6cadba08cd1ba50a069d07a831817dfbbd089039.tar.gz |
Add pagemask debugging output in "show tlb" in the debugger.
Approved by: re (marius)
Obtained from: bsdimp
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/mips/tlb.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/mips/mips/tlb.c b/sys/mips/mips/tlb.c index 9907ce9..1ad8a11 100644 --- a/sys/mips/mips/tlb.c +++ b/sys/mips/mips/tlb.c @@ -54,6 +54,7 @@ struct tlb_state { register_t entryhi; register_t entrylo0; register_t entrylo1; + register_t pagemask; } entry[MIPS_MAX_TLB_ENTRIES]; }; @@ -285,6 +286,7 @@ tlb_save(void) tlb_read(); tlb_state[cpu].entry[i].entryhi = mips_rd_entryhi(); + tlb_state[cpu].entry[i].pagemask = mips_rd_pagemask(); tlb_state[cpu].entry[i].entrylo0 = mips_rd_entrylo0(); tlb_state[cpu].entry[i].entrylo1 = mips_rd_entrylo1(); } @@ -339,7 +341,7 @@ tlb_invalidate_one(unsigned i) DB_SHOW_COMMAND(tlb, ddb_dump_tlb) { - register_t ehi, elo0, elo1; + register_t ehi, elo0, elo1, epagemask; unsigned i, cpu, ntlb; /* @@ -378,11 +380,12 @@ DB_SHOW_COMMAND(tlb, ddb_dump_tlb) ehi = tlb_state[cpu].entry[i].entryhi; elo0 = tlb_state[cpu].entry[i].entrylo0; elo1 = tlb_state[cpu].entry[i].entrylo1; + epagemask = tlb_state[cpu].entry[i].pagemask; if (elo0 == 0 && elo1 == 0) continue; - db_printf("#%u\t=> %jx\n", i, (intmax_t)ehi); + db_printf("#%u\t=> %jx (pagemask %jx)\n", i, (intmax_t)ehi, (intmax_t) epagemask); db_printf(" Lo0\t%jx\t(%#jx)\n", (intmax_t)elo0, (intmax_t)TLBLO_PTE_TO_PA(elo0)); db_printf(" Lo1\t%jx\t(%#jx)\n", (intmax_t)elo1, (intmax_t)TLBLO_PTE_TO_PA(elo1)); } |