powerpc64le: fix boot when using QEMU PowerNV
When using QEMU PowerNV with latest op-build release (v2.7), its kexec transfers control to FreeBSD kernel in BE mode, causing an instant exception on LE kernels. Make kboot able to detect and swap endian to fix this. Reviewed by: imp Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D33104
This commit is contained in:
parent
b9f3b63ab2
commit
e141b62d20
@ -82,6 +82,9 @@ TOC_ENTRY(trapstk)
|
||||
*/
|
||||
.section ".text.kboot", "x", @progbits
|
||||
kbootentry:
|
||||
#ifdef __LITTLE_ENDIAN__
|
||||
RETURN_TO_NATIVE_ENDIAN
|
||||
#endif
|
||||
b __start
|
||||
. = kbootentry + 0x40 /* Magic address used in platform layer */
|
||||
.global smp_spin_sem
|
||||
|
Loading…
Reference in New Issue
Block a user