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

Load Store to MMIO Regions #92

Open
BugraEryilmaz opened this issue Dec 3, 2024 · 1 comment
Open

Load Store to MMIO Regions #92

BugraEryilmaz opened this issue Dec 3, 2024 · 1 comment
Assignees

Comments

@BugraEryilmaz
Copy link
Contributor

Description
Loads and stores to MMIO regions have special meanings. Flexus assumes loads are idempotent (i.e., not destructive). However, this is not correct; reading an MMIO value might clear its value and make QEMU go into the wrong path.

Steps to Reproduce
Run data caching image with 2 cores
There will be ldr w2, [x2] instruction doing a read from address 0x80_0001_0000, which is in an MMIO region
Expected Behavior
Flexus should not attempt to read the value because it might be destructive, and resync with QEMU afterwards.

Actual Behavior
Flexus reads the value which clears it. QEMU gets wrong data from the load and gives a validation error

Fix: c700de3

@BugraEryilmaz BugraEryilmaz self-assigned this Dec 3, 2024
@BugraEryilmaz
Copy link
Contributor Author

Also, a small bug for stores; there are 2 MMIO regions (<0x4000_0000 and >0x40_0000_0000). Currently, Flexus discards the stores only to the first MMIO region. It should also discard stores to the second MMIO region. Fix: 47b8e03

P.S. The starting location of the high MMIO region depends on the RAM configuration. For any RAM below 256GB the location starts at 0x40_0000_0000, so we hardcoded that value. However, if there is an image with larger RAM, we need to correct it.

branylagaffe pushed a commit that referenced this issue Dec 18, 2024
System with more than 256GB of RAM often used addresses in the upper
address space to access MMIO.
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