diff options
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 69489bd3210c..b4bcf5a930fa 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -97,12 +97,6 @@ __secondary_hold_spinloop: | |||
97 | __secondary_hold_acknowledge: | 97 | __secondary_hold_acknowledge: |
98 | .llong 0x0 | 98 | .llong 0x0 |
99 | 99 | ||
100 | /* This flag is set by purgatory if we should be a kdump kernel. */ | ||
101 | /* Do not move this variable as purgatory knows about it. */ | ||
102 | .globl __kdump_flag | ||
103 | __kdump_flag: | ||
104 | .llong 0x0 | ||
105 | |||
106 | #ifdef CONFIG_PPC_ISERIES | 100 | #ifdef CONFIG_PPC_ISERIES |
107 | /* | 101 | /* |
108 | * At offset 0x20, there is a pointer to iSeries LPAR data. | 102 | * At offset 0x20, there is a pointer to iSeries LPAR data. |
@@ -112,6 +106,20 @@ __kdump_flag: | |||
112 | .llong hvReleaseData-KERNELBASE | 106 | .llong hvReleaseData-KERNELBASE |
113 | #endif /* CONFIG_PPC_ISERIES */ | 107 | #endif /* CONFIG_PPC_ISERIES */ |
114 | 108 | ||
109 | #ifdef CONFIG_CRASH_DUMP | ||
110 | /* This flag is set to 1 by a loader if the kernel should run | ||
111 | * at the loaded address instead of the linked address. This | ||
112 | * is used by kexec-tools to keep the the kdump kernel in the | ||
113 | * crash_kernel region. The loader is responsible for | ||
114 | * observing the alignment requirement. | ||
115 | */ | ||
116 | /* Do not move this variable as kexec-tools knows about it. */ | ||
117 | . = 0x5c | ||
118 | .globl __run_at_load | ||
119 | __run_at_load: | ||
120 | .long 0x72756e30 /* "run0" -- relocate to 0 by default */ | ||
121 | #endif | ||
122 | |||
115 | . = 0x60 | 123 | . = 0x60 |
116 | /* | 124 | /* |
117 | * The following code is used to hold secondary processors | 125 | * The following code is used to hold secondary processors |
@@ -1391,8 +1399,8 @@ _STATIC(__after_prom_start) | |||
1391 | lis r25,PAGE_OFFSET@highest /* compute virtual base of kernel */ | 1399 | lis r25,PAGE_OFFSET@highest /* compute virtual base of kernel */ |
1392 | sldi r25,r25,32 | 1400 | sldi r25,r25,32 |
1393 | #ifdef CONFIG_CRASH_DUMP | 1401 | #ifdef CONFIG_CRASH_DUMP |
1394 | ld r7,__kdump_flag-_stext(r26) | 1402 | lwz r7,__run_at_load-_stext(r26) |
1395 | cmpldi cr0,r7,1 /* kdump kernel ? - stay where we are */ | 1403 | cmplwi cr0,r7,1 /* kdump kernel ? - stay where we are */ |
1396 | bne 1f | 1404 | bne 1f |
1397 | add r25,r25,r26 | 1405 | add r25,r25,r26 |
1398 | #endif | 1406 | #endif |
@@ -1416,11 +1424,11 @@ _STATIC(__after_prom_start) | |||
1416 | #ifdef CONFIG_CRASH_DUMP | 1424 | #ifdef CONFIG_CRASH_DUMP |
1417 | /* | 1425 | /* |
1418 | * Check if the kernel has to be running as relocatable kernel based on the | 1426 | * Check if the kernel has to be running as relocatable kernel based on the |
1419 | * variable __kdump_flag, if it is set the kernel is treated as relocatable | 1427 | * variable __run_at_load, if it is set the kernel is treated as relocatable |
1420 | * kernel, otherwise it will be moved to PHYSICAL_START | 1428 | * kernel, otherwise it will be moved to PHYSICAL_START |
1421 | */ | 1429 | */ |
1422 | ld r7,__kdump_flag-_stext(r26) | 1430 | lwz r7,__run_at_load-_stext(r26) |
1423 | cmpldi cr0,r7,1 | 1431 | cmplwi cr0,r7,1 |
1424 | bne 3f | 1432 | bne 3f |
1425 | 1433 | ||
1426 | li r5,__end_interrupts - _stext /* just copy interrupts */ | 1434 | li r5,__end_interrupts - _stext /* just copy interrupts */ |