forked from sysprog21/rv32emu
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To enable guest OS to run SDL applications using bidirectional queues, the VMM or system emulator must access the guest OS's virtual memory, as the queues are defined there. This requires MMU translation. In addition, the queues event data size likely larger than a word (maybe a page), thus the existing rv->io.mem_{read,write}_w do not sufficient for such memory manipulation. Export rv->io.mem_translate() to perform gVA2gPA translation. Unifying MMU translation logic by using rv->io.mem_translate(), eliminating redundant flows: mmu_walk -> check_pg_fault -> check_signal -> get_ppn_and_offset. Also, this interface allowing src/syscall_sdl.c to handle virtual memory by first translating the gVA2gPA, followed by memory_{read/write} the chunk of data at once. TODO: dTLB can be introduced in rv->io.mem_trans() to cache the gVA2gPA translation. See: sysprog21#310, sysprog21#510
- Loading branch information
1 parent
78d2977
commit 9ff0244
Showing
2 changed files
with
116 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters