littlekernel / lk

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

[arch][arm64] cache maintainance on page tables during boot #315

Closed aaron-odell closed 1 year ago

aaron-odell commented 2 years ago

Add cache clean + invalidate on the page tables that get modified during startup before the MMU is enabled. Without this, if these memory regions were present in cache before LK started, the CPU will see the stale cached values as soon as the MMU is enabled. Invalidating these forces the CPU to fetch the correct values from memory after the MMU is enabled.

travisg commented 1 year ago

A bit late, but looks good. Going to take.