-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When Should QEMU CPU Call Specific Access Functions of QemuInitiatorSocket? #15
Comments
In general, I suggest reading up on SystemC TLM-2.0 as these functions are part of the TLM 2.0 (IEEE 1666) standard. Hope that helps |
thanks for your quick answer. I would like to know if a SystemC module provides two access methods simultaneously, namely the DMI access method and the b_transport method, will the CPU prioritize using the DMI access method? In other words, is there a priority for access methods? I observed that the CPU first calls the transport method to verify the address validity. Then, it checks whether the SystemC module includes the DMI access method. If it does, the CPU prioritizes using the DMI access method and creates the corresponding memory region for direct access by the CPU. |
In the first call b_transport process, the systemc module can set the trans if it can be dmi_enable. If it is true, cpu will call get_mem_ptr func to access the memory directly. `void do_regular_access(TlmPayload& trans)
Is my undstanding right? |
This is a handsome work!
I know that qemu_arm_cpu has a member called socket, which is mainly used for external memory access. The type of this socket is QemuInitiatorSocket. This socket has three access functions, as shown in the code below. I also understand that these three functions are essential for the socket.
The code below is in router.h file
target_socket.register_b_transport(this, &router::b_transport); target_socket.register_transport_dbg(this, &router::transport_dbg); target_socket.register_get_direct_mem_ptr(this, &router::get_direct_mem_ptr);
I would like to ask: at what point should the QEMU CPU call each of these functions? when to call dmi access--get_direct_mem_ptr (which seems create a memory region) ? and when to call just b_transport function?
thanks for your attention.
The text was updated successfully, but these errors were encountered: