Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274152
b: refs/heads/master
c: 6dece0e
h: refs/heads/master
v: v3
  • Loading branch information
Scott Wood authored and Benjamin Herrenschmidt committed Sep 19, 2011
1 parent a5c7b5d commit fc28fae
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 57 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c493685f1b209dd4ae41eb52c818cf12da20def
refs/heads/master: 6dece0eb69b2a28e18d104bc5d707f1cb673f5e0
7 changes: 3 additions & 4 deletions trunk/arch/powerpc/kernel/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ __start:
trap
#endif /* CONFIG_PPC_PMAC */

1: mr r31,r3 /* save parameters */
mr r30,r4
1: mr r31,r3 /* save device tree ptr */
li r24,0 /* cpu # */

/*
Expand Down Expand Up @@ -964,8 +963,8 @@ start_here:
* Do early platform-specific initialization,
* and set up the MMU.
*/
mr r3,r31
mr r4,r30
li r3,0
mr r4,r31
bl machine_init
bl __save_cpu_setup
bl MMU_init
Expand Down
15 changes: 3 additions & 12 deletions trunk/arch/powerpc/kernel/head_40x.S
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@
_ENTRY(_stext);
_ENTRY(_start);

/* Save parameters we are passed.
*/
mr r31,r3
mr r30,r4
mr r29,r5
mr r28,r6
mr r27,r7
mr r31,r3 /* save device tree ptr */

/* We have to turn on the MMU right away so we get cache modes
* set correctly.
Expand Down Expand Up @@ -849,11 +843,8 @@ start_here:
/*
* Decide what sort of machine this is and initialize the MMU.
*/
mr r3,r31
mr r4,r30
mr r5,r29
mr r6,r28
mr r7,r27
li r3,0
mr r4,r31
bl machine_init
bl MMU_init

Expand Down
16 changes: 3 additions & 13 deletions trunk/arch/powerpc/kernel/head_44x.S
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,7 @@ _ENTRY(_start);
* of abatron_pteptrs
*/
nop
/*
* Save parameters we are passed
*/
mr r31,r3
mr r30,r4
mr r29,r5
mr r28,r6
mr r27,r7
mr r31,r3 /* save device tree ptr */
li r24,0 /* CPU number */

bl init_cpu_state
Expand Down Expand Up @@ -120,11 +113,8 @@ _ENTRY(_start);
/*
* Decide what sort of machine this is and initialize the MMU.
*/
mr r3,r31
mr r4,r30
mr r5,r29
mr r6,r28
mr r7,r27
li r3,0
mr r4,r31
bl machine_init
bl MMU_init

Expand Down
13 changes: 3 additions & 10 deletions trunk/arch/powerpc/kernel/head_8xx.S
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ _ENTRY(_start);
*/
.globl __start
__start:
mr r31,r3 /* save parameters */
mr r30,r4
mr r29,r5
mr r28,r6
mr r27,r7
mr r31,r3 /* save device tree ptr */

/* We have to turn on the MMU right away so we get cache modes
* set correctly.
Expand Down Expand Up @@ -723,11 +719,8 @@ start_here:
/*
* Decide what sort of machine this is and initialize the MMU.
*/
mr r3,r31
mr r4,r30
mr r5,r29
mr r6,r28
mr r7,r27
li r3,0
mr r4,r31
bl machine_init
bl MMU_init

Expand Down
42 changes: 26 additions & 16 deletions trunk/arch/powerpc/kernel/head_fsl_booke.S
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,30 @@ _ENTRY(_start);
* of abatron_pteptrs
*/
nop
/*
* Save parameters we are passed
*/
mr r31,r3
mr r30,r4
mr r29,r5
mr r28,r6
mr r27,r7
li r25,0 /* phys kernel start (low) */
li r24,0 /* CPU number */
li r23,0 /* phys kernel start (high) */

/* Translate device tree address to physical, save in r30/r31 */
mfmsr r16
mfspr r17,SPRN_PID
rlwinm r17,r17,16,0x3fff0000 /* turn PID into MAS6[SPID] */
rlwimi r17,r16,28,0x00000001 /* turn MSR[DS] into MAS6[SAS] */
mtspr SPRN_MAS6,r17

tlbsx 0,r3 /* must succeed */

mfspr r16,SPRN_MAS1
mfspr r20,SPRN_MAS3
rlwinm r17,r16,25,0x1f /* r17 = log2(page size) */
li r18,1024
slw r18,r18,r17 /* r18 = page size */
addi r18,r18,-1
and r19,r3,r18 /* r19 = page offset */
andc r31,r20,r18 /* r3 = page base */
or r31,r31,r19 /* r3 = devtree phys addr */
mfspr r30,SPRN_MAS7

li r25,0 /* phys kernel start (low) */
li r24,0 /* CPU number */
li r23,0 /* phys kernel start (high) */

/* We try to not make any assumptions about how the boot loader
* setup or used the TLBs. We invalidate all mappings from the
Expand Down Expand Up @@ -198,11 +211,8 @@ _ENTRY(__early_start)
/*
* Decide what sort of machine this is and initialize the MMU.
*/
mr r3,r31
mr r4,r30
mr r5,r29
mr r6,r28
mr r7,r27
mr r3,r30
mr r4,r31
bl machine_init
bl MMU_init

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ notrace unsigned long __init early_init(unsigned long dt_ptr)
* This is called very early on the boot process, after a minimal
* MMU environment has been set up but before MMU_init is called.
*/
notrace void __init machine_init(unsigned long dt_ptr)
notrace void __init machine_init(u64 dt_ptr)
{
lockdep_init();

Expand Down

0 comments on commit fc28fae

Please sign in to comment.