[RFC] powerpc: add kexec support on Book-E

Sebastian Andrzej Siewior sebastian at breakpoint.cc
Sun Oct 12 09:55:05 EDT 2008


* Benjamin Herrenschmidt | 2008-10-10 14:53:46 [+1100]:

>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...
okay.

>> +
>> +/* 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.
Okay, I did know that. So I put a ifdef CONFIG_FSL_BOOKE around. May I
leave that MMU setup here? Moving it over to head_fsl_booke.S would make
it clear but than I have to copy the page-copy-code as well.

Thanks for looking over these bits Ben.

>Cheers,
>Ben.

Sebastian



More information about the kexec mailing list