|
Message
From: =?unknown-8bit?Q?Gy=F6rgy?= 'nog' Jeney<nog@s...>
Date: Thu Mar 24 21:09:23 CET 2005
Subject: [openrisc] [or1ksim #44] Make the dmmu use the new debug functions
Hi,This make the dmmu use the new debug functions. ChangeLog: * Make the dmmu use the new debug functions.
nog. -------------- next part -------------- diff -urp --unidirectional-new-file /home/nog/or1ksim-split/support/dbchs.h ./support/dbchs.h --- /home/nog/or1ksim-split/support/dbchs.h 2005-03-22 17:55:32.000000000 +0100 +++ ./support/dbchs.h 2005-03-17 18:07:52.000000000 +0100 @@ -20,5 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridg /* Declatrations of all debug channels */ DECLARE_DEBUG_CHANNEL(sched) +DECLARE_DEBUG_CHANNEL(dmmu) DECLARE_DEBUG_CHANNEL(tick) DECLARE_DEBUG_CHANNEL(uart) --- mmu/dmmu.c 2005-03-16 12:36:32.000000000 +0100 +++ /home/nog/or1ksim-split/mmu/dmmu.c 2005-03-22 18:30:28.000000000 +0100 @@ -36,6 +36,8 @@ #include "sim-config.h" #include "debug.h" +DEFAULT_DEBUG_CHANNEL(dmmu); + extern int cont_run; /* Data MMU */ @@ -66,7 +68,8 @@ /* Did we find our tlb entry? */ if (way >= 0) { /* Yes, we did. */ dmmu_stats.loads_tlbhit++; - debug(5, "DTLB hit (virtaddr=%"PRIxADDR").\n", virtaddr); + TRACE("DTLB hit (virtaddr=%"PRIxADDR") at %lli.\n", virtaddr, + runtime.sim.cycles); /* Test for page fault */ if (mfspr (SPR_SR) & SPR_SR_SM) { @@ -108,6 +111,8 @@ setsprbits(SPR_DTLBMR_BASE(minway) + set, SPR_DTLBMR_V, 1); #endif except_handle(EXCEPT_DTLBMISS, virtaddr); + TRACE("DTLB miss (virtaddr=%"PRIxADDR") at %lli.\n", virtaddr, + runtime.sim.cycles); /* if tlb refill implemented in HW */ /* return getsprbits(SPR_DTLBTR_BASE(minway) + set, SPR_DTLBTR_PPN) * config.dmmu.pagesize + (virtaddr % config.dmmu.pagesize); */ runtime.sim.mem_cycles += config.dmmu.missdelay; @@ -159,7 +164,8 @@ /* Did we find our tlb entry? */ if (way >= 0) { /* Yes, we did. */ dmmu_stats.loads_tlbhit++; - debug(5, "DTLB hit (virtaddr=%"PRIxADDR").\n", virtaddr); + TRACE("DTLB hit (virtaddr=%"PRIxADDR") at %lli.\n", virtaddr, + runtime.sim.cycles); /* Test for page fault */ if (mfspr (SPR_SR) & SPR_SR_SM) { @@ -188,7 +194,7 @@ return(0); } - PRINTF("ERR, should never have happened\n"); + ERR("ERR, should never have happened\n"); return(0); }
|
 |