You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we call lr instructions to load memory and reserve the address location, any store-related instruction (atomic or non-atomic) with a totally different address (not even the same cache line) will cause an error for subsequent sc instruction. Note that no PMP is enabled, and based on the device tree and memory map configs, the region is read/writeable. Also, on the Spike golden model, no error happens, and store conditional instruction updates the value of the address. For more information, I attached a sequence of instructions to reproduce.
What is the expected behavior?
Boom has to change the content of the memory because, between the lr and sc instructions, nothing broke the reservation.
Spike trace:
Nope, I believe this is a legal implementation difference in the specification. You can find more details in Volume 1 v20191213 Section 8.3 Eventual Success of Store-Conditional Instructions
Nope, I believe this is a legal implementation difference in the specification. You can find more details in Volume 1 v20191213 Section 8.3 Eventual Success of Store-Conditional Instructions
Based on specification Yes, but there are two critical problems:
Registering reservation for size of whole physical memory, first of all bring a lots of overhead because any store for any arbitrary address will break the reservation then code(user/kernel/firmware) needs a lots of try in a multi thread system.
Furthermore, such behaviour limit the flexibility of (user/kernel/firmware) for writing code between LR and SC because they need to avoid any store between LR and SC. It is makes sense to reserve a page size not whole memory.
Just because the reservation is invalidated by any store on the local hart doesn't mean that arbitrary stores on remote harts will invalidate the reservation. You don't even gain that much flexibility since Rocket uses the cache to track the reservation and if you exceed the associativity of the cache set, you can't keep the reservation.
Type of issue: bug report
Impact: unknown
Development Phase: request
Other information
When we call
lr
instructions to load memory and reserve the address location, any store-related instruction (atomic or non-atomic) with a totally different address (not even the same cache line) will cause an error for subsequentsc
instruction. Note that no PMP is enabled, and based on the device tree and memory map configs, the region is read/writeable. Also, on the Spike golden model, no error happens, and store conditional instruction updates the value of the address. For more information, I attached a sequence of instructions to reproduce.Execute following instructions on Boom:
What is the current behavior?
Boom does not change the memory content, and
sc
writes an error bit in therd
register.Boom core trace:
What is the expected behavior?
Boom has to change the content of the memory because, between the
lr
andsc
instructions, nothing broke the reservation.Spike trace:
Please tell us about your environment:
What is the use case for changing the behavior?
The text was updated successfully, but these errors were encountered: