diff --git a/nemu/src/device/io/map.c b/nemu/src/device/io/map.c index 5ccf508..d610558 100644 --- a/nemu/src/device/io/map.c +++ b/nemu/src/device/io/map.c @@ -57,7 +57,9 @@ word_t map_read(paddr_t addr, int len, IOMap *map) { check_bound(map, addr); paddr_t offset = addr - map->low; invoke_callback(map->callback, offset, len, false); // prepare data to read - word_t ret = host_read(map->space + offset, len); +// word_t ret = host_read(map->space + offset, len); +word_t ret = *(word_t*)(map->space + offset); +printf("map_read: %p, %d\n", map->space + offset, ret); return ret; }