root/trunk/patches/2.6.22/80-kexec-atags.patch
| Revision 896, 3.0 KB (checked in by mwester, 3 years ago) |
|---|
-
linux-2.6.22-rc5-armeb//arch/arm/kernel/setup.c
old new 23 23 #include <linux/cpu.h> 24 24 #include <linux/interrupt.h> 25 25 #include <linux/smp.h> 26 #include <linux/kexec.h> 26 27 27 28 #include <asm/cpu.h> 28 29 #include <asm/elf.h> … … 769 770 } 770 771 arch_initcall(customize_machine); 771 772 773 #ifdef CONFIG_KEXEC 774 775 /* Physical addr of where the boot params should be for this machine */ 776 extern unsigned long kexec_boot_params_address; 777 778 /* Physical addr of the buffer into which the boot params are copied */ 779 extern unsigned long kexec_boot_params_copy; 780 781 /* Pointer to the boot params buffer, for manipulation and display */ 782 unsigned long kexec_boot_params; 783 EXPORT_SYMBOL(kexec_boot_params); 784 785 /* The buffer itself - make sure it is sized correctly */ 786 static unsigned long kexec_boot_params_buf[(KEXEC_BOOT_PARAMS_SIZE + 3) / 4]; 787 788 #endif 789 772 790 void __init setup_arch(char **cmdline_p) 773 791 { 774 792 struct tag *tags = (struct tag *)&init_tags; … … 785 803 if (mdesc->boot_params) 786 804 tags = phys_to_virt(mdesc->boot_params); 787 805 806 #ifdef CONFIG_KEXEC 807 kexec_boot_params_address = mdesc->boot_params; 808 kexec_boot_params_copy = virt_to_phys(kexec_boot_params_buf); 809 kexec_boot_params = (unsigned long)kexec_boot_params_buf; 810 if (mdesc->boot_params) 811 memcpy((void *)kexec_boot_params, tags, KEXEC_BOOT_PARAMS_SIZE); 812 #endif 788 813 /* 789 814 * If we have the old style parameters, convert them to 790 815 * a tag list. -
linux-2.6.22-rc5-armeb//arch/arm/kernel/relocate_kernel.S
old new 7 7 .globl relocate_new_kernel 8 8 relocate_new_kernel: 9 9 10 /* Move boot params back to where the kernel expects them */ 11 12 ldr r0,kexec_boot_params_address 13 teq r0,#0 14 beq 8f 15 16 ldr r1,kexec_boot_params_copy 17 mov r6,#KEXEC_BOOT_PARAMS_SIZE/4 18 7: 19 ldr r5,[r1],#4 20 str r5,[r0],#4 21 subs r6,r6,#1 22 bne 7b 23 24 8: 25 /* Boot params moved, now go on with the kernel */ 26 10 27 ldr r0,kexec_indirection_page 11 28 ldr r1,kexec_start_address 12 29 … … 50 67 mov lr,r1 51 68 mov r0,#0 52 69 ldr r1,kexec_mach_type 53 mov r2,#070 ldr r2,kexec_boot_params_address 54 71 mov pc,lr 55 72 56 73 .globl kexec_start_address … … 65 82 kexec_mach_type: 66 83 .long 0x0 67 84 85 /* phy addr where new kernel will expect to find boot params */ 86 .globl kexec_boot_params_address 87 kexec_boot_params_address: 88 .long 0x0 89 90 /* phy addr where old kernel put a copy of orig boot params */ 91 .globl kexec_boot_params_copy 92 kexec_boot_params_copy: 93 .long 0x0 94 68 95 relocate_new_kernel_end: 69 96 70 97 .globl relocate_new_kernel_size -
linux-2.6.22-rc5-armeb//include/asm-arm/kexec.h
old new 14 14 15 15 #define KEXEC_ARCH KEXEC_ARCH_ARM 16 16 17 #define KEXEC_BOOT_PARAMS_SIZE 1536 18 17 19 #ifndef __ASSEMBLY__ 18 20 19 21 struct kimage;
Note: See TracBrowser
for help on using the browser.
