Page MenuHomeFreeBSD

arm: Clear TTBCR before enabling the MMU
ClosedPublic

Authored by markj on Aug 4 2022, 1:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 20, 11:09 PM
Unknown Object (File)
Dec 10 2025, 8:56 PM
Unknown Object (File)
Dec 4 2025, 7:11 AM
Unknown Object (File)
Nov 28 2025, 4:36 AM
Unknown Object (File)
Nov 27 2025, 3:28 AM
Unknown Object (File)
Nov 18 2025, 2:08 PM
Unknown Object (File)
Oct 31 2025, 7:51 PM
Unknown Object (File)
Oct 31 2025, 4:49 AM
Subscribers

Details

Summary

Upon reset, this register is supposed to have a value of zero. But when
booting certain v7 CPUs in QEMU, we enter the kernel with several bits
set, including the EAE bit, which enables ARM's PAE extension. I'm not
sure if QEMU is setting, or the uboot loader. Because we don't
implement that extension and use regular 32-bit page tables, the kernel
hangs after enabling the MMU.

Just clear everything in TTBCR before enabling the MMU. FreeBSD doesn't
toggle anything in that register, and a look through the flag
definitions suggests that setting everything to zero is what we want.

PR: 251187

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable