Skip to content

QemuCpu Access Way #16

@alpha-beta-user

Description

@alpha-beta-user
          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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions