about ppc32/kexec

Ming Lei mlei at Brocade.COM
Thu Apr 16 14:28:02 EDT 2009


Albert,

>> 
>> 1)       In relocate_new_kernel, you put the comment saying switch
the >>MMU off. Can you tell me how these code can achieve it. I don't
see it >>happens on FSL85xx(actually 85xx or 44x doesn't allow MMU to
turn off).
>> 
>> +       .globl relocate_new_kernel
>> +relocate_new_kernel:
>> +       /* r3 = page_list   */
>> +       /* r4 = reboot_code_buffer */
>> +       /* r5 = start_address      */
>> +
>> +       li      r0, 0
>> +
>> +       /*
>> +        * Set Machine Status Register to a known status,
>> +        * switch the MMU off and jump to 1: in a single step.
>> +        */
>> +
>> +       mr      r8, r0
>> +       ori     r8, r8, MSR_RI|MSR_ME
>> +       mtspr   SRR1, r8
>> +       addi    r8, r4, 1f - relocate_new_kernel
>> +       mtspr   SRR0, r8
>> +       sync
>> +       rfi

>This code sets the MSR to a value where MSR_IR (Instruction Relocate)
and >MSR_DI (Data Relocate) are cleared, and thus the MMU is turned
effectively >off.
>Turning the MMU off is possible at least on 6xx and 7xx.

I don't understand why you choose to turn the MMU off on ppc. Is there
any practical reason? On Freescale 85xx which is close to PPC44x, I did
not turn off MMU(I cannot) and I just rely on the current virtual to
physical mapping to jump to the start address to execute the second
kernel.




More information about the kexec mailing list