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

Modeling LSE2 extension #24

Open
Blaisorblade opened this issue Dec 5, 2023 · 1 comment
Open

Modeling LSE2 extension #24

Blaisorblade opened this issue Dec 5, 2023 · 1 comment

Comments

@Blaisorblade
Copy link

IIUC, ARMv8-A LSE2 (Large System Extension 2) enables atomic misaligned reads that "fit in cachelines", and that seems to affect the model in minor ways — it seems the "storage" model reflects properties of caches and not just RAM.

For instance, a LDP instruction can read the the 64-bit value at address range [0x4, 0x12[ atomically — but only if the memory has inner & outer writeback cacheability.

  • If your RAM model forbids such a misaligned access, LSE2 requires allowing that, at least sometimes.
  • If your RAM model always allows such a misaligned access, no change is needed for LSE2 — that just seems a bit odd, and it means storage behavior accounts for some effects of caches as well.

References.

This is documented in prose in DDI0487 I.a, Sec. B2.5.2 Alignment of data accesses.
image

This is also documented in the DDI0487 I.a pseudocode (but not in DDI0487 G.a): function aarch64/functions/memory/AArch64.MemSingle (in Appendix J-1) will let CheckSingleAccessAttributes decide to split the access.

@fshaked
Copy link
Contributor

fshaked commented Dec 7, 2023

Hi Blaisorblade,

  • The model doesn't support LSE2 at the moment.
  • The storage subsystem is not supposed to be a model of RAM (this is more clear in the Flowing and POP models).
  • LDP is not very well supported by the model because it requires ISA level non-determinism that is not needed by any other instruction that we modelled so far, and we didn't get to implement that.

Shaked

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