diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-07-31 03:38:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 18:39:39 -0400 |
commit | 99eb8a550dbccc0e1f6c7e866fe421810e0585f6 (patch) | |
tree | 130c6e3338a0655ba74355eba83afab9261e1ed0 /arch/arm26/boot | |
parent | 0d0ed42e5ca2e22465c591341839c18025748fe8 (diff) |
Remove the arm26 port
The arm26 port has been in a state where it was far from even compiling
for quite some time.
Ian Molton agreed with the removal.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm26/boot')
-rw-r--r-- | arch/arm26/boot/Makefile | 83 | ||||
-rw-r--r-- | arch/arm26/boot/compressed/Makefile | 50 | ||||
-rw-r--r-- | arch/arm26/boot/compressed/head.S | 516 | ||||
-rw-r--r-- | arch/arm26/boot/compressed/ll_char_wr.S | 162 | ||||
-rw-r--r-- | arch/arm26/boot/compressed/misc.c | 316 | ||||
-rw-r--r-- | arch/arm26/boot/compressed/uncompress.h | 110 | ||||
-rw-r--r-- | arch/arm26/boot/compressed/vmlinux.lds.in | 60 | ||||
-rw-r--r-- | arch/arm26/boot/install.sh | 62 |
8 files changed, 0 insertions, 1359 deletions
diff --git a/arch/arm26/boot/Makefile b/arch/arm26/boot/Makefile deleted file mode 100644 index 68acb7b0d47f..000000000000 --- a/arch/arm26/boot/Makefile +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | # | ||
2 | # arch/arm26/boot/Makefile | ||
3 | # | ||
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
7 | # This file is subject to the terms and conditions of the GNU General Public | ||
8 | # License. See the file "COPYING" in the main directory of this archive | ||
9 | # for more details. | ||
10 | # | ||
11 | # Copyright (C) 1995-2002 Russell King | ||
12 | # | ||
13 | |||
14 | # Note: the following conditions must always be true: | ||
15 | # ZRELADDR == virt_to_phys(TEXTADDR) | ||
16 | # PARAMS_PHYS must be with 4MB of ZRELADDR | ||
17 | # INITRD_PHYS must be in RAM | ||
18 | |||
19 | zreladdr-y := 0x02080000 | ||
20 | params_phys-y := 0x0207c000 | ||
21 | initrd_phys-y := 0x02180000 | ||
22 | |||
23 | ZRELADDR := 0x02080000 | ||
24 | ZTEXTADDR := 0x0207c000 | ||
25 | PARAMS_PHYS := $(params_phys-y) | ||
26 | INITRD_PHYS := 0x02180000 | ||
27 | |||
28 | # We now have a PIC decompressor implementation. Decompressors running | ||
29 | # from RAM should not define ZTEXTADDR. Decompressors running directly | ||
30 | # from ROM or Flash must define ZTEXTADDR (preferably via the config) | ||
31 | # FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK | ||
32 | ifeq ($(CONFIG_ZBOOT_ROM),y) | ||
33 | ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT) | ||
34 | ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS) | ||
35 | else | ||
36 | ZTEXTADDR := 0 | ||
37 | ZBSSADDR := ALIGN(4) | ||
38 | endif | ||
39 | |||
40 | export ZTEXTADDR ZBSSADDR ZRELADDR INITRD_PHYS PARAMS_PHYS | ||
41 | |||
42 | targets := Image zImage bootpImage xipImage | ||
43 | |||
44 | $(obj)/Image: vmlinux FORCE | ||
45 | $(call if_changed,objcopy) | ||
46 | @echo ' Kernel: $@ is ready' | ||
47 | |||
48 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE | ||
49 | $(call if_changed,objcopy) | ||
50 | @echo ' Kernel: $@ is ready' | ||
51 | |||
52 | $(obj)/compressed/vmlinux: vmlinux FORCE | ||
53 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ | ||
54 | |||
55 | ifeq ($(CONFIG_XIP_KERNEL),y) | ||
56 | $(obj)/xipImage: vmlinux FORCE | ||
57 | # $(OBJCOPY) -S -O binary -R .data -R .comment vmlinux vmlinux-text.bin | ||
58 | # FIXME - where has .pci_fixup crept in from? | ||
59 | $(OBJCOPY) -S -O binary -R .data -R .pci_fixup -R .comment vmlinux vmlinux-text.bin | ||
60 | $(OBJCOPY) -S -O binary -R .init -R .text -R __ex_table -R .pci_fixup -R __ksymtab -R __ksymtab_gpl -R __kcrctab -R __kcrctab_gpl -R __param -R .comment vmlinux vmlinux-data.bin | ||
61 | cat vmlinux-text.bin vmlinux-data.bin > $@ | ||
62 | $(RM) -f vmlinux-text.bin vmlinux-data.bin | ||
63 | @echo ' Kernel: $@ is ready' | ||
64 | endif | ||
65 | |||
66 | PHONY += initrd | ||
67 | initrd: | ||
68 | @test "$(INITRD_PHYS)" != "" || \ | ||
69 | (echo This machine does not support INITRD; exit -1) | ||
70 | @test "$(INITRD)" != "" || \ | ||
71 | (echo You must specify INITRD; exit -1) | ||
72 | |||
73 | install: $(obj)/Image | ||
74 | $(CONFIG_SHELL) $(obj)/install.sh \ | ||
75 | $(KERNELRELEASE) \ | ||
76 | $(obj)/Image System.map "$(INSTALL_PATH)" | ||
77 | |||
78 | zinstall: $(obj)/zImage | ||
79 | $(CONFIG_SHELL) $(obj)/install.sh \ | ||
80 | $(KERNELRELEASE) \ | ||
81 | $(obj)/zImage System.map "$(INSTALL_PATH)" | ||
82 | |||
83 | subdir- := compressed | ||
diff --git a/arch/arm26/boot/compressed/Makefile b/arch/arm26/boot/compressed/Makefile deleted file mode 100644 index b1d9ddebbe74..000000000000 --- a/arch/arm26/boot/compressed/Makefile +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | # | ||
2 | # linux/arch/arm26/boot/compressed/Makefile | ||
3 | # | ||
4 | # create a compressed vmlinuz image from the original vmlinux | ||
5 | # | ||
6 | # Note! ZTEXTADDR, ZBSSADDR and ZRELADDR are now exported | ||
7 | # from arch/arm26/boot/Makefile | ||
8 | # | ||
9 | |||
10 | HEAD = head.o | ||
11 | OBJS = misc.o | ||
12 | FONTC = drivers/video/console/font_acorn_8x8.c | ||
13 | |||
14 | OBJS += ll_char_wr.o font.o | ||
15 | CFLAGS_misc.o := -DPARAMS_PHYS=$(PARAMS_PHYS) | ||
16 | |||
17 | targets := vmlinux vmlinux.lds piggy piggy.gz piggy.o font.o head.o $(OBJS) | ||
18 | |||
19 | SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/LOAD_ADDR/$(ZRELADDR)/;s/BSS_START/$(ZBSSADDR)/ | ||
20 | |||
21 | EXTRA_CFLAGS := $(CFLAGS_BOOT) -fpic | ||
22 | EXTRA_AFLAGS := -traditional | ||
23 | |||
24 | LDFLAGS_vmlinux := -p -X \ | ||
25 | $(shell $(CC) $(CFLAGS)) -T | ||
26 | |||
27 | $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \ | ||
28 | $(addprefix $(obj)/, $(OBJS)) FORCE | ||
29 | $(call if_changed,ld) | ||
30 | @: | ||
31 | |||
32 | |||
33 | $(obj)/piggy: vmlinux FORCE | ||
34 | $(call if_changed,objcopy) | ||
35 | |||
36 | $(obj)/piggy.gz: $(obj)/piggy FORCE | ||
37 | $(call if_changed,gzip) | ||
38 | |||
39 | LDFLAGS_piggy.o := -r -b binary | ||
40 | $(obj)/piggy.o: $(obj)/piggy.gz FORCE | ||
41 | $(call if_changed,ld) | ||
42 | |||
43 | $(obj)/font.o: $(FONTC) | ||
44 | $(CC) $(CFLAGS) -Dstatic= -c $(FONTC) -o $(obj)/font.o | ||
45 | |||
46 | $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in Makefile arch/arm26/boot/Makefile .config | ||
47 | @sed "$(SEDFLAGS)" < $< > $@ | ||
48 | |||
49 | $(obj)/misc.o: $(obj)/misc.c $(obj)/uncompress.h lib/inflate.c | ||
50 | |||
diff --git a/arch/arm26/boot/compressed/head.S b/arch/arm26/boot/compressed/head.S deleted file mode 100644 index 2a2cda36d83b..000000000000 --- a/arch/arm26/boot/compressed/head.S +++ /dev/null | |||
@@ -1,516 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm26/boot/compressed/head.S | ||
3 | * | ||
4 | * Copyright (C) 1996-2002 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #include <linux/linkage.h> | ||
11 | |||
12 | /* | ||
13 | * Debugging stuff | ||
14 | * | ||
15 | * Note that these macros must not contain any code which is not | ||
16 | * 100% relocatable. Any attempt to do so will result in a crash. | ||
17 | * Please select one of the following when turning on debugging. | ||
18 | */ | ||
19 | |||
20 | .macro kputc,val | ||
21 | mov r0, \val | ||
22 | bl putc | ||
23 | .endm | ||
24 | |||
25 | .macro kphex,val,len | ||
26 | mov r0, \val | ||
27 | mov r1, #\len | ||
28 | bl phex | ||
29 | .endm | ||
30 | |||
31 | .macro debug_reloc_start | ||
32 | .endm | ||
33 | |||
34 | .macro debug_reloc_end | ||
35 | .endm | ||
36 | |||
37 | .section ".start", #alloc, #execinstr | ||
38 | /* | ||
39 | * sort out different calling conventions | ||
40 | */ | ||
41 | .align | ||
42 | start: | ||
43 | .type start,#function | ||
44 | .rept 8 | ||
45 | mov r0, r0 | ||
46 | .endr | ||
47 | |||
48 | b 1f | ||
49 | .word 0x016f2818 @ Magic numbers to help the loader | ||
50 | .word start @ absolute load/run zImage address | ||
51 | .word _edata @ zImage end address | ||
52 | 1: mov r7, r1 @ save architecture ID | ||
53 | mov r8, #0 @ save r0 | ||
54 | teqp pc, #0x0c000003 @ turn off interrupts | ||
55 | |||
56 | .text | ||
57 | adr r0, LC0 | ||
58 | ldmia r0, {r1, r2, r3, r4, r5, r6, ip, sp} | ||
59 | subs r0, r0, r1 @ calculate the delta offset | ||
60 | |||
61 | teq r0, #0 @ if delta is zero, we're | ||
62 | beq not_relocated @ running at the address we | ||
63 | @ were linked at. | ||
64 | |||
65 | add r2, r2, r0 @ different address, so we | ||
66 | add r3, r3, r0 @ need to fix up various | ||
67 | add r5, r5, r0 @ pointers. | ||
68 | add r6, r6, r0 | ||
69 | add ip, ip, r0 | ||
70 | add sp, sp, r0 | ||
71 | |||
72 | 1: ldr r1, [r6, #0] @ relocate entries in the GOT | ||
73 | add r1, r1, r0 @ table. This fixes up the | ||
74 | str r1, [r6], #4 @ C references. | ||
75 | cmp r6, ip | ||
76 | blo 1b | ||
77 | |||
78 | not_relocated: mov r0, #0 | ||
79 | 1: str r0, [r2], #4 @ clear bss | ||
80 | str r0, [r2], #4 | ||
81 | str r0, [r2], #4 | ||
82 | str r0, [r2], #4 | ||
83 | cmp r2, r3 | ||
84 | blo 1b | ||
85 | |||
86 | bl cache_on | ||
87 | |||
88 | mov r1, sp @ malloc space above stack | ||
89 | add r2, sp, #0x10000 @ 64k max | ||
90 | |||
91 | /* | ||
92 | * Check to see if we will overwrite ourselves. | ||
93 | * r4 = final kernel address | ||
94 | * r5 = start of this image | ||
95 | * r2 = end of malloc space (and therefore this image) | ||
96 | * We basically want: | ||
97 | * r4 >= r2 -> OK | ||
98 | * r4 + image length <= r5 -> OK | ||
99 | */ | ||
100 | cmp r4, r2 | ||
101 | bhs wont_overwrite | ||
102 | add r0, r4, #4096*1024 @ 4MB largest kernel size | ||
103 | cmp r0, r5 | ||
104 | bls wont_overwrite | ||
105 | |||
106 | mov r5, r2 @ decompress after malloc space | ||
107 | mov r0, r5 | ||
108 | mov r3, r7 | ||
109 | bl decompress_kernel | ||
110 | |||
111 | add r0, r0, #127 | ||
112 | bic r0, r0, #127 @ align the kernel length | ||
113 | /* | ||
114 | * r0 = decompressed kernel length | ||
115 | * r1-r3 = unused | ||
116 | * r4 = kernel execution address | ||
117 | * r5 = decompressed kernel start | ||
118 | * r6 = processor ID | ||
119 | * r7 = architecture ID | ||
120 | * r8-r14 = unused | ||
121 | */ | ||
122 | add r1, r5, r0 @ end of decompressed kernel | ||
123 | adr r2, reloc_start | ||
124 | ldr r3, LC1 | ||
125 | add r3, r2, r3 | ||
126 | 1: ldmia r2!, {r8 - r13} @ copy relocation code | ||
127 | stmia r1!, {r8 - r13} | ||
128 | ldmia r2!, {r8 - r13} | ||
129 | stmia r1!, {r8 - r13} | ||
130 | cmp r2, r3 | ||
131 | blo 1b | ||
132 | |||
133 | bl cache_clean_flush | ||
134 | add pc, r5, r0 @ call relocation code | ||
135 | |||
136 | /* | ||
137 | * We're not in danger of overwriting ourselves. Do this the simple way. | ||
138 | * | ||
139 | * r4 = kernel execution address | ||
140 | * r7 = architecture ID | ||
141 | */ | ||
142 | wont_overwrite: mov r0, r4 | ||
143 | mov r3, r7 | ||
144 | bl decompress_kernel | ||
145 | b call_kernel | ||
146 | |||
147 | .type LC0, #object | ||
148 | LC0: .word LC0 @ r1 | ||
149 | .word __bss_start @ r2 | ||
150 | .word _end @ r3 | ||
151 | .word _load_addr @ r4 | ||
152 | .word _start @ r5 | ||
153 | .word _got_start @ r6 | ||
154 | .word _got_end @ ip | ||
155 | .word user_stack+4096 @ sp | ||
156 | LC1: .word reloc_end - reloc_start | ||
157 | .size LC0, . - LC0 | ||
158 | |||
159 | /* | ||
160 | * Turn on the cache. We need to setup some page tables so that we | ||
161 | * can have both the I and D caches on. | ||
162 | * | ||
163 | * We place the page tables 16k down from the kernel execution address, | ||
164 | * and we hope that nothing else is using it. If we're using it, we | ||
165 | * will go pop! | ||
166 | * | ||
167 | * On entry, | ||
168 | * r4 = kernel execution address | ||
169 | * r6 = processor ID | ||
170 | * r7 = architecture number | ||
171 | * r8 = run-time address of "start" | ||
172 | * On exit, | ||
173 | * r1, r2, r3, r8, r9, r12 corrupted | ||
174 | * This routine must preserve: | ||
175 | * r4, r5, r6, r7 | ||
176 | */ | ||
177 | .align 5 | ||
178 | cache_on: mov r3, #8 @ cache_on function | ||
179 | b call_cache_fn | ||
180 | |||
181 | __setup_mmu: sub r3, r4, #16384 @ Page directory size | ||
182 | bic r3, r3, #0xff @ Align the pointer | ||
183 | bic r3, r3, #0x3f00 | ||
184 | /* | ||
185 | * Initialise the page tables, turning on the cacheable and bufferable | ||
186 | * bits for the RAM area only. | ||
187 | */ | ||
188 | mov r0, r3 | ||
189 | mov r8, r0, lsr #18 | ||
190 | mov r8, r8, lsl #18 @ start of RAM | ||
191 | add r9, r8, #0x10000000 @ a reasonable RAM size | ||
192 | mov r1, #0x12 | ||
193 | orr r1, r1, #3 << 10 | ||
194 | add r2, r3, #16384 | ||
195 | 1: cmp r1, r8 @ if virt > start of RAM | ||
196 | orrhs r1, r1, #0x0c @ set cacheable, bufferable | ||
197 | cmp r1, r9 @ if virt > end of RAM | ||
198 | bichs r1, r1, #0x0c @ clear cacheable, bufferable | ||
199 | str r1, [r0], #4 @ 1:1 mapping | ||
200 | add r1, r1, #1048576 | ||
201 | teq r0, r2 | ||
202 | bne 1b | ||
203 | /* | ||
204 | * If ever we are running from Flash, then we surely want the cache | ||
205 | * to be enabled also for our execution instance... We map 2MB of it | ||
206 | * so there is no map overlap problem for up to 1 MB compressed kernel. | ||
207 | * If the execution is in RAM then we would only be duplicating the above. | ||
208 | */ | ||
209 | mov r1, #0x1e | ||
210 | orr r1, r1, #3 << 10 | ||
211 | mov r2, pc, lsr #20 | ||
212 | orr r1, r1, r2, lsl #20 | ||
213 | add r0, r3, r2, lsl #2 | ||
214 | str r1, [r0], #4 | ||
215 | add r1, r1, #1048576 | ||
216 | str r1, [r0] | ||
217 | mov pc, lr | ||
218 | |||
219 | __armv4_cache_on: | ||
220 | mov r12, lr | ||
221 | bl __setup_mmu | ||
222 | mov r0, #0 | ||
223 | mcr p15, 0, r0, c7, c10, 4 @ drain write buffer | ||
224 | mcr p15, 0, r0, c8, c7, 0 @ flush I,D TLBs | ||
225 | mrc p15, 0, r0, c1, c0, 0 @ read control reg | ||
226 | orr r0, r0, #0x1000 @ I-cache enable | ||
227 | orr r0, r0, #0x0030 | ||
228 | b __common_cache_on | ||
229 | |||
230 | __arm6_cache_on: | ||
231 | mov r12, lr | ||
232 | bl __setup_mmu | ||
233 | mov r0, #0 | ||
234 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | ||
235 | mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 | ||
236 | mov r0, #0x30 | ||
237 | __common_cache_on: | ||
238 | #ifndef DEBUG | ||
239 | orr r0, r0, #0x000d @ Write buffer, mmu | ||
240 | #endif | ||
241 | mov r1, #-1 | ||
242 | mcr p15, 0, r3, c2, c0, 0 @ load page table pointer | ||
243 | mcr p15, 0, r1, c3, c0, 0 @ load domain access control | ||
244 | mcr p15, 0, r0, c1, c0, 0 @ load control register | ||
245 | mov pc, r12 | ||
246 | |||
247 | /* | ||
248 | * All code following this line is relocatable. It is relocated by | ||
249 | * the above code to the end of the decompressed kernel image and | ||
250 | * executed there. During this time, we have no stacks. | ||
251 | * | ||
252 | * r0 = decompressed kernel length | ||
253 | * r1-r3 = unused | ||
254 | * r4 = kernel execution address | ||
255 | * r5 = decompressed kernel start | ||
256 | * r6 = processor ID | ||
257 | * r7 = architecture ID | ||
258 | * r8-r14 = unused | ||
259 | */ | ||
260 | .align 5 | ||
261 | reloc_start: add r8, r5, r0 | ||
262 | debug_reloc_start | ||
263 | mov r1, r4 | ||
264 | 1: | ||
265 | .rept 4 | ||
266 | ldmia r5!, {r0, r2, r3, r9 - r13} @ relocate kernel | ||
267 | stmia r1!, {r0, r2, r3, r9 - r13} | ||
268 | .endr | ||
269 | |||
270 | cmp r5, r8 | ||
271 | blo 1b | ||
272 | debug_reloc_end | ||
273 | |||
274 | call_kernel: bl cache_clean_flush | ||
275 | bl cache_off | ||
276 | mov r0, #0 | ||
277 | mov r1, r7 @ restore architecture number | ||
278 | mov pc, r4 @ call kernel | ||
279 | |||
280 | /* | ||
281 | * Here follow the relocatable cache support functions for the | ||
282 | * various processors. This is a generic hook for locating an | ||
283 | * entry and jumping to an instruction at the specified offset | ||
284 | * from the start of the block. Please note this is all position | ||
285 | * independent code. | ||
286 | * | ||
287 | * r1 = corrupted | ||
288 | * r2 = corrupted | ||
289 | * r3 = block offset | ||
290 | * r6 = corrupted | ||
291 | * r12 = corrupted | ||
292 | */ | ||
293 | |||
294 | call_cache_fn: adr r12, proc_types | ||
295 | mrc p15, 0, r6, c0, c0 @ get processor ID | ||
296 | 1: ldr r1, [r12, #0] @ get value | ||
297 | ldr r2, [r12, #4] @ get mask | ||
298 | eor r1, r1, r6 @ (real ^ match) | ||
299 | tst r1, r2 @ & mask | ||
300 | addeq pc, r12, r3 @ call cache function | ||
301 | add r12, r12, #4*5 | ||
302 | b 1b | ||
303 | |||
304 | /* | ||
305 | * Table for cache operations. This is basically: | ||
306 | * - CPU ID match | ||
307 | * - CPU ID mask | ||
308 | * - 'cache on' method instruction | ||
309 | * - 'cache off' method instruction | ||
310 | * - 'cache flush' method instruction | ||
311 | * | ||
312 | * We match an entry using: ((real_id ^ match) & mask) == 0 | ||
313 | * | ||
314 | * Writethrough caches generally only need 'on' and 'off' | ||
315 | * methods. Writeback caches _must_ have the flush method | ||
316 | * defined. | ||
317 | */ | ||
318 | .type proc_types,#object | ||
319 | proc_types: | ||
320 | .word 0x41560600 @ ARM6/610 | ||
321 | .word 0xffffffe0 | ||
322 | b __arm6_cache_off @ works, but slow | ||
323 | b __arm6_cache_off | ||
324 | mov pc, lr | ||
325 | @ b __arm6_cache_on @ untested | ||
326 | @ b __arm6_cache_off | ||
327 | @ b __armv3_cache_flush | ||
328 | |||
329 | .word 0x41007000 @ ARM7/710 | ||
330 | .word 0xfff8fe00 | ||
331 | b __arm7_cache_off | ||
332 | b __arm7_cache_off | ||
333 | mov pc, lr | ||
334 | |||
335 | .word 0x41807200 @ ARM720T (writethrough) | ||
336 | .word 0xffffff00 | ||
337 | b __armv4_cache_on | ||
338 | b __armv4_cache_off | ||
339 | mov pc, lr | ||
340 | |||
341 | .word 0x41129200 @ ARM920T | ||
342 | .word 0xff00fff0 | ||
343 | b __armv4_cache_on | ||
344 | b __armv4_cache_off | ||
345 | b __armv4_cache_flush | ||
346 | |||
347 | .word 0x4401a100 @ sa110 / sa1100 | ||
348 | .word 0xffffffe0 | ||
349 | b __armv4_cache_on | ||
350 | b __armv4_cache_off | ||
351 | b __armv4_cache_flush | ||
352 | |||
353 | .word 0x6901b110 @ sa1110 | ||
354 | .word 0xfffffff0 | ||
355 | b __armv4_cache_on | ||
356 | b __armv4_cache_off | ||
357 | b __armv4_cache_flush | ||
358 | |||
359 | .word 0x69050000 @ xscale | ||
360 | .word 0xffff0000 | ||
361 | b __armv4_cache_on | ||
362 | b __armv4_cache_off | ||
363 | b __armv4_cache_flush | ||
364 | |||
365 | .word 0 @ unrecognised type | ||
366 | .word 0 | ||
367 | mov pc, lr | ||
368 | mov pc, lr | ||
369 | mov pc, lr | ||
370 | |||
371 | .size proc_types, . - proc_types | ||
372 | |||
373 | /* | ||
374 | * Turn off the Cache and MMU. ARMv3 does not support | ||
375 | * reading the control register, but ARMv4 does. | ||
376 | * | ||
377 | * On entry, r6 = processor ID | ||
378 | * On exit, r0, r1, r2, r3, r12 corrupted | ||
379 | * This routine must preserve: r4, r6, r7 | ||
380 | */ | ||
381 | .align 5 | ||
382 | cache_off: mov r3, #12 @ cache_off function | ||
383 | b call_cache_fn | ||
384 | |||
385 | __armv4_cache_off: | ||
386 | mrc p15, 0, r0, c1, c0 | ||
387 | bic r0, r0, #0x000d | ||
388 | mcr p15, 0, r0, c1, c0 @ turn MMU and cache off | ||
389 | mov r0, #0 | ||
390 | mcr p15, 0, r0, c7, c7 @ invalidate whole cache v4 | ||
391 | mcr p15, 0, r0, c8, c7 @ invalidate whole TLB v4 | ||
392 | mov pc, lr | ||
393 | |||
394 | __arm6_cache_off: | ||
395 | mov r0, #0x00000030 @ ARM6 control reg. | ||
396 | b __armv3_cache_off | ||
397 | |||
398 | __arm7_cache_off: | ||
399 | mov r0, #0x00000070 @ ARM7 control reg. | ||
400 | b __armv3_cache_off | ||
401 | |||
402 | __armv3_cache_off: | ||
403 | mcr p15, 0, r0, c1, c0, 0 @ turn MMU and cache off | ||
404 | mov r0, #0 | ||
405 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | ||
406 | mcr p15, 0, r0, c5, c0, 0 @ invalidate whole TLB v3 | ||
407 | mov pc, lr | ||
408 | |||
409 | /* | ||
410 | * Clean and flush the cache to maintain consistency. | ||
411 | * | ||
412 | * On entry, | ||
413 | * r6 = processor ID | ||
414 | * On exit, | ||
415 | * r1, r2, r3, r12 corrupted | ||
416 | * This routine must preserve: | ||
417 | * r0, r4, r5, r6, r7 | ||
418 | */ | ||
419 | .align 5 | ||
420 | cache_clean_flush: | ||
421 | mov r3, #16 | ||
422 | b call_cache_fn | ||
423 | |||
424 | __armv4_cache_flush: | ||
425 | bic r1, pc, #31 | ||
426 | add r2, r1, #65536 @ 2x the largest dcache size | ||
427 | 1: ldr r12, [r1], #32 @ s/w flush D cache | ||
428 | teq r1, r2 | ||
429 | bne 1b | ||
430 | |||
431 | mcr p15, 0, r1, c7, c7, 0 @ flush I cache | ||
432 | mcr p15, 0, r1, c7, c10, 4 @ drain WB | ||
433 | mov pc, lr | ||
434 | |||
435 | __armv3_cache_flush: | ||
436 | mov r1, #0 | ||
437 | mcr p15, 0, r0, c7, c0, 0 @ invalidate whole cache v3 | ||
438 | mov pc, lr | ||
439 | |||
440 | /* | ||
441 | * Various debugging routines for printing hex characters and | ||
442 | * memory, which again must be relocatable. | ||
443 | */ | ||
444 | #ifdef DEBUG | ||
445 | .type phexbuf,#object | ||
446 | phexbuf: .space 12 | ||
447 | .size phexbuf, . - phexbuf | ||
448 | |||
449 | phex: adr r3, phexbuf | ||
450 | mov r2, #0 | ||
451 | strb r2, [r3, r1] | ||
452 | 1: subs r1, r1, #1 | ||
453 | movmi r0, r3 | ||
454 | bmi puts | ||
455 | and r2, r0, #15 | ||
456 | mov r0, r0, lsr #4 | ||
457 | cmp r2, #10 | ||
458 | addge r2, r2, #7 | ||
459 | add r2, r2, #'0' | ||
460 | strb r2, [r3, r1] | ||
461 | b 1b | ||
462 | |||
463 | puts: loadsp r3 | ||
464 | 1: ldrb r2, [r0], #1 | ||
465 | teq r2, #0 | ||
466 | moveq pc, lr | ||
467 | 2: writeb r2 | ||
468 | mov r1, #0x00020000 | ||
469 | 3: subs r1, r1, #1 | ||
470 | bne 3b | ||
471 | teq r2, #'\n' | ||
472 | moveq r2, #'\r' | ||
473 | beq 2b | ||
474 | teq r0, #0 | ||
475 | bne 1b | ||
476 | mov pc, lr | ||
477 | putc: | ||
478 | mov r2, r0 | ||
479 | mov r0, #0 | ||
480 | loadsp r3 | ||
481 | b 2b | ||
482 | |||
483 | memdump: mov r12, r0 | ||
484 | mov r10, lr | ||
485 | mov r11, #0 | ||
486 | 2: mov r0, r11, lsl #2 | ||
487 | add r0, r0, r12 | ||
488 | mov r1, #8 | ||
489 | bl phex | ||
490 | mov r0, #':' | ||
491 | bl putc | ||
492 | 1: mov r0, #' ' | ||
493 | bl putc | ||
494 | ldr r0, [r12, r11, lsl #2] | ||
495 | mov r1, #8 | ||
496 | bl phex | ||
497 | and r0, r11, #7 | ||
498 | teq r0, #3 | ||
499 | moveq r0, #' ' | ||
500 | bleq putc | ||
501 | and r0, r11, #7 | ||
502 | add r11, r11, #1 | ||
503 | teq r0, #7 | ||
504 | bne 1b | ||
505 | mov r0, #'\n' | ||
506 | bl putc | ||
507 | cmp r11, #64 | ||
508 | blt 2b | ||
509 | mov pc, r10 | ||
510 | #endif | ||
511 | |||
512 | reloc_end: | ||
513 | |||
514 | .align | ||
515 | .section ".stack", "aw" | ||
516 | user_stack: .space 4096 | ||
diff --git a/arch/arm26/boot/compressed/ll_char_wr.S b/arch/arm26/boot/compressed/ll_char_wr.S deleted file mode 100644 index f024c3ebdfa5..000000000000 --- a/arch/arm26/boot/compressed/ll_char_wr.S +++ /dev/null | |||
@@ -1,162 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm26/lib/ll_char_wr.S | ||
3 | * | ||
4 | * Copyright (C) 1995, 1996 Russell King. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Speedups & 1bpp code (C) 1996 Philip Blundell & Russell King. | ||
11 | * | ||
12 | * 10-04-96 RMK Various cleanups & reduced register usage. | ||
13 | * 08-04-98 RMK Shifts re-ordered | ||
14 | */ | ||
15 | |||
16 | @ Regs: [] = corruptible | ||
17 | @ {} = used | ||
18 | @ () = do not use | ||
19 | |||
20 | #include <linux/linkage.h> | ||
21 | #include <asm/assembler.h> | ||
22 | .text | ||
23 | |||
24 | #define BOLD 0x01 | ||
25 | #define ITALIC 0x02 | ||
26 | #define UNDERLINE 0x04 | ||
27 | #define FLASH 0x08 | ||
28 | #define INVERSE 0x10 | ||
29 | |||
30 | LC0: .word bytes_per_char_h | ||
31 | .word video_size_row | ||
32 | .word acorndata_8x8 | ||
33 | .word con_charconvtable | ||
34 | |||
35 | ENTRY(ll_write_char) | ||
36 | stmfd sp!, {r4 - r7, lr} | ||
37 | @ | ||
38 | @ Smashable regs: {r0 - r3}, [r4 - r7], (r8 - fp), [ip], (sp), [lr], (pc) | ||
39 | @ | ||
40 | eor ip, r1, #UNDERLINE << 9 | ||
41 | /* | ||
42 | * calculate colours | ||
43 | */ | ||
44 | tst r1, #INVERSE << 9 | ||
45 | moveq r2, r1, lsr #16 | ||
46 | moveq r3, r1, lsr #24 | ||
47 | movne r2, r1, lsr #24 | ||
48 | movne r3, r1, lsr #16 | ||
49 | and r3, r3, #255 | ||
50 | and r2, r2, #255 | ||
51 | /* | ||
52 | * calculate offset into character table | ||
53 | */ | ||
54 | mov r1, r1, lsl #23 | ||
55 | mov r1, r1, lsr #20 | ||
56 | /* | ||
57 | * calculate offset required for each row [maybe I should make this an argument to this fn. | ||
58 | * Have to see what the register usage is like in the calling routines. | ||
59 | */ | ||
60 | adr r4, LC0 | ||
61 | ldmia r4, {r4, r5, r6, lr} | ||
62 | ldr r4, [r4] | ||
63 | ldr r5, [r5] | ||
64 | /* | ||
65 | * Go to resolution-dependent routine... | ||
66 | */ | ||
67 | cmp r4, #4 | ||
68 | blt Lrow1bpp | ||
69 | eor r2, r3, r2 @ Create eor mask to change colour from bg | ||
70 | orr r3, r3, r3, lsl #8 @ to fg. | ||
71 | orr r3, r3, r3, lsl #16 | ||
72 | add r0, r0, r5, lsl #3 @ Move to bottom of character | ||
73 | add r1, r1, #7 | ||
74 | ldrb r7, [r6, r1] | ||
75 | tst ip, #UNDERLINE << 9 | ||
76 | eoreq r7, r7, #255 | ||
77 | teq r4, #8 | ||
78 | beq Lrow8bpplp | ||
79 | @ | ||
80 | @ Smashable regs: {r0 - r3}, [r4], {r5 - r7}, (r8 - fp), [ip], (sp), {lr}, (pc) | ||
81 | @ | ||
82 | orr r3, r3, r3, lsl #4 | ||
83 | Lrow4bpplp: ldr r7, [lr, r7, lsl #2] | ||
84 | mul r7, r2, r7 | ||
85 | tst r1, #7 @ avoid using r7 directly after | ||
86 | eor ip, r3, r7 | ||
87 | str ip, [r0, -r5]! | ||
88 | LOADREGS(eqfd, sp!, {r4 - r7, pc}) | ||
89 | sub r1, r1, #1 | ||
90 | ldrb r7, [r6, r1] | ||
91 | ldr r7, [lr, r7, lsl #2] | ||
92 | mul r7, r2, r7 | ||
93 | tst r1, #7 @ avoid using r7 directly after | ||
94 | eor ip, r3, r7 | ||
95 | str ip, [r0, -r5]! | ||
96 | subne r1, r1, #1 | ||
97 | ldrneb r7, [r6, r1] | ||
98 | bne Lrow4bpplp | ||
99 | LOADREGS(fd, sp!, {r4 - r7, pc}) | ||
100 | |||
101 | @ | ||
102 | @ Smashable regs: {r0 - r3}, [r4], {r5 - r7}, (r8 - fp), [ip], (sp), {lr}, (pc) | ||
103 | @ | ||
104 | Lrow8bpplp: mov ip, r7, lsr #4 | ||
105 | ldr ip, [lr, ip, lsl #2] | ||
106 | mul r4, r2, ip | ||
107 | and ip, r7, #15 @ avoid r4 | ||
108 | ldr ip, [lr, ip, lsl #2] @ avoid r4 | ||
109 | mul ip, r2, ip @ avoid r4 | ||
110 | eor r4, r3, r4 @ avoid ip | ||
111 | tst r1, #7 @ avoid ip | ||
112 | sub r0, r0, r5 @ avoid ip | ||
113 | eor ip, r3, ip | ||
114 | stmia r0, {r4, ip} | ||
115 | LOADREGS(eqfd, sp!, {r4 - r7, pc}) | ||
116 | sub r1, r1, #1 | ||
117 | ldrb r7, [r6, r1] | ||
118 | mov ip, r7, lsr #4 | ||
119 | ldr ip, [lr, ip, lsl #2] | ||
120 | mul r4, r2, ip | ||
121 | and ip, r7, #15 @ avoid r4 | ||
122 | ldr ip, [lr, ip, lsl #2] @ avoid r4 | ||
123 | mul ip, r2, ip @ avoid r4 | ||
124 | eor r4, r3, r4 @ avoid ip | ||
125 | tst r1, #7 @ avoid ip | ||
126 | sub r0, r0, r5 @ avoid ip | ||
127 | eor ip, r3, ip | ||
128 | stmia r0, {r4, ip} | ||
129 | subne r1, r1, #1 | ||
130 | ldrneb r7, [r6, r1] | ||
131 | bne Lrow8bpplp | ||
132 | LOADREGS(fd, sp!, {r4 - r7, pc}) | ||
133 | |||
134 | @ | ||
135 | @ Smashable regs: {r0 - r3}, [r4], {r5, r6}, [r7], (r8 - fp), [ip], (sp), [lr], (pc) | ||
136 | @ | ||
137 | Lrow1bpp: add r6, r6, r1 | ||
138 | ldmia r6, {r4, r7} | ||
139 | tst ip, #INVERSE << 9 | ||
140 | mvnne r4, r4 | ||
141 | mvnne r7, r7 | ||
142 | strb r4, [r0], r5 | ||
143 | mov r4, r4, lsr #8 | ||
144 | strb r4, [r0], r5 | ||
145 | mov r4, r4, lsr #8 | ||
146 | strb r4, [r0], r5 | ||
147 | mov r4, r4, lsr #8 | ||
148 | strb r4, [r0], r5 | ||
149 | strb r7, [r0], r5 | ||
150 | mov r7, r7, lsr #8 | ||
151 | strb r7, [r0], r5 | ||
152 | mov r7, r7, lsr #8 | ||
153 | strb r7, [r0], r5 | ||
154 | mov r7, r7, lsr #8 | ||
155 | tst ip, #UNDERLINE << 9 | ||
156 | mvneq r7, r7 | ||
157 | strb r7, [r0], r5 | ||
158 | LOADREGS(fd, sp!, {r4 - r7, pc}) | ||
159 | |||
160 | .bss | ||
161 | ENTRY(con_charconvtable) | ||
162 | .space 1024 | ||
diff --git a/arch/arm26/boot/compressed/misc.c b/arch/arm26/boot/compressed/misc.c deleted file mode 100644 index 0714d19c5776..000000000000 --- a/arch/arm26/boot/compressed/misc.c +++ /dev/null | |||
@@ -1,316 +0,0 @@ | |||
1 | /* | ||
2 | * misc.c | ||
3 | * | ||
4 | * This is a collection of several routines from gzip-1.0.3 | ||
5 | * adapted for Linux. | ||
6 | * | ||
7 | * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 | ||
8 | * | ||
9 | * Modified for ARM Linux by Russell King | ||
10 | * | ||
11 | * Nicolas Pitre <nico@visuaide.com> 1999/04/14 : | ||
12 | * For this code to run directly from Flash, all constant variables must | ||
13 | * be marked with 'const' and all other variables initialized at run-time | ||
14 | * only. This way all non constant variables will end up in the bss segment, | ||
15 | * which should point to addresses in RAM and cleared to 0 on start. | ||
16 | * This allows for a much quicker boot time. | ||
17 | */ | ||
18 | |||
19 | unsigned int __machine_arch_type; | ||
20 | |||
21 | #include <linux/kernel.h> | ||
22 | |||
23 | #include <asm/uaccess.h> | ||
24 | #include "uncompress.h" | ||
25 | |||
26 | #ifdef STANDALONE_DEBUG | ||
27 | #define puts printf | ||
28 | #endif | ||
29 | |||
30 | #define __ptr_t void * | ||
31 | |||
32 | /* | ||
33 | * Optimised C version of memzero for the ARM. | ||
34 | */ | ||
35 | void __memzero (__ptr_t s, size_t n) | ||
36 | { | ||
37 | union { void *vp; unsigned long *ulp; unsigned char *ucp; } u; | ||
38 | int i; | ||
39 | |||
40 | u.vp = s; | ||
41 | |||
42 | for (i = n >> 5; i > 0; i--) { | ||
43 | *u.ulp++ = 0; | ||
44 | *u.ulp++ = 0; | ||
45 | *u.ulp++ = 0; | ||
46 | *u.ulp++ = 0; | ||
47 | *u.ulp++ = 0; | ||
48 | *u.ulp++ = 0; | ||
49 | *u.ulp++ = 0; | ||
50 | *u.ulp++ = 0; | ||
51 | } | ||
52 | |||
53 | if (n & 1 << 4) { | ||
54 | *u.ulp++ = 0; | ||
55 | *u.ulp++ = 0; | ||
56 | *u.ulp++ = 0; | ||
57 | *u.ulp++ = 0; | ||
58 | } | ||
59 | |||
60 | if (n & 1 << 3) { | ||
61 | *u.ulp++ = 0; | ||
62 | *u.ulp++ = 0; | ||
63 | } | ||
64 | |||
65 | if (n & 1 << 2) | ||
66 | *u.ulp++ = 0; | ||
67 | |||
68 | if (n & 1 << 1) { | ||
69 | *u.ucp++ = 0; | ||
70 | *u.ucp++ = 0; | ||
71 | } | ||
72 | |||
73 | if (n & 1) | ||
74 | *u.ucp++ = 0; | ||
75 | } | ||
76 | |||
77 | static inline __ptr_t memcpy(__ptr_t __dest, __const __ptr_t __src, | ||
78 | size_t __n) | ||
79 | { | ||
80 | int i = 0; | ||
81 | unsigned char *d = (unsigned char *)__dest, *s = (unsigned char *)__src; | ||
82 | |||
83 | for (i = __n >> 3; i > 0; i--) { | ||
84 | *d++ = *s++; | ||
85 | *d++ = *s++; | ||
86 | *d++ = *s++; | ||
87 | *d++ = *s++; | ||
88 | *d++ = *s++; | ||
89 | *d++ = *s++; | ||
90 | *d++ = *s++; | ||
91 | *d++ = *s++; | ||
92 | } | ||
93 | |||
94 | if (__n & 1 << 2) { | ||
95 | *d++ = *s++; | ||
96 | *d++ = *s++; | ||
97 | *d++ = *s++; | ||
98 | *d++ = *s++; | ||
99 | } | ||
100 | |||
101 | if (__n & 1 << 1) { | ||
102 | *d++ = *s++; | ||
103 | *d++ = *s++; | ||
104 | } | ||
105 | |||
106 | if (__n & 1) | ||
107 | *d++ = *s++; | ||
108 | |||
109 | return __dest; | ||
110 | } | ||
111 | |||
112 | /* | ||
113 | * gzip delarations | ||
114 | */ | ||
115 | #define OF(args) args | ||
116 | #define STATIC static | ||
117 | |||
118 | typedef unsigned char uch; | ||
119 | typedef unsigned short ush; | ||
120 | typedef unsigned long ulg; | ||
121 | |||
122 | #define WSIZE 0x8000 /* Window size must be at least 32k, */ | ||
123 | /* and a power of two */ | ||
124 | |||
125 | static uch *inbuf; /* input buffer */ | ||
126 | static uch window[WSIZE]; /* Sliding window buffer */ | ||
127 | |||
128 | static unsigned insize; /* valid bytes in inbuf */ | ||
129 | static unsigned inptr; /* index of next byte to be processed in inbuf */ | ||
130 | static unsigned outcnt; /* bytes in output buffer */ | ||
131 | |||
132 | /* gzip flag byte */ | ||
133 | #define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ | ||
134 | #define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */ | ||
135 | #define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ | ||
136 | #define ORIG_NAME 0x08 /* bit 3 set: original file name present */ | ||
137 | #define COMMENT 0x10 /* bit 4 set: file comment present */ | ||
138 | #define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */ | ||
139 | #define RESERVED 0xC0 /* bit 6,7: reserved */ | ||
140 | |||
141 | #define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf()) | ||
142 | |||
143 | /* Diagnostic functions */ | ||
144 | #ifdef DEBUG | ||
145 | # define Assert(cond,msg) {if(!(cond)) error(msg);} | ||
146 | # define Trace(x) fprintf x | ||
147 | # define Tracev(x) {if (verbose) fprintf x ;} | ||
148 | # define Tracevv(x) {if (verbose>1) fprintf x ;} | ||
149 | # define Tracec(c,x) {if (verbose && (c)) fprintf x ;} | ||
150 | # define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;} | ||
151 | #else | ||
152 | # define Assert(cond,msg) | ||
153 | # define Trace(x) | ||
154 | # define Tracev(x) | ||
155 | # define Tracevv(x) | ||
156 | # define Tracec(c,x) | ||
157 | # define Tracecv(c,x) | ||
158 | #endif | ||
159 | |||
160 | static int fill_inbuf(void); | ||
161 | static void flush_window(void); | ||
162 | static void error(char *m); | ||
163 | static void gzip_mark(void **); | ||
164 | static void gzip_release(void **); | ||
165 | |||
166 | extern char input_data[]; | ||
167 | extern char input_data_end[]; | ||
168 | |||
169 | static uch *output_data; | ||
170 | static ulg output_ptr; | ||
171 | static ulg bytes_out; | ||
172 | |||
173 | static void *malloc(int size); | ||
174 | static void free(void *where); | ||
175 | static void error(char *m); | ||
176 | static void gzip_mark(void **); | ||
177 | static void gzip_release(void **); | ||
178 | |||
179 | static void puts(const char *); | ||
180 | |||
181 | extern int end; | ||
182 | static ulg free_mem_ptr; | ||
183 | static ulg free_mem_ptr_end; | ||
184 | |||
185 | #define HEAP_SIZE 0x3000 | ||
186 | |||
187 | #include "../../../../lib/inflate.c" | ||
188 | |||
189 | #ifndef STANDALONE_DEBUG | ||
190 | static void *malloc(int size) | ||
191 | { | ||
192 | void *p; | ||
193 | |||
194 | if (size <0) error("Malloc error"); | ||
195 | if (free_mem_ptr <= 0) error("Memory error"); | ||
196 | |||
197 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
198 | |||
199 | p = (void *)free_mem_ptr; | ||
200 | free_mem_ptr += size; | ||
201 | |||
202 | if (free_mem_ptr >= free_mem_ptr_end) | ||
203 | error("Out of memory"); | ||
204 | return p; | ||
205 | } | ||
206 | |||
207 | static void free(void *where) | ||
208 | { /* gzip_mark & gzip_release do the free */ | ||
209 | } | ||
210 | |||
211 | static void gzip_mark(void **ptr) | ||
212 | { | ||
213 | arch_decomp_wdog(); | ||
214 | *ptr = (void *) free_mem_ptr; | ||
215 | } | ||
216 | |||
217 | static void gzip_release(void **ptr) | ||
218 | { | ||
219 | arch_decomp_wdog(); | ||
220 | free_mem_ptr = (long) *ptr; | ||
221 | } | ||
222 | #else | ||
223 | static void gzip_mark(void **ptr) | ||
224 | { | ||
225 | } | ||
226 | |||
227 | static void gzip_release(void **ptr) | ||
228 | { | ||
229 | } | ||
230 | #endif | ||
231 | |||
232 | /* =========================================================================== | ||
233 | * Fill the input buffer. This is called only when the buffer is empty | ||
234 | * and at least one byte is really needed. | ||
235 | */ | ||
236 | int fill_inbuf(void) | ||
237 | { | ||
238 | if (insize != 0) | ||
239 | error("ran out of input data"); | ||
240 | |||
241 | inbuf = input_data; | ||
242 | insize = &input_data_end[0] - &input_data[0]; | ||
243 | |||
244 | inptr = 1; | ||
245 | return inbuf[0]; | ||
246 | } | ||
247 | |||
248 | /* =========================================================================== | ||
249 | * Write the output window window[0..outcnt-1] and update crc and bytes_out. | ||
250 | * (Used for the decompressed data only.) | ||
251 | */ | ||
252 | void flush_window(void) | ||
253 | { | ||
254 | ulg c = crc; | ||
255 | unsigned n; | ||
256 | uch *in, *out, ch; | ||
257 | |||
258 | in = window; | ||
259 | out = &output_data[output_ptr]; | ||
260 | for (n = 0; n < outcnt; n++) { | ||
261 | ch = *out++ = *in++; | ||
262 | c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8); | ||
263 | } | ||
264 | crc = c; | ||
265 | bytes_out += (ulg)outcnt; | ||
266 | output_ptr += (ulg)outcnt; | ||
267 | outcnt = 0; | ||
268 | puts("."); | ||
269 | } | ||
270 | |||
271 | static void error(char *x) | ||
272 | { | ||
273 | int ptr; | ||
274 | |||
275 | puts("\n\n"); | ||
276 | puts(x); | ||
277 | puts("\n\n -- System halted"); | ||
278 | |||
279 | while(1); /* Halt */ | ||
280 | } | ||
281 | |||
282 | #ifndef STANDALONE_DEBUG | ||
283 | |||
284 | ulg | ||
285 | decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p, | ||
286 | int arch_id) | ||
287 | { | ||
288 | output_data = (uch *)output_start; /* Points to kernel start */ | ||
289 | free_mem_ptr = free_mem_ptr_p; | ||
290 | free_mem_ptr_end = free_mem_ptr_end_p; | ||
291 | __machine_arch_type = arch_id; | ||
292 | |||
293 | arch_decomp_setup(); | ||
294 | |||
295 | makecrc(); | ||
296 | puts("Uncompressing Linux..."); | ||
297 | gunzip(); | ||
298 | puts(" done, booting the kernel.\n"); | ||
299 | return output_ptr; | ||
300 | } | ||
301 | #else | ||
302 | |||
303 | char output_buffer[1500*1024]; | ||
304 | |||
305 | int main() | ||
306 | { | ||
307 | output_data = output_buffer; | ||
308 | |||
309 | makecrc(); | ||
310 | puts("Uncompressing Linux..."); | ||
311 | gunzip(); | ||
312 | puts("done.\n"); | ||
313 | return 0; | ||
314 | } | ||
315 | #endif | ||
316 | |||
diff --git a/arch/arm26/boot/compressed/uncompress.h b/arch/arm26/boot/compressed/uncompress.h deleted file mode 100644 index 66d9b938a7a4..000000000000 --- a/arch/arm26/boot/compressed/uncompress.h +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright (C) 1996 Russell King | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | #define VIDMEM ((char *)0x02000000) | ||
10 | |||
11 | int video_num_columns, video_num_lines, video_size_row; | ||
12 | int white, bytes_per_char_h; | ||
13 | extern unsigned long con_charconvtable[256]; | ||
14 | |||
15 | struct param_struct { | ||
16 | unsigned long page_size; | ||
17 | unsigned long nr_pages; | ||
18 | unsigned long ramdisk_size; | ||
19 | unsigned long mountrootrdonly; | ||
20 | unsigned long rootdev; | ||
21 | unsigned long video_num_cols; | ||
22 | unsigned long video_num_rows; | ||
23 | unsigned long video_x; | ||
24 | unsigned long video_y; | ||
25 | unsigned long memc_control_reg; | ||
26 | unsigned char sounddefault; | ||
27 | unsigned char adfsdrives; | ||
28 | unsigned char bytes_per_char_h; | ||
29 | unsigned char bytes_per_char_v; | ||
30 | unsigned long unused[256/4-11]; | ||
31 | }; | ||
32 | |||
33 | static struct param_struct *params = (struct param_struct *)0x0207c000; | ||
34 | |||
35 | /* | ||
36 | * This does not append a newline | ||
37 | */ | ||
38 | static void puts(const char *s) | ||
39 | { | ||
40 | extern void ll_write_char(char *, unsigned long); | ||
41 | int x,y; | ||
42 | unsigned char c; | ||
43 | char *ptr; | ||
44 | |||
45 | x = params->video_x; | ||
46 | y = params->video_y; | ||
47 | |||
48 | while ( ( c = *(unsigned char *)s++ ) != '\0' ) { | ||
49 | if ( c == '\n' ) { | ||
50 | x = 0; | ||
51 | if ( ++y >= video_num_lines ) { | ||
52 | y--; | ||
53 | } | ||
54 | } else { | ||
55 | ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); | ||
56 | ll_write_char(ptr, c|(white<<16)); | ||
57 | if ( ++x >= video_num_columns ) { | ||
58 | x = 0; | ||
59 | if ( ++y >= video_num_lines ) { | ||
60 | y--; | ||
61 | } | ||
62 | } | ||
63 | } | ||
64 | } | ||
65 | |||
66 | params->video_x = x; | ||
67 | params->video_y = y; | ||
68 | } | ||
69 | |||
70 | static void error(char *x); | ||
71 | |||
72 | /* | ||
73 | * Setup for decompression | ||
74 | */ | ||
75 | static void arch_decomp_setup(void) | ||
76 | { | ||
77 | int i; | ||
78 | |||
79 | video_num_lines = params->video_num_rows; | ||
80 | video_num_columns = params->video_num_cols; | ||
81 | bytes_per_char_h = params->bytes_per_char_h; | ||
82 | video_size_row = video_num_columns * bytes_per_char_h; | ||
83 | if (bytes_per_char_h == 4) | ||
84 | for (i = 0; i < 256; i++) | ||
85 | con_charconvtable[i] = | ||
86 | (i & 128 ? 1 << 0 : 0) | | ||
87 | (i & 64 ? 1 << 4 : 0) | | ||
88 | (i & 32 ? 1 << 8 : 0) | | ||
89 | (i & 16 ? 1 << 12 : 0) | | ||
90 | (i & 8 ? 1 << 16 : 0) | | ||
91 | (i & 4 ? 1 << 20 : 0) | | ||
92 | (i & 2 ? 1 << 24 : 0) | | ||
93 | (i & 1 ? 1 << 28 : 0); | ||
94 | else | ||
95 | for (i = 0; i < 16; i++) | ||
96 | con_charconvtable[i] = | ||
97 | (i & 8 ? 1 << 0 : 0) | | ||
98 | (i & 4 ? 1 << 8 : 0) | | ||
99 | (i & 2 ? 1 << 16 : 0) | | ||
100 | (i & 1 ? 1 << 24 : 0); | ||
101 | |||
102 | white = bytes_per_char_h == 8 ? 0xfc : 7; | ||
103 | |||
104 | if (params->nr_pages * params->page_size < 4096*1024) error("<4M of mem\n"); | ||
105 | } | ||
106 | |||
107 | /* | ||
108 | * nothing to do | ||
109 | */ | ||
110 | #define arch_decomp_wdog() | ||
diff --git a/arch/arm26/boot/compressed/vmlinux.lds.in b/arch/arm26/boot/compressed/vmlinux.lds.in deleted file mode 100644 index 86d821d5ab70..000000000000 --- a/arch/arm26/boot/compressed/vmlinux.lds.in +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm26/boot/compressed/vmlinux.lds.in | ||
3 | * | ||
4 | * Copyright (C) 2000 Russell King | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | OUTPUT_ARCH(arm) | ||
11 | ENTRY(_start) | ||
12 | SECTIONS | ||
13 | { | ||
14 | . = LOAD_ADDR; | ||
15 | _load_addr = .; | ||
16 | |||
17 | . = TEXT_START; | ||
18 | _text = .; | ||
19 | |||
20 | .text : { | ||
21 | _start = .; | ||
22 | *(.start) | ||
23 | *(.text) | ||
24 | *(.fixup) | ||
25 | *(.gnu.warning) | ||
26 | *(.rodata) | ||
27 | *(.rodata.*) | ||
28 | *(.glue_7) | ||
29 | *(.glue_7t) | ||
30 | input_data = .; | ||
31 | arch/arm26/boot/compressed/piggy.o | ||
32 | input_data_end = .; | ||
33 | . = ALIGN(4); | ||
34 | } | ||
35 | |||
36 | _etext = .; | ||
37 | |||
38 | _got_start = .; | ||
39 | .got : { *(.got) } | ||
40 | _got_end = .; | ||
41 | .got.plt : { *(.got.plt) } | ||
42 | .data : { *(.data) } | ||
43 | _edata = .; | ||
44 | |||
45 | . = BSS_START; | ||
46 | __bss_start = .; | ||
47 | .bss : { *(.bss) } | ||
48 | _end = .; | ||
49 | |||
50 | .stack (NOLOAD) : { *(.stack) } | ||
51 | |||
52 | .stab 0 : { *(.stab) } | ||
53 | .stabstr 0 : { *(.stabstr) } | ||
54 | .stab.excl 0 : { *(.stab.excl) } | ||
55 | .stab.exclstr 0 : { *(.stab.exclstr) } | ||
56 | .stab.index 0 : { *(.stab.index) } | ||
57 | .stab.indexstr 0 : { *(.stab.indexstr) } | ||
58 | .comment 0 : { *(.comment) } | ||
59 | } | ||
60 | |||
diff --git a/arch/arm26/boot/install.sh b/arch/arm26/boot/install.sh deleted file mode 100644 index 8a8399b26cf7..000000000000 --- a/arch/arm26/boot/install.sh +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # arch/arm26/boot/install.sh | ||
4 | # | ||
5 | # This file is subject to the terms and conditions of the GNU General Public | ||
6 | # License. See the file "COPYING" in the main directory of this archive | ||
7 | # for more details. | ||
8 | # | ||
9 | # Copyright (C) 1995 by Linus Torvalds | ||
10 | # | ||
11 | # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin | ||
12 | # Adapted from code in arch/i386/boot/install.sh by Russell King | ||
13 | # Stolen from arm32 by Ian Molton | ||
14 | # | ||
15 | # "make install" script for arm architecture | ||
16 | # | ||
17 | # Arguments: | ||
18 | # $1 - kernel version | ||
19 | # $2 - kernel image file | ||
20 | # $3 - kernel map file | ||
21 | # $4 - default install path (blank if root directory) | ||
22 | # | ||
23 | |||
24 | # User may have a custom install script | ||
25 | |||
26 | if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then | ||
27 | exec /sbin/${CROSS_COMPILE}installkernel "$@" | ||
28 | fi | ||
29 | |||
30 | if [ "$2" = "zImage" ]; then | ||
31 | # Compressed install | ||
32 | echo "Installing compressed kernel" | ||
33 | if [ -f $4/vmlinuz-$1 ]; then | ||
34 | mv $4/vmlinuz-$1 $4/vmlinuz.old | ||
35 | fi | ||
36 | |||
37 | if [ -f $4/System.map-$1 ]; then | ||
38 | mv $4/System.map-$1 $4/System.old | ||
39 | fi | ||
40 | |||
41 | cat $2 > $4/vmlinuz-$1 | ||
42 | cp $3 $4/System.map-$1 | ||
43 | else | ||
44 | # Normal install | ||
45 | echo "Installing normal kernel" | ||
46 | if [ -f $4/vmlinux-$1 ]; then | ||
47 | mv $4/vmlinux-$1 $4/vmlinux.old | ||
48 | fi | ||
49 | |||
50 | if [ -f $4/System.map ]; then | ||
51 | mv $4/System.map $4/System.old | ||
52 | fi | ||
53 | |||
54 | cat $2 > $4/vmlinux-$1 | ||
55 | cp $3 $4/System.map | ||
56 | fi | ||
57 | |||
58 | if [ -x /sbin/loadmap ]; then | ||
59 | /sbin/loadmap --rdev /dev/ima | ||
60 | else | ||
61 | echo "You have to install it yourself" | ||
62 | fi | ||