Skip to content
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

QemuCpu Access Way #16

Open
alpha-beta-user opened this issue Dec 19, 2024 · 0 comments
Open

QemuCpu Access Way #16

alpha-beta-user opened this issue Dec 19, 2024 · 0 comments

Comments

@alpha-beta-user
Copy link

          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)
{
using sc_core::sc_time;

    uint64_t addr = trans.get_address();
    sc_time now = m_initiator.initiator_get_local_time();

    m_inst.get().unlock_iothread();
    m_on_sysc.run_on_sysc([this, &trans, &now] { (*this)->b_transport(trans, now); });
    m_inst.get().lock_iothread();
    /*
     * Reset transaction address before dmi check (could be altered by
     * b_transport).
     */
    trans.set_address(addr);
    check_qemu_mr_hint(trans);
    if (trans.is_dmi_allowed()) {
        check_dmi_hint_locked(trans);
    }

    m_initiator.initiator_set_local_time(now);
}`

Is my undstanding right?

Originally posted by @alpha-beta-user in #15 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant