]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[PowerPC] Fix booke64 qemu infinite loop in L2 cache enable
authorBrandon Bergren <bdragon@FreeBSD.org>
Fri, 19 Jun 2020 18:40:39 +0000 (18:40 +0000)
committerBrandon Bergren <bdragon@FreeBSD.org>
Fri, 19 Jun 2020 18:40:39 +0000 (18:40 +0000)
commit8415f755f1d25c350d9570172d2ed0470e8a35a2
tree2ece51be9321fc20772ed7714d9244405c56a3e3
parent37f530582dc5c6ffa83607fdab730a8506c7f466
[PowerPC] Fix booke64 qemu infinite loop in L2 cache enable

Since qemu does not implement the L2 cache, we get stuck forever waiting
for a bit to be set when trying to invalidate it.

To prevent that, we should bail out if the L2 cache is missing.
One easy way to check this is L2CFG0 == 0 (since L2CSIZE always has at
least one bit set in a valid implementation)

(tested on qemu, rb800, and x5000)

Reviewed by: jhibbits
Sponsored by: Tag1 Consulting, Inc.
Differential Revision: https://reviews.freebsd.org/D25225
sys/powerpc/booke/machdep_e500.c
sys/powerpc/include/spr.h