diff options
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 63 |
1 files changed, 12 insertions, 51 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 831acbdf2592..e16eb2a33173 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -21,7 +21,6 @@ | |||
21 | * 2 of the License, or (at your option) any later version. | 21 | * 2 of the License, or (at your option) any later version. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/config.h> | ||
25 | #include <linux/threads.h> | 24 | #include <linux/threads.h> |
26 | #include <asm/reg.h> | 25 | #include <asm/reg.h> |
27 | #include <asm/page.h> | 26 | #include <asm/page.h> |
@@ -85,34 +84,6 @@ END_FTR_SECTION(0, 1) | |||
85 | /* Catch branch to 0 in real mode */ | 84 | /* Catch branch to 0 in real mode */ |
86 | trap | 85 | trap |
87 | 86 | ||
88 | #ifdef CONFIG_PPC_ISERIES | ||
89 | /* | ||
90 | * At offset 0x20, there is a pointer to iSeries LPAR data. | ||
91 | * This is required by the hypervisor | ||
92 | */ | ||
93 | . = 0x20 | ||
94 | .llong hvReleaseData-KERNELBASE | ||
95 | |||
96 | /* | ||
97 | * At offset 0x28 and 0x30 are offsets to the mschunks_map | ||
98 | * array (used by the iSeries LPAR debugger to do translation | ||
99 | * between physical addresses and absolute addresses) and | ||
100 | * to the pidhash table (also used by the debugger) | ||
101 | */ | ||
102 | .llong mschunks_map-KERNELBASE | ||
103 | .llong 0 /* pidhash-KERNELBASE SFRXXX */ | ||
104 | |||
105 | /* Offset 0x38 - Pointer to start of embedded System.map */ | ||
106 | .globl embedded_sysmap_start | ||
107 | embedded_sysmap_start: | ||
108 | .llong 0 | ||
109 | /* Offset 0x40 - Pointer to end of embedded System.map */ | ||
110 | .globl embedded_sysmap_end | ||
111 | embedded_sysmap_end: | ||
112 | .llong 0 | ||
113 | |||
114 | #endif /* CONFIG_PPC_ISERIES */ | ||
115 | |||
116 | /* Secondary processors spin on this value until it goes to 1. */ | 87 | /* Secondary processors spin on this value until it goes to 1. */ |
117 | .globl __secondary_hold_spinloop | 88 | .globl __secondary_hold_spinloop |
118 | __secondary_hold_spinloop: | 89 | __secondary_hold_spinloop: |
@@ -124,6 +95,15 @@ __secondary_hold_spinloop: | |||
124 | __secondary_hold_acknowledge: | 95 | __secondary_hold_acknowledge: |
125 | .llong 0x0 | 96 | .llong 0x0 |
126 | 97 | ||
98 | #ifdef CONFIG_PPC_ISERIES | ||
99 | /* | ||
100 | * At offset 0x20, there is a pointer to iSeries LPAR data. | ||
101 | * This is required by the hypervisor | ||
102 | */ | ||
103 | . = 0x20 | ||
104 | .llong hvReleaseData-KERNELBASE | ||
105 | #endif /* CONFIG_PPC_ISERIES */ | ||
106 | |||
127 | . = 0x60 | 107 | . = 0x60 |
128 | /* | 108 | /* |
129 | * The following code is used on pSeries to hold secondary processors | 109 | * The following code is used on pSeries to hold secondary processors |
@@ -1602,9 +1582,6 @@ _GLOBAL(__start_initialization_multiplatform) | |||
1602 | /* Setup some critical 970 SPRs before switching MMU off */ | 1582 | /* Setup some critical 970 SPRs before switching MMU off */ |
1603 | bl .__970_cpu_preinit | 1583 | bl .__970_cpu_preinit |
1604 | 1584 | ||
1605 | /* cpu # */ | ||
1606 | li r24,0 | ||
1607 | |||
1608 | /* Switch off MMU if not already */ | 1585 | /* Switch off MMU if not already */ |
1609 | LOAD_REG_IMMEDIATE(r4, .__after_prom_start - KERNELBASE) | 1586 | LOAD_REG_IMMEDIATE(r4, .__after_prom_start - KERNELBASE) |
1610 | add r4,r4,r30 | 1587 | add r4,r4,r30 |
@@ -1683,6 +1660,9 @@ _STATIC(__after_prom_start) | |||
1683 | /* i.e. where we are running */ | 1660 | /* i.e. where we are running */ |
1684 | /* the source addr */ | 1661 | /* the source addr */ |
1685 | 1662 | ||
1663 | cmpdi r4,0 /* In some cases the loader may */ | ||
1664 | beq .start_here_multiplatform /* have already put us at zero */ | ||
1665 | /* so we can skip the copy. */ | ||
1686 | LOAD_REG_IMMEDIATE(r5,copy_to_here) /* # bytes of memory to copy */ | 1666 | LOAD_REG_IMMEDIATE(r5,copy_to_here) /* # bytes of memory to copy */ |
1687 | sub r5,r5,r27 | 1667 | sub r5,r5,r27 |
1688 | 1668 | ||
@@ -1962,14 +1942,6 @@ _STATIC(start_here_common) | |||
1962 | li r3,0 | 1942 | li r3,0 |
1963 | bl .do_cpu_ftr_fixups | 1943 | bl .do_cpu_ftr_fixups |
1964 | 1944 | ||
1965 | LOAD_REG_IMMEDIATE(r26, boot_cpuid) | ||
1966 | lwz r26,0(r26) | ||
1967 | |||
1968 | LOAD_REG_IMMEDIATE(r24, paca) /* Get base vaddr of paca array */ | ||
1969 | mulli r13,r26,PACA_SIZE /* Calculate vaddr of right paca */ | ||
1970 | add r13,r13,r24 /* for this processor. */ | ||
1971 | mtspr SPRN_SPRG3,r13 | ||
1972 | |||
1973 | /* ptr to current */ | 1945 | /* ptr to current */ |
1974 | LOAD_REG_IMMEDIATE(r4, init_task) | 1946 | LOAD_REG_IMMEDIATE(r4, init_task) |
1975 | std r4,PACACURRENT(r13) | 1947 | std r4,PACACURRENT(r13) |
@@ -1995,17 +1967,6 @@ _STATIC(start_here_common) | |||
1995 | /* Not reached */ | 1967 | /* Not reached */ |
1996 | BUG_OPCODE | 1968 | BUG_OPCODE |
1997 | 1969 | ||
1998 | /* Put the paca pointer into r13 and SPRG3 */ | ||
1999 | _GLOBAL(setup_boot_paca) | ||
2000 | LOAD_REG_IMMEDIATE(r3, boot_cpuid) | ||
2001 | lwz r3,0(r3) | ||
2002 | LOAD_REG_IMMEDIATE(r4, paca) /* Get base vaddr of paca array */ | ||
2003 | mulli r3,r3,PACA_SIZE /* Calculate vaddr of right paca */ | ||
2004 | add r13,r3,r4 /* for this processor. */ | ||
2005 | mtspr SPRN_SPRG3,r13 | ||
2006 | |||
2007 | blr | ||
2008 | |||
2009 | /* | 1970 | /* |
2010 | * We put a few things here that have to be page-aligned. | 1971 | * We put a few things here that have to be page-aligned. |
2011 | * This stuff goes at the beginning of the bss, which is page-aligned. | 1972 | * This stuff goes at the beginning of the bss, which is page-aligned. |