diff options
Diffstat (limited to 'arch/powerpc/kernel/head_64.S')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index 35084f3a841b..a5ae04a57c78 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -1544,7 +1544,11 @@ _STATIC(__boot_from_prom) | |||
1544 | mr r28,r6 | 1544 | mr r28,r6 |
1545 | mr r27,r7 | 1545 | mr r27,r7 |
1546 | 1546 | ||
1547 | /* Align the stack to 16-byte boundary for broken yaboot */ | 1547 | /* |
1548 | * Align the stack to 16-byte boundary | ||
1549 | * Depending on the size and layout of the ELF sections in the initial | ||
1550 | * boot binary, the stack pointer will be unalignet on PowerMac | ||
1551 | */ | ||
1548 | rldicr r1,r1,0,59 | 1552 | rldicr r1,r1,0,59 |
1549 | 1553 | ||
1550 | /* Make sure we are running in 64 bits mode */ | 1554 | /* Make sure we are running in 64 bits mode */ |
@@ -1847,21 +1851,6 @@ _STATIC(start_here_multiplatform) | |||
1847 | bl .__save_cpu_setup | 1851 | bl .__save_cpu_setup |
1848 | sync | 1852 | sync |
1849 | 1853 | ||
1850 | /* Setup a valid physical PACA pointer in SPRG3 for early_setup | ||
1851 | * note that boot_cpuid can always be 0 nowadays since there is | ||
1852 | * nowhere it can be initialized differently before we reach this | ||
1853 | * code | ||
1854 | */ | ||
1855 | LOAD_REG_IMMEDIATE(r27, boot_cpuid) | ||
1856 | add r27,r27,r26 | ||
1857 | lwz r27,0(r27) | ||
1858 | |||
1859 | LOAD_REG_IMMEDIATE(r24, paca) /* Get base vaddr of paca array */ | ||
1860 | mulli r13,r27,PACA_SIZE /* Calculate vaddr of right paca */ | ||
1861 | add r13,r13,r24 /* for this processor. */ | ||
1862 | add r13,r13,r26 /* convert to physical addr */ | ||
1863 | mtspr SPRN_SPRG3,r13 | ||
1864 | |||
1865 | /* Do very early kernel initializations, including initial hash table, | 1854 | /* Do very early kernel initializations, including initial hash table, |
1866 | * stab and slb setup before we turn on relocation. */ | 1855 | * stab and slb setup before we turn on relocation. */ |
1867 | 1856 | ||
@@ -1930,6 +1919,17 @@ _STATIC(start_here_common) | |||
1930 | /* Not reached */ | 1919 | /* Not reached */ |
1931 | BUG_OPCODE | 1920 | BUG_OPCODE |
1932 | 1921 | ||
1922 | /* Put the paca pointer into r13 and SPRG3 */ | ||
1923 | _GLOBAL(setup_boot_paca) | ||
1924 | LOAD_REG_IMMEDIATE(r3, boot_cpuid) | ||
1925 | lwz r3,0(r3) | ||
1926 | LOAD_REG_IMMEDIATE(r4, paca) /* Get base vaddr of paca array */ | ||
1927 | mulli r3,r3,PACA_SIZE /* Calculate vaddr of right paca */ | ||
1928 | add r13,r3,r4 /* for this processor. */ | ||
1929 | mtspr SPRN_SPRG3,r13 | ||
1930 | |||
1931 | blr | ||
1932 | |||
1933 | /* | 1933 | /* |
1934 | * We put a few things here that have to be page-aligned. | 1934 | * We put a few things here that have to be page-aligned. |
1935 | * This stuff goes at the beginning of the bss, which is page-aligned. | 1935 | * This stuff goes at the beginning of the bss, which is page-aligned. |