littlekernel / lk

LK embedded kernel
MIT License
3.11k stars 611 forks source link

[arch][arm64] Fix mmu_unmap issue when FEAT_TTL is implemented #386

Closed shavitmichael closed 9 months ago

shavitmichael commented 10 months ago

Precisely set bits [55:22] of the vaddress in bits [43:0] for the vae1is and vaee1is TLBI commands.

On platforms where FEAT_TLL is implemented, bits [47:44] of the command accept a TTL parameter which can optionally be set to hint the translation table level containing the address being invalidated. Implementations aren't architecturally required to perform the invalidation if the hint is incorrect however. Invalidations may therefore fail with the current implementation if the vaddress has bits set in [58:55].

This is notably an issue on ARM fastmodels which doesn't perform the invalidation when the TTL parameter is incorrect.

shavitmichael commented 9 months ago

Light ping :) @travisg

travisg commented 9 months ago

Good catch! Sorry for the delay on this one, I totally missed it in my email spew.