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

Modify Direct-Memory-Ptr to False in gs-memory for Tracking Memory Access in LiqBox Example #18

Open
alpha-beta-user opened this issue Dec 26, 2024 · 4 comments

Comments

@alpha-beta-user
Copy link

I have a situation where the gs_memory provides a direct-mem-ptr to the CPU, enabling fast memory access.

Now, I need to modify direct-mem-ptr to false to track every memory access. However, when doing this, the CPU halts when attempting to access 0x0.
if (p_dmi) txn.set_dmi_allowed(false);
image

I am currently using the liqbox example, specifically the simpleWriteTest case.

Looking forward to your assistance. Thank you!

@markfoodyburton
Copy link
Contributor

Are you using KVM, HVF or TCG?
Do you REALLY want all instruction bus accesses to go over the TLM fabric? That will make the thing unbearable slow?

I'd guess this may not be the first instruction executed, but that you end up branching to 0 because of some sort of fault. Note that ld/st exclusives may not be correctly implemented outside of DMI memory, you may need to (re-)plumb that through QEMU

@alpha-beta-user
Copy link
Author

I am using TCG.

I am considering using the get_mem_ptr method to start the firmware. Once the operating system is up and running, the interaction between the CPU and DDR can be conducted in TLM form. This approach allows transaction tracing for further analysis.

@alpha-beta-user
Copy link
Author

but I think it should not get wrong. I just chang p_dmi to false.

it will just cause slow but not wrong I think.

@markfoodyburton
Copy link
Contributor

True - please let us know if you find the issue !

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

2 participants