Page MenuHomeFreeBSD

arm: Clear TTBCR before enabling the MMU

Authored by markj on Thu, Aug 4, 1:36 PM.



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

rG FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.