On Fri, 28 May 2021 at 03:50, <c...@etri.re.kr> wrote: > In my baremetal test on aarch64, I pass the guest physical address of an > array of a structure to the qemu peripheral code using peripherals register. > > I soon realized the adderss is from another world and to access this address > in qemu, I need the host virtual address. > > I tried reading the document (and will read more) but it shows the load and > store APIs, and not the address translation API. > > I need that address because I have to pass the “address” to a function in a > dynamic library ( a .so file). I don’t myself load or store using that > address. > > What is the function for this “guest physical address to host virtual > address” translation?
There is address_space_map(), but watch out for the caveats documented in its doc comment in memory.h. thanks -- PMM