Fix some correctness issues in the lowelevel kernel bringup code.
authorkettenis <kettenis@openbsd.org>
Tue, 16 Mar 2021 10:57:47 +0000 (10:57 +0000)
committerkettenis <kettenis@openbsd.org>
Tue, 16 Mar 2021 10:57:47 +0000 (10:57 +0000)
commit552b34ae16c6cb664bf5ac5a9bf90eb0fc3f6a77
tree64f458d25892966032f21907d4359e412b2f3ceb
parent2b1e50bb102af0291af3cd37cce479ab3d05bcab
Fix some correctness issues in the lowelevel kernel bringup code.

- Make sure we install a dummy page table in TTBR0_EL1 before we change
  the size of the VA space in TCR_EL1.

- Flush the TLB after updating TCR_EL1.

- Flush TLB after installing the real kernel page table in TTBR1_EL1.

- Add some barriers around TLB flushes to make it consistent with
  other places where we do TLB flushes.

ok drahn@, patrick@
sys/arch/arm64/arm64/cpu.c
sys/arch/arm64/arm64/locore.S
sys/arch/arm64/arm64/pmap.c