[RFC] powerpc: add kexec support on Book-E
Benjamin Herrenschmidt
benh at kernel.crashing.org
Fri Oct 10 14:53:46 EST 2008
On Wed, 2008-10-01 at 23:20 +0200, Sebastian Andrzej Siewior wrote:
> +#define KEXEC_MODE_NOMMU 1
> +#define KEXEC_MODE_BOOKE 2
No need for runtime detection here, you cannot and likely never will be
able to build a kernel that does bot BookE and real mode...
> +
> +/* 1. Find the index of the entry we're executing in */
> + bl invstr /* Find our address */
> +invstr:
> + mflr r6 /* Make it accessible */
> + mfmsr r7
> + rlwinm r4,r7,27,31,31 /* extract MSR[IS] */
> + mfspr r7, SPRN_PID0
> + slwi r7,r7,16
> + or r7,r7,r4
> + mtspr SPRN_MAS6,r7
> + tlbsx 0,r6 /* search MSR[IS], SPID=PID0 */
> + mfspr r7,SPRN_MAS1
> + andis. r7,r7,MAS1_VALID at h
> + bne match_TLB
This isn't just BookE .. it's specifically FSL BookE (or "merged"
architecture). This isn't going to work on 44x for example. You need to
make it clearer.
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list