> compile NEMU

ysyx_22040000 李心杨
Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar  1 12:35:11 UTC 2024 x86_64 GNU/Linux
 17:08:13  up   6:44,  2 users,  load average: 0.34, 0.29, 0.42
This commit is contained in:
tracer-ysyx 2024-03-13 17:08:13 +08:00 committed by xinyangli
parent ed8cd21c75
commit f147be9b5a

View file

@ -51,16 +51,16 @@ void init_mem() {
} }
word_t paddr_read(paddr_t addr, int len) { word_t paddr_read(paddr_t addr, int len) {
IFDEF(CONFIG_MTRACE, Log("R " FMT_WORD "%d\n", addr, len));
if (likely(in_pmem(addr))) return pmem_read(addr, len); if (likely(in_pmem(addr))) return pmem_read(addr, len);
IFDEF(CONFIG_DEVICE, return mmio_read(addr, len)); IFDEF(CONFIG_DEVICE, return mmio_read(addr, len));
IFDEF(CONFIG_MTRACE, Log("R " FMT_WORD "%d\n", addr, len));
out_of_bound(addr); out_of_bound(addr);
return 0; return 0;
} }
void paddr_write(paddr_t addr, int len, word_t data) { void paddr_write(paddr_t addr, int len, word_t data) {
IFDEF(CONFIG_MTRACE, Log("W " FMT_WORD "%d D" FMT_WORD "\n", addr, len, data));
if (likely(in_pmem(addr))) { pmem_write(addr, len, data); return; } if (likely(in_pmem(addr))) { pmem_write(addr, len, data); return; }
IFDEF(CONFIG_DEVICE, mmio_write(addr, len, data); return); IFDEF(CONFIG_DEVICE, mmio_write(addr, len, data); return);
IFDEF(CONFIG_MTRACE, Log("W " FMT_WORD "%d D" FMT_WORD "\n", addr, len, data));
out_of_bound(addr); out_of_bound(addr);
} }