diff options
Diffstat (limited to 'arch/cris/arch-v10/boot/compressed/head.S')
-rw-r--r-- | arch/cris/arch-v10/boot/compressed/head.S | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/arch/cris/arch-v10/boot/compressed/head.S b/arch/cris/arch-v10/boot/compressed/head.S index 610bdb237553..981fbae84959 100644 --- a/arch/cris/arch-v10/boot/compressed/head.S +++ b/arch/cris/arch-v10/boot/compressed/head.S | |||
@@ -15,77 +15,77 @@ | |||
15 | #define COMMAND_LINE_MAGIC 0x87109563 | 15 | #define COMMAND_LINE_MAGIC 0x87109563 |
16 | 16 | ||
17 | ;; Exported symbols | 17 | ;; Exported symbols |
18 | |||
19 | .globl _input_data | ||
20 | 18 | ||
21 | 19 | .globl input_data | |
20 | |||
21 | |||
22 | .text | 22 | .text |
23 | 23 | ||
24 | nop | 24 | nop |
25 | di | 25 | di |
26 | 26 | ||
27 | ;; We need to initialze DRAM registers before we start using the DRAM | 27 | ;; We need to initialze DRAM registers before we start using the DRAM |
28 | 28 | ||
29 | cmp.d RAM_INIT_MAGIC, r8 ; Already initialized? | 29 | cmp.d RAM_INIT_MAGIC, $r8 ; Already initialized? |
30 | beq dram_init_finished | 30 | beq dram_init_finished |
31 | nop | 31 | nop |
32 | 32 | ||
33 | #include "../../lib/dram_init.S" | 33 | #include "../../lib/dram_init.S" |
34 | 34 | ||
35 | dram_init_finished: | 35 | dram_init_finished: |
36 | 36 | ||
37 | ;; Initiate the PA and PB ports | 37 | ;; Initiate the PA and PB ports |
38 | 38 | ||
39 | move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, r0 | 39 | move.b CONFIG_ETRAX_DEF_R_PORT_PA_DATA, $r0 |
40 | move.b r0, [R_PORT_PA_DATA] | 40 | move.b $r0, [R_PORT_PA_DATA] |
41 | 41 | ||
42 | move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, r0 | 42 | move.b CONFIG_ETRAX_DEF_R_PORT_PA_DIR, $r0 |
43 | move.b r0, [R_PORT_PA_DIR] | 43 | move.b $r0, [R_PORT_PA_DIR] |
44 | 44 | ||
45 | move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, r0 | 45 | move.b CONFIG_ETRAX_DEF_R_PORT_PB_DATA, $r0 |
46 | move.b r0, [R_PORT_PB_DATA] | 46 | move.b $r0, [R_PORT_PB_DATA] |
47 | 47 | ||
48 | move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, r0 | 48 | move.b CONFIG_ETRAX_DEF_R_PORT_PB_DIR, $r0 |
49 | move.b r0, [R_PORT_PB_DIR] | 49 | move.b $r0, [R_PORT_PB_DIR] |
50 | 50 | ||
51 | ;; Setup the stack to a suitably high address. | 51 | ;; Setup the stack to a suitably high address. |
52 | ;; We assume 8 MB is the minimum DRAM in an eLinux | 52 | ;; We assume 8 MB is the minimum DRAM in an eLinux |
53 | ;; product and put the sp at the top for now. | 53 | ;; product and put the sp at the top for now. |
54 | 54 | ||
55 | move.d 0x40800000, sp | 55 | move.d 0x40800000, $sp |
56 | 56 | ||
57 | ;; Figure out where the compressed piggyback image is | 57 | ;; Figure out where the compressed piggyback image is |
58 | ;; in the flash (since we wont try to copy it to DRAM | 58 | ;; in the flash (since we wont try to copy it to DRAM |
59 | ;; before unpacking). It is at _edata, but in flash. | 59 | ;; before unpacking). It is at _edata, but in flash. |
60 | ;; Use (_edata - basse) as offset to the current PC. | 60 | ;; Use (_edata - basse) as offset to the current PC. |
61 | 61 | ||
62 | basse: move.d pc, r5 | 62 | basse: move.d $pc, $r5 |
63 | and.d 0x7fffffff, r5 ; strip any non-cache bit | 63 | and.d 0x7fffffff, $r5 ; strip any non-cache bit |
64 | subq 2, r5 ; compensate for the move.d pc instr | 64 | subq 2, $r5 ; compensate for the move.d $pc instr |
65 | move.d r5, r0 ; save for later - flash address of 'basse' | 65 | move.d $r5, $r0 ; save for later - flash address of 'basse' |
66 | add.d _edata, r5 | 66 | add.d _edata, $r5 |
67 | sub.d basse, r5 ; r5 = flash address of '_edata' | 67 | sub.d basse, $r5 ; $r5 = flash address of '_edata' |
68 | 68 | ||
69 | ;; Copy text+data to DRAM | 69 | ;; Copy text+data to DRAM |
70 | 70 | ||
71 | move.d basse, r1 ; destination | 71 | move.d basse, $r1 ; destination |
72 | move.d _edata, r2 ; end destination | 72 | move.d _edata, $r2 ; end destination |
73 | 1: move.w [r0+], r3 | 73 | 1: move.w [$r0+], $r3 |
74 | move.w r3, [r1+] | 74 | move.w $r3, [$r1+] |
75 | cmp.d r2, r1 | 75 | cmp.d $r2, $r1 |
76 | bcs 1b | 76 | bcs 1b |
77 | nop | 77 | nop |
78 | 78 | ||
79 | move.d r5, [_input_data] ; for the decompressor | 79 | move.d $r5, [input_data] ; for the decompressor |
80 | 80 | ||
81 | 81 | ||
82 | ;; Clear the decompressors BSS (between _edata and _end) | 82 | ;; Clear the decompressors BSS (between _edata and _end) |
83 | 83 | ||
84 | moveq 0, r0 | 84 | moveq 0, $r0 |
85 | move.d _edata, r1 | 85 | move.d _edata, $r1 |
86 | move.d _end, r2 | 86 | move.d _end, $r2 |
87 | 1: move.w r0, [r1+] | 87 | 1: move.w $r0, [$r1+] |
88 | cmp.d r2, r1 | 88 | cmp.d $r2, $r1 |
89 | bcs 1b | 89 | bcs 1b |
90 | nop | 90 | nop |
91 | 91 | ||
@@ -94,16 +94,16 @@ basse: move.d pc, r5 | |||
94 | move.d $r10, [$r12] | 94 | move.d $r10, [$r12] |
95 | move.d _cmd_line_addr, $r12 | 95 | move.d _cmd_line_addr, $r12 |
96 | move.d $r11, [$r12] | 96 | move.d $r11, [$r12] |
97 | |||
98 | ;; Do the decompression and save compressed size in _inptr | ||
99 | 97 | ||
100 | jsr _decompress_kernel | 98 | ;; Do the decompression and save compressed size in inptr |
101 | 99 | ||
102 | ;; Put start address of root partition in r9 so the kernel can use it | 100 | jsr decompress_kernel |
101 | |||
102 | ;; Put start address of root partition in $r9 so the kernel can use it | ||
103 | ;; when mounting from flash | 103 | ;; when mounting from flash |
104 | 104 | ||
105 | move.d [_input_data], r9 ; flash address of compressed kernel | 105 | move.d [input_data], $r9 ; flash address of compressed kernel |
106 | add.d [_inptr], r9 ; size of compressed kernel | 106 | add.d [inptr], $r9 ; size of compressed kernel |
107 | 107 | ||
108 | ;; Restore command line magic and address. | 108 | ;; Restore command line magic and address. |
109 | move.d _cmd_line_magic, $r10 | 109 | move.d _cmd_line_magic, $r10 |
@@ -112,12 +112,12 @@ basse: move.d pc, r5 | |||
112 | move.d [$r11], $r11 | 112 | move.d [$r11], $r11 |
113 | 113 | ||
114 | ;; Enter the decompressed kernel | 114 | ;; Enter the decompressed kernel |
115 | move.d RAM_INIT_MAGIC, r8 ; Tell kernel that DRAM is initialized | 115 | move.d RAM_INIT_MAGIC, $r8 ; Tell kernel that DRAM is initialized |
116 | jump 0x40004000 ; kernel is linked to this address | 116 | jump 0x40004000 ; kernel is linked to this address |
117 | 117 | ||
118 | .data | 118 | .data |
119 | 119 | ||
120 | _input_data: | 120 | input_data: |
121 | .dword 0 ; used by the decompressor | 121 | .dword 0 ; used by the decompressor |
122 | _cmd_line_magic: | 122 | _cmd_line_magic: |
123 | .dword 0 | 123 | .dword 0 |