diff --git a/nemu/src/memory/paddr.c b/nemu/src/memory/paddr.c index 1434f82..98c5ffd 100644 --- a/nemu/src/memory/paddr.c +++ b/nemu/src/memory/paddr.c @@ -53,7 +53,7 @@ void init_mem() { word_t paddr_read(paddr_t addr, int len) { if (likely(in_pmem(addr))) return pmem_read(addr, len); IFDEF(CONFIG_DEVICE, return mmio_read(addr, len)); - IFDEF(CONFIG_MTRACE, printf("R " FMT_WORD "%d\n", addr, len)); + IFDEF(CONFIG_MTRACE, Log("R " FMT_WORD "%d\n", addr, len)); out_of_bound(addr); return 0; } @@ -61,6 +61,6 @@ word_t paddr_read(paddr_t addr, int len) { void paddr_write(paddr_t addr, int len, word_t data) { if (likely(in_pmem(addr))) { pmem_write(addr, len, data); return; } IFDEF(CONFIG_DEVICE, mmio_write(addr, len, data); return); - IFDEF(CONFIG_MTRACE, printf("W " FMT_WORD "%d D" FMT_WORD "\n", addr, len, data)); + IFDEF(CONFIG_MTRACE, Log("W " FMT_WORD "%d D" FMT_WORD "\n", addr, len, data)); out_of_bound(addr); }