Subject: Re: [kexec-lite PATCH] trampoline: Reset primary cpu endian to big-endian

From: Anton Blanchard <[email-masked]>
Date: Wed, 8 Jul 2015 11:56:32 +1000

Hi Sam,

> Older big-endian ppc64 kernels don't include the FIXUP_ENDIAN check,
> meaning if we kexec from a little-endian kernel the target kernel will
> fail to boot.
> Returning to big-endian before we enter the target kernel ensures that
> the target kernel can boot whether or not it includes FIXUP_ENDIAN.

Thanks!

I wonder if we can do something simpler, and always enter via rfid.
Avoids the need for the endian trampoline. Something like:

  	mtsrr0	r4

	mfmsr	r5
	clrrdi	r5,r5,1 	/* Clear MSR_LE */
	mtsrr1	r5

	li	r5,0

	rfid

Anton