]>
Commit | Line | Data |
---|---|---|
df8ba273 KT |
1 | diff -urN linux.orig/arch/ppc/boot/Makefile linux/arch/ppc/boot/Makefile |
2 | --- linux.orig/arch/ppc/boot/Makefile Sun Mar 25 18:31:49 2001 | |
3 | +++ linux/arch/ppc/boot/Makefile Thu Jul 11 15:43:29 2002 | |
4 | @@ -9,6 +9,7 @@ | |
5 | # Adapted for PowerPC by Gary Thomas | |
6 | # modified by Cort (cort@cs.nmt.edu) | |
7 | # | |
8 | +# | |
9 | .c.s: | |
10 | $(CC) $(CFLAGS) -I$(HPATH) -S -o $*.s $< | |
11 | .s.o: | |
12 | @@ -69,7 +70,7 @@ | |
13 | zvmlinux.initrd: zvmlinux | |
14 | $(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS) | |
15 | $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ | |
16 | - --add-section=initrd=../coffboot/ramdisk.image.gz \ | |
17 | + --add-section=initrd=ramdisk.image.gz \ | |
18 | --add-section=image=../coffboot/vmlinux.gz \ | |
19 | zvmlinux.initrd.tmp zvmlinux.initrd | |
20 | $(CC) $(CFLAGS) -DINITRD_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd initrd` \ | |
21 | @@ -79,7 +80,7 @@ | |
22 | -c -o misc.o misc.c | |
23 | $(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS) | |
24 | $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ | |
25 | - --add-section=initrd=../coffboot/ramdisk.image.gz \ | |
26 | + --add-section=initrd=ramdisk.image.gz \ | |
27 | --add-section=image=../coffboot/vmlinux.gz \ | |
28 | zvmlinux.initrd.tmp $@ | |
29 | rm zvmlinux.initrd.tmp | |
30 | diff -urN linux.orig/arch/ppc/boot/vreset.c linux/arch/ppc/boot/vreset.c | |
31 | --- linux.orig/arch/ppc/boot/vreset.c Sun Mar 25 18:31:49 2001 | |
32 | +++ linux/arch/ppc/boot/vreset.c Thu Jul 11 15:43:29 2002 | |
33 | @@ -15,7 +15,7 @@ | |
34 | * Adapted for IBM portables by: | |
35 | * Takeshi Ishimoto | |
36 | * Multi-console support: | |
37 | - * Terje Malmedal <terje.malmedal@usit.uio.no> | |
38 | + * | |
39 | */ | |
40 | ||
41 | #include "iso_font.h" | |
42 | diff -urN linux.orig/arch/ppc/chrpboot/main.c linux/arch/ppc/chrpboot/main.c | |
43 | --- linux.orig/arch/ppc/chrpboot/main.c Sun Mar 25 18:31:50 2001 | |
44 | +++ linux/arch/ppc/chrpboot/main.c Thu Jul 11 15:43:29 2002 | |
45 | @@ -17,16 +17,15 @@ | |
46 | #define get_32be(x) (*(unsigned *)(x)) | |
47 | ||
48 | #define RAM_START 0x00000000 | |
49 | -#define RAM_END (64<<20) | |
50 | +#define RAM_END (8<<20) | |
51 | ||
52 | -#define BOOT_START ((unsigned long)_start) | |
53 | -#define BOOT_END ((unsigned long)(_end + 0xFFF) & ~0xFFF) | |
54 | +#define RAM_FREE ((unsigned long)(_end+0x1000)&~0xFFF) | |
55 | #define PROG_START 0x00010000 | |
56 | ||
57 | char *avail_ram; | |
58 | char *end_avail; | |
59 | ||
60 | -extern char _start[], _end[]; | |
61 | +extern char _end[]; | |
62 | extern char image_data[]; | |
63 | extern int image_len; | |
64 | extern char initrd_data[]; | |
65 | @@ -40,31 +39,26 @@ | |
66 | void *dst; | |
67 | unsigned char *im; | |
68 | unsigned initrd_start, initrd_size; | |
69 | - | |
70 | - printf("chrpboot starting: loaded at 0x%x\n\r", _start); | |
71 | + extern char _start; | |
72 | + | |
73 | + printf("chrpboot starting: loaded at 0x%x\n\r", &_start); | |
74 | ||
75 | if (initrd_len) { | |
76 | initrd_size = initrd_len; | |
77 | initrd_start = (RAM_END - initrd_size) & ~0xFFF; | |
78 | a1 = initrd_start; | |
79 | a2 = initrd_size; | |
80 | - claim(initrd_start, RAM_END - initrd_start, 0); | |
81 | - printf("initial ramdisk moving 0x%x <- 0x%x (%x bytes)\n", | |
82 | - initrd_start, initrd_data, initrd_size); | |
83 | + printf("initial ramdisk moving 0x%x <- 0x%x (%x bytes)\n\r", initrd_start, | |
84 | + initrd_data,initrd_size); | |
85 | memcpy((char *)initrd_start, initrd_data, initrd_size); | |
86 | - } | |
87 | + end_avail = (char *)initrd_start; | |
88 | + } else | |
89 | + end_avail = (char *) RAM_END; | |
90 | im = image_data; | |
91 | len = image_len; | |
92 | - /* try and claim our text/data in case of OF bugs */ | |
93 | - claim(BOOT_START, BOOT_END - BOOT_START, 0); | |
94 | - /* claim 4MB starting at PROG_START */ | |
95 | - claim(PROG_START, (4<<20) - PROG_START, 0); | |
96 | dst = (void *) PROG_START; | |
97 | if (im[0] == 0x1f && im[1] == 0x8b) { | |
98 | - /* claim 512kB for scratch space */ | |
99 | - avail_ram = (char *) claim(0, 512 << 10, 0x10); | |
100 | - end_avail = avail_ram + (512 << 10); | |
101 | - printf("avail_ram = %x\n", avail_ram); | |
102 | + avail_ram = (char *)RAM_FREE; | |
103 | printf("gunzipping (0x%x <- 0x%x:0x%0x)...", dst, im, im+len); | |
104 | gunzip(dst, 0x400000, im, &len); | |
105 | printf("done %u bytes\n\r", len); | |
106 | diff -urN linux.orig/arch/ppc/chrpboot/misc.S linux/arch/ppc/chrpboot/misc.S | |
107 | --- linux.orig/arch/ppc/chrpboot/misc.S Sun Mar 25 18:31:50 2001 | |
108 | +++ linux/arch/ppc/chrpboot/misc.S Thu Jul 11 15:43:29 2002 | |
109 | @@ -9,7 +9,7 @@ | |
110 | .text | |
111 | ||
112 | /* | |
113 | - * Use the BAT0 registers to map the 1st 8 or 64MB of RAM to 0x90000000. | |
114 | + * Use the BAT0 registers to map the 1st 8MB of RAM to 0x90000000. | |
115 | */ | |
116 | .globl setup_bats | |
117 | setup_bats: | |
118 | @@ -21,7 +21,7 @@ | |
119 | ori 4,4,4 /* set up BAT registers for 601 */ | |
120 | li 5,0x7f | |
121 | b 5f | |
122 | -4: ori 4,4,0x7ff /* set up BAT registers for 604 */ | |
123 | +4: ori 4,4,0xff /* set up BAT registers for 604 */ | |
124 | li 5,2 | |
125 | mtdbatu 3,4 | |
126 | mtdbatl 3,5 | |
127 | diff -urN linux.orig/arch/ppc/chrpboot/start.c linux/arch/ppc/chrpboot/start.c | |
128 | --- linux.orig/arch/ppc/chrpboot/start.c Sun Mar 25 18:31:50 2001 | |
129 | +++ linux/arch/ppc/chrpboot/start.c Thu Jul 11 15:43:29 2002 | |
130 | @@ -131,29 +131,6 @@ | |
131 | return args.phandle; | |
132 | } | |
133 | ||
134 | -void * | |
135 | -claim(unsigned int virt, unsigned int size, unsigned int align) | |
136 | -{ | |
137 | - struct prom_args { | |
138 | - char *service; | |
139 | - int nargs; | |
140 | - int nret; | |
141 | - unsigned int virt; | |
142 | - unsigned int size; | |
143 | - unsigned int align; | |
144 | - void *ret; | |
145 | - } args; | |
146 | - | |
147 | - args.service = "claim"; | |
148 | - args.nargs = 3; | |
149 | - args.nret = 1; | |
150 | - args.virt = virt; | |
151 | - args.size = size; | |
152 | - args.align = align; | |
153 | - (*prom)(&args); | |
154 | - return args.ret; | |
155 | -} | |
156 | - | |
157 | int | |
158 | getprop(void *phandle, const char *name, void *buf, int buflen) | |
159 | { | |
160 | diff -urN linux.orig/arch/ppc/coffboot/Makefile linux/arch/ppc/coffboot/Makefile | |
161 | --- linux.orig/arch/ppc/coffboot/Makefile Sun Mar 25 18:31:49 2001 | |
162 | +++ linux/arch/ppc/coffboot/Makefile Thu Jul 11 15:43:29 2002 | |
163 | @@ -9,13 +9,12 @@ | |
164 | LD = $(CROSS_COMPILE)ld | |
165 | CFLAGS = $(CPPFLAGS) -O -fno-builtin -I$(HPATH) | |
166 | OBJCOPY = $(CROSS_COMPILE)objcopy | |
167 | -OBJCOPY_ARGS = -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment | |
168 | -COFF_LD_ARGS = -e _start -T ld.script -Ttext 500000 -Tdata 510000 -Bstatic | |
169 | -CHRP_LD_ARGS = -Ttext 0x01000000 | |
170 | +OBJCOPY_ARGS = -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment \ | |
171 | + --add-section=image=vmlinux.gz | |
172 | +LD_ARGS = -e _start -T ld.script -Ttext 500000 -Tdata 510000 -Bstatic | |
173 | GZ = gzip -9 | |
174 | ||
175 | -COFFOBJS = coffcrt0.o start.o coffmain.o misc.o string.o zlib.o image.o | |
176 | -CHRPOBJS = crt0.o start.o chrpmain.o misc.o string.o zlib.o image.o | |
177 | +OBJS = crt0.o start.o main.o misc.o string.o zlib.o | |
178 | LIBS = $(TOPDIR)/lib/lib.a | |
179 | ||
180 | ifeq ($(CONFIG_PPC64),y) | |
181 | @@ -34,81 +33,39 @@ | |
182 | hack-coff: hack-coff.c | |
183 | $(HOSTCC) $(HOSTCFLAGS) -o hack-coff hack-coff.c | |
184 | ||
185 | -znetboot: vmlinux.coff zImage vmlinux.elf | |
186 | - cp vmlinux.coff $(TFTPIMAGE) | |
187 | - cp vmlinux.elf $(TFTPIMAGE).elf | |
188 | - | |
189 | -znetboot.initrd: vmlinux.coff.initrd vmlinux.elf.initrd | |
190 | - cp vmlinux.coff.initrd $(TFTPIMAGE) | |
191 | - cp vmlinux.elf.initrd $(TFTPIMAGE).elf | |
192 | - | |
193 | floppy: zImage | |
194 | # mount -t hfs /dev/fd0 /mnt | |
195 | # cp vmlinux.coff /mnt | |
196 | # umount /mnt | |
197 | ||
198 | -coffboot: $(COFFOBJS) no_initrd.o ld.script | |
199 | - $(LD) -o $@ $(COFF_LD_ARGS) $(COFFOBJS) no_initrd.o $(LIBS) | |
200 | - | |
201 | -coffboot.initrd: $(COFFOBJS) initrd.o ld.script | |
202 | - $(LD) -o $@ $(COFF_LD_ARGS) $(COFFOBJS) initrd.o $(LIBS) | |
203 | +znetboot: vmlinux.coff | |
204 | + cp vmlinux.coff $(TFTPIMAGE) | |
205 | ||
206 | -piggyback: piggyback.c | |
207 | - $(HOSTCC) $(HOSTCFLAGS) -DKERNELBASE=$(KERNELBASE) -o piggyback piggyback.c | |
208 | +znetboot.initrd: vmlinux.coff.initrd | |
209 | + cp vmlinux.coff.initrd $(TFTPIMAGE) | |
210 | ||
211 | -mknote: mknote.c | |
212 | - $(HOSTCC) $(HOSTCFLAGS) -o mknote mknote.c | |
213 | +coffboot: $(OBJS) ld.script | |
214 | + $(LD) -o coffboot $(LD_ARGS) $(OBJS) $(LIBS) | |
215 | ||
216 | -image.o: piggyback vmlinux.gz | |
217 | - ./piggyback image < vmlinux.gz | $(AS) -o image.o | |
218 | +zImage: vmlinux.coff | |
219 | ||
220 | -initrd.o: ramdisk.image.gz piggyback | |
221 | - ./piggyback initrd < ramdisk.image.gz | $(AS) -o initrd.o | |
222 | +zImage.initrd: vmlinux.coff.initrd | |
223 | ||
224 | -vmlinux.coff: coffboot hack-coff | |
225 | +vmlinux.coff: coffboot hack-coff vmlinux.gz | |
226 | $(OBJCOPY) $(OBJCOPY_ARGS) coffboot $@ | |
227 | ./hack-coff $@ | |
228 | ln -sf vmlinux.coff zImage | |
229 | ||
230 | -vmlinux.coff.initrd: coffboot.initrd hack-coff | |
231 | - $(OBJCOPY) $(OBJCOPY_ARGS) coffboot.initrd $@ | |
232 | +vmlinux.coff.initrd: coffboot hack-coff vmlinux.gz ramdisk.image.gz | |
233 | + $(OBJCOPY) $(OBJCOPY_ARGS) --add-section=initrd=ramdisk.image.gz \ | |
234 | + coffboot $@ | |
235 | ./hack-coff $@ | |
236 | ||
237 | -vmlinux.elf: $(CHRPOBJS) no_initrd.o mknote | |
238 | - $(LD) $(CHRP_LD_ARGS) -o $@ $(CHRPOBJS) no_initrd.o $(LIBS) | |
239 | - ./mknote > note | |
240 | - $(OBJCOPY) $@ $@ --add-section=.note=note -R .comment | |
241 | - | |
242 | -vmlinux.elf.initrd: $(CHRPOBJS) initrd.o mknote | |
243 | - $(LD) $(CHRP_LD_ARGS) -o $@ $(CHRPOBJS) initrd.o $(LIBS) | |
244 | - ./mknote > note | |
245 | - $(OBJCOPY) $@ $@ --add-section=.note=note -R .comment | |
246 | - | |
247 | -micoffboot: dummy.o | |
248 | - $(LD) -o $@ $(COFF_LD_ARGS) dummy.o $(LIBS) | |
249 | - | |
250 | -miboot.image: micoffboot hack-coff vmlinux.gz | |
251 | - $(OBJCOPY) $(OBJCOPY_ARGS) --add-section=image=vmlinux.gz micoffboot $@ | |
252 | - ./hack-coff $@ | |
253 | - | |
254 | -miboot.image.initrd: micoffboot hack-coff vmlinux.gz ramdisk.image.gz | |
255 | - $(OBJCOPY) $(OBJCOPY_ARGS) --add-section=image=vmlinux.gz \ | |
256 | - --add-section=initrd=ramdisk.image.gz micoffboot $@ | |
257 | - ./hack-coff $@ | |
258 | - | |
259 | -zImage: vmlinux.coff vmlinux.elf miboot.image | |
260 | - | |
261 | -zImage.initrd: vmlinux.coff.initrd vmlinux.elf.initrd miboot.image.initrd | |
262 | - | |
263 | else | |
264 | znetboot: vmlinux.gz | |
265 | ||
266 | znetboot.initrd: vmlinux.gz | |
267 | ||
268 | -miboot.image: vmlinux.gz | |
269 | - | |
270 | -miboot.image.initrd: vmlinux.gz | |
271 | - | |
272 | coffboot: vmlinux.gz | |
273 | ||
274 | zImage: vmlinux.gz | |
275 | @@ -129,7 +86,5 @@ | |
276 | ||
277 | clean: | |
278 | rm -f hack-coff coffboot zImage vmlinux.coff vmlinux.gz | |
279 | - rm -f mknote piggyback vmlinux.elf note | |
280 | - rm -f micoffboot miboot.image | |
281 | ||
282 | fastdep: | |
283 | diff -urN linux.orig/arch/ppc/coffboot/chrpmain.c linux/arch/ppc/coffboot/chrpmain.c | |
284 | --- linux.orig/arch/ppc/coffboot/chrpmain.c Sun Mar 25 18:31:49 2001 | |
285 | +++ linux/arch/ppc/coffboot/chrpmain.c Thu Jan 1 01:00:00 1970 | |
286 | @@ -1,252 +0,0 @@ | |
287 | -/* | |
288 | - * Copyright (C) Paul Mackerras 1997. | |
289 | - * | |
290 | - * This program is free software; you can redistribute it and/or | |
291 | - * modify it under the terms of the GNU General Public License | |
292 | - * as published by the Free Software Foundation; either version | |
293 | - * 2 of the License, or (at your option) any later version. | |
294 | - */ | |
295 | -#include "nonstdio.h" | |
296 | -#include "zlib.h" | |
297 | - | |
298 | -extern void *finddevice(const char *); | |
299 | -extern int getprop(void *, const char *, void *, int); | |
300 | -void gunzip(void *, int, unsigned char *, int *); | |
301 | -void stop_imac_ethernet(void); | |
302 | -void stop_imac_usb(void); | |
303 | - | |
304 | -#define get_16be(x) (*(unsigned short *)(x)) | |
305 | -#define get_32be(x) (*(unsigned *)(x)) | |
306 | - | |
307 | -#define RAM_END (16 << 20) | |
308 | - | |
309 | -#define PROG_START 0x00010000 | |
310 | -#define PROG_SIZE 0x003f0000 | |
311 | - | |
312 | -#define SCRATCH_SIZE (128 << 10) | |
313 | - | |
314 | -char *avail_ram; | |
315 | -char *begin_avail, *end_avail; | |
316 | -char *avail_high; | |
317 | -unsigned int heap_use; | |
318 | -unsigned int heap_max; | |
319 | - | |
320 | -extern char _end[]; | |
321 | -extern char image_data[]; | |
322 | -extern int image_len; | |
323 | -extern char initrd_data[]; | |
324 | -extern int initrd_len; | |
325 | - | |
326 | - | |
327 | -boot(int a1, int a2, void *prom) | |
328 | -{ | |
329 | - int ns, oh, i; | |
330 | - unsigned sa, len; | |
331 | - void *dst; | |
332 | - unsigned char *im; | |
333 | - unsigned initrd_start, initrd_size; | |
334 | - extern char _start; | |
335 | - | |
336 | - printf("chrpboot starting: loaded at 0x%x\n", &_start); | |
337 | - if (initrd_len) { | |
338 | - initrd_size = initrd_len; | |
339 | - initrd_start = (RAM_END - initrd_size) & ~0xFFF; | |
340 | - a1 = initrd_start; | |
341 | - a2 = initrd_size; | |
342 | - claim(initrd_start, RAM_END - initrd_start, 0); | |
343 | - printf("initial ramdisk moving 0x%x <- 0x%x (%x bytes)\n", | |
344 | - initrd_start, initrd_data, initrd_size); | |
345 | - memcpy((char *)initrd_start, initrd_data, initrd_size); | |
346 | - } | |
347 | - im = image_data; | |
348 | - len = image_len; | |
349 | - /* claim 3MB starting at PROG_START */ | |
350 | - claim(PROG_START, PROG_SIZE, 0); | |
351 | - dst = (void *) PROG_START; | |
352 | - if (im[0] == 0x1f && im[1] == 0x8b) { | |
353 | - /* claim some memory for scratch space */ | |
354 | - avail_ram = (char *) claim(0, SCRATCH_SIZE, 0x10); | |
355 | - begin_avail = avail_high = avail_ram; | |
356 | - end_avail = avail_ram + SCRATCH_SIZE; | |
357 | - printf("heap at 0x%x\n", avail_ram); | |
358 | - printf("gunzipping (0x%x <- 0x%x:0x%0x)...", dst, im, im+len); | |
359 | - gunzip(dst, PROG_SIZE, im, &len); | |
360 | - printf("done %u bytes\n", len); | |
361 | - printf("%u bytes of heap consumed, max in use %u\n", | |
362 | - avail_high - begin_avail, heap_max); | |
363 | - } else { | |
364 | - memmove(dst, im, len); | |
365 | - } | |
366 | - | |
367 | - flush_cache(dst, len); | |
368 | -#if 0 | |
369 | - stop_imac_ethernet(); | |
370 | - stop_imac_usb(); | |
371 | -#endif | |
372 | - | |
373 | - sa = (unsigned long)PROG_START; | |
374 | - printf("start address = 0x%x\n", sa); | |
375 | - | |
376 | - (*(void (*)())sa)(a1, a2, prom); | |
377 | - | |
378 | - printf("returned?\n"); | |
379 | - | |
380 | - pause(); | |
381 | -} | |
382 | - | |
383 | -#if 0 | |
384 | -#define eieio() asm volatile("eieio"); | |
385 | - | |
386 | -void stop_imac_ethernet(void) | |
387 | -{ | |
388 | - void *macio, *enet; | |
389 | - unsigned int macio_addr[5], enet_reg[6]; | |
390 | - int len; | |
391 | - volatile unsigned int *dbdma; | |
392 | - | |
393 | - macio = finddevice("/pci/mac-io"); | |
394 | - enet = finddevice("/pci/mac-io/ethernet"); | |
395 | - if (macio == NULL || enet == NULL) | |
396 | - return; | |
397 | - len = getprop(macio, "assigned-addresses", macio_addr, sizeof(macio_addr)); | |
398 | - if (len != sizeof(macio_addr)) | |
399 | - return; | |
400 | - len = getprop(enet, "reg", enet_reg, sizeof(enet_reg)); | |
401 | - if (len != sizeof(enet_reg)) | |
402 | - return; | |
403 | - printf("macio base %x, dma at %x & %x\n", | |
404 | - macio_addr[2], enet_reg[2], enet_reg[4]); | |
405 | - | |
406 | - /* hope this is mapped... */ | |
407 | - dbdma = (volatile unsigned int *) (macio_addr[2] + enet_reg[2]); | |
408 | - *dbdma = 0x80; /* clear the RUN bit */ | |
409 | - eieio(); | |
410 | - dbdma = (volatile unsigned int *) (macio_addr[2] + enet_reg[4]); | |
411 | - *dbdma = 0x80; /* clear the RUN bit */ | |
412 | - eieio(); | |
413 | -} | |
414 | - | |
415 | -void stop_imac_usb(void) | |
416 | -{ | |
417 | - void *usb; | |
418 | - unsigned int usb_addr[5]; | |
419 | - int len; | |
420 | - volatile unsigned int *usb_ctrl; | |
421 | - | |
422 | - usb = finddevice("/pci/usb"); | |
423 | - if (usb == NULL) | |
424 | - return; | |
425 | - len = getprop(usb, "assigned-addresses", usb_addr, sizeof(usb_addr)); | |
426 | - if (len != sizeof(usb_addr)) | |
427 | - return; | |
428 | - printf("usb base %x\n", usb_addr[2]); | |
429 | - | |
430 | - usb_ctrl = (volatile unsigned int *) (usb_addr[2] + 8); | |
431 | - *usb_ctrl = 0x01000000; /* cpu_to_le32(1) */ | |
432 | - eieio(); | |
433 | -} | |
434 | -#endif | |
435 | - | |
436 | -struct memchunk { | |
437 | - unsigned int size; | |
438 | - struct memchunk *next; | |
439 | -}; | |
440 | - | |
441 | -static struct memchunk *freechunks; | |
442 | - | |
443 | -void *zalloc(void *x, unsigned items, unsigned size) | |
444 | -{ | |
445 | - void *p; | |
446 | - struct memchunk **mpp, *mp; | |
447 | - | |
448 | - size *= items; | |
449 | - size = (size + 7) & -8; | |
450 | - heap_use += size; | |
451 | - if (heap_use > heap_max) | |
452 | - heap_max = heap_use; | |
453 | - for (mpp = &freechunks; (mp = *mpp) != 0; mpp = &mp->next) { | |
454 | - if (mp->size == size) { | |
455 | - *mpp = mp->next; | |
456 | - return mp; | |
457 | - } | |
458 | - } | |
459 | - p = avail_ram; | |
460 | - avail_ram += size; | |
461 | - if (avail_ram > avail_high) | |
462 | - avail_high = avail_ram; | |
463 | - if (avail_ram > end_avail) { | |
464 | - printf("oops... out of memory\n"); | |
465 | - pause(); | |
466 | - } | |
467 | - return p; | |
468 | -} | |
469 | - | |
470 | -void zfree(void *x, void *addr, unsigned nb) | |
471 | -{ | |
472 | - struct memchunk *mp = addr; | |
473 | - | |
474 | - nb = (nb + 7) & -8; | |
475 | - heap_use -= nb; | |
476 | - if (avail_ram == addr + nb) { | |
477 | - avail_ram = addr; | |
478 | - return; | |
479 | - } | |
480 | - mp->size = nb; | |
481 | - mp->next = freechunks; | |
482 | - freechunks = mp; | |
483 | -} | |
484 | - | |
485 | -#define HEAD_CRC 2 | |
486 | -#define EXTRA_FIELD 4 | |
487 | -#define ORIG_NAME 8 | |
488 | -#define COMMENT 0x10 | |
489 | -#define RESERVED 0xe0 | |
490 | - | |
491 | -#define DEFLATED 8 | |
492 | - | |
493 | -void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp) | |
494 | -{ | |
495 | - z_stream s; | |
496 | - int r, i, flags; | |
497 | - | |
498 | - /* skip header */ | |
499 | - i = 10; | |
500 | - flags = src[3]; | |
501 | - if (src[2] != DEFLATED || (flags & RESERVED) != 0) { | |
502 | - printf("bad gzipped data\n"); | |
503 | - exit(); | |
504 | - } | |
505 | - if ((flags & EXTRA_FIELD) != 0) | |
506 | - i = 12 + src[10] + (src[11] << 8); | |
507 | - if ((flags & ORIG_NAME) != 0) | |
508 | - while (src[i++] != 0) | |
509 | - ; | |
510 | - if ((flags & COMMENT) != 0) | |
511 | - while (src[i++] != 0) | |
512 | - ; | |
513 | - if ((flags & HEAD_CRC) != 0) | |
514 | - i += 2; | |
515 | - if (i >= *lenp) { | |
516 | - printf("gunzip: ran out of data in header\n"); | |
517 | - exit(); | |
518 | - } | |
519 | - | |
520 | - s.zalloc = zalloc; | |
521 | - s.zfree = zfree; | |
522 | - r = inflateInit2(&s, -MAX_WBITS); | |
523 | - if (r != Z_OK) { | |
524 | - printf("inflateInit2 returned %d\n", r); | |
525 | - exit(); | |
526 | - } | |
527 | - s.next_in = src + i; | |
528 | - s.avail_in = *lenp - i; | |
529 | - s.next_out = dst; | |
530 | - s.avail_out = dstlen; | |
531 | - r = inflate(&s, Z_FINISH); | |
532 | - if (r != Z_OK && r != Z_STREAM_END) { | |
533 | - printf("inflate returned %d msg: %s\n", r, s.msg); | |
534 | - exit(); | |
535 | - } | |
536 | - *lenp = s.next_out - (unsigned char *) dst; | |
537 | - inflateEnd(&s); | |
538 | -} | |
539 | diff -urN linux.orig/arch/ppc/coffboot/coffcrt0.S linux/arch/ppc/coffboot/coffcrt0.S | |
540 | --- linux.orig/arch/ppc/coffboot/coffcrt0.S Sun Mar 25 18:31:49 2001 | |
541 | +++ linux/arch/ppc/coffboot/coffcrt0.S Thu Jan 1 01:00:00 1970 | |
542 | @@ -1,24 +0,0 @@ | |
543 | -/* | |
544 | - * Copyright (C) Paul Mackerras 1997. | |
545 | - * | |
546 | - * This program is free software; you can redistribute it and/or | |
547 | - * modify it under the terms of the GNU General Public License | |
548 | - * as published by the Free Software Foundation; either version | |
549 | - * 2 of the License, or (at your option) any later version. | |
550 | - */ | |
551 | - .text | |
552 | - .globl _start | |
553 | -_start: | |
554 | - .long __start,0,0 | |
555 | - | |
556 | - .globl __start | |
557 | -__start: | |
558 | - lis 9,_start@h | |
559 | - lis 8,_etext@ha | |
560 | - addi 8,8,_etext@l | |
561 | -1: dcbf 0,9 | |
562 | - icbi 0,9 | |
563 | - addi 9,9,0x20 | |
564 | - cmplwi 0,9,8 | |
565 | - blt 1b | |
566 | - b start | |
567 | diff -urN linux.orig/arch/ppc/coffboot/coffmain.c linux/arch/ppc/coffboot/coffmain.c | |
568 | --- linux.orig/arch/ppc/coffboot/coffmain.c Sun Mar 25 18:31:49 2001 | |
569 | +++ linux/arch/ppc/coffboot/coffmain.c Thu Jan 1 01:00:00 1970 | |
570 | @@ -1,157 +0,0 @@ | |
571 | -/* | |
572 | - * Copyright (C) Paul Mackerras 1997. | |
573 | - * | |
574 | - * This program is free software; you can redistribute it and/or | |
575 | - * modify it under the terms of the GNU General Public License | |
576 | - * as published by the Free Software Foundation; either version | |
577 | - * 2 of the License, or (at your option) any later version. | |
578 | - */ | |
579 | -#include "nonstdio.h" | |
580 | -#include "zlib.h" | |
581 | - | |
582 | -extern void *finddevice(const char *); | |
583 | -extern int getprop(void *, const char *, void *, int); | |
584 | -extern char *claim(unsigned, unsigned, unsigned); | |
585 | -void gunzip(void *, int, unsigned char *, int *); | |
586 | - | |
587 | -#define get_16be(x) (*(unsigned short *)(x)) | |
588 | -#define get_32be(x) (*(unsigned *)(x)) | |
589 | - | |
590 | -#define RAM_START 0xc0000000 | |
591 | -#define PROG_START RAM_START | |
592 | -#define RAM_END (RAM_START + 0x800000) /* only 8M mapped with BATs */ | |
593 | - | |
594 | -char *avail_ram; | |
595 | -char *end_avail; | |
596 | - | |
597 | -extern char _start[], _end[]; | |
598 | -extern char image_data[]; | |
599 | -extern int image_len; | |
600 | -extern char initrd_data[]; | |
601 | -extern int initrd_len; | |
602 | - | |
603 | - | |
604 | -boot(int a1, int a2, void *prom) | |
605 | -{ | |
606 | - int ns, oh, i; | |
607 | - unsigned sa, len; | |
608 | - void *dst; | |
609 | - unsigned char *im; | |
610 | - unsigned initrd_start, initrd_size; | |
611 | - | |
612 | - printf("coffboot starting: loaded at 0x%x\n", _start); | |
613 | - setup_bats(RAM_START); | |
614 | - if (initrd_len) { | |
615 | - initrd_size = initrd_len; | |
616 | - initrd_start = (RAM_END - initrd_size) & ~0xFFF; | |
617 | - a1 = initrd_start; | |
618 | - a2 = initrd_size; | |
619 | - claim(initrd_start - RAM_START, RAM_END - initrd_start, 0); | |
620 | - printf("initial ramdisk moving 0x%x <- 0x%x (%x bytes)\n", | |
621 | - initrd_start, initrd_data, initrd_size); | |
622 | - memcpy((char *)initrd_start, initrd_data, initrd_size); | |
623 | - } | |
624 | - im = image_data; | |
625 | - len = image_len; | |
626 | - /* claim 3MB starting at 0 */ | |
627 | - claim(0, 3 << 20, 0); | |
628 | - dst = (void *) RAM_START; | |
629 | - if (im[0] == 0x1f && im[1] == 0x8b) { | |
630 | - /* claim 512kB for scratch space */ | |
631 | - avail_ram = claim(0, 512 << 10, 0x10) + RAM_START; | |
632 | - end_avail = avail_ram + (512 << 10); | |
633 | - printf("avail_ram = %x\n", avail_ram); | |
634 | - printf("gunzipping (0x%x <- 0x%x:0x%0x)...", dst, im, im+len); | |
635 | - gunzip(dst, 3 << 20, im, &len); | |
636 | - printf("done %u bytes\n", len); | |
637 | - } else { | |
638 | - memmove(dst, im, len); | |
639 | - } | |
640 | - | |
641 | - flush_cache(dst, len); | |
642 | - | |
643 | - sa = (unsigned long)PROG_START; | |
644 | - printf("start address = 0x%x\n", sa); | |
645 | - | |
646 | -#if 0 | |
647 | - pause(); | |
648 | -#endif | |
649 | - (*(void (*)())sa)(a1, a2, prom); | |
650 | - | |
651 | - printf("returned?\n"); | |
652 | - | |
653 | - pause(); | |
654 | -} | |
655 | - | |
656 | -void *zalloc(void *x, unsigned items, unsigned size) | |
657 | -{ | |
658 | - void *p = avail_ram; | |
659 | - | |
660 | - size *= items; | |
661 | - size = (size + 7) & -8; | |
662 | - avail_ram += size; | |
663 | - if (avail_ram > end_avail) { | |
664 | - printf("oops... out of memory\n"); | |
665 | - pause(); | |
666 | - } | |
667 | - return p; | |
668 | -} | |
669 | - | |
670 | -void zfree(void *x, void *addr, unsigned nb) | |
671 | -{ | |
672 | -} | |
673 | - | |
674 | -#define HEAD_CRC 2 | |
675 | -#define EXTRA_FIELD 4 | |
676 | -#define ORIG_NAME 8 | |
677 | -#define COMMENT 0x10 | |
678 | -#define RESERVED 0xe0 | |
679 | - | |
680 | -#define DEFLATED 8 | |
681 | - | |
682 | -void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp) | |
683 | -{ | |
684 | - z_stream s; | |
685 | - int r, i, flags; | |
686 | - | |
687 | - /* skip header */ | |
688 | - i = 10; | |
689 | - flags = src[3]; | |
690 | - if (src[2] != DEFLATED || (flags & RESERVED) != 0) { | |
691 | - printf("bad gzipped data\n"); | |
692 | - exit(); | |
693 | - } | |
694 | - if ((flags & EXTRA_FIELD) != 0) | |
695 | - i = 12 + src[10] + (src[11] << 8); | |
696 | - if ((flags & ORIG_NAME) != 0) | |
697 | - while (src[i++] != 0) | |
698 | - ; | |
699 | - if ((flags & COMMENT) != 0) | |
700 | - while (src[i++] != 0) | |
701 | - ; | |
702 | - if ((flags & HEAD_CRC) != 0) | |
703 | - i += 2; | |
704 | - if (i >= *lenp) { | |
705 | - printf("gunzip: ran out of data in header\n"); | |
706 | - exit(); | |
707 | - } | |
708 | - | |
709 | - s.zalloc = zalloc; | |
710 | - s.zfree = zfree; | |
711 | - r = inflateInit2(&s, -MAX_WBITS); | |
712 | - if (r != Z_OK) { | |
713 | - printf("inflateInit2 returned %d\n", r); | |
714 | - exit(); | |
715 | - } | |
716 | - s.next_in = src + i; | |
717 | - s.avail_in = *lenp - i; | |
718 | - s.next_out = dst; | |
719 | - s.avail_out = dstlen; | |
720 | - r = inflate(&s, Z_FINISH); | |
721 | - if (r != Z_OK && r != Z_STREAM_END) { | |
722 | - printf("inflate returned %d msg: %s\n", r, s.msg); | |
723 | - exit(); | |
724 | - } | |
725 | - *lenp = s.next_out - (unsigned char *) dst; | |
726 | - inflateEnd(&s); | |
727 | -} | |
728 | diff -urN linux.orig/arch/ppc/coffboot/crt0.S linux/arch/ppc/coffboot/crt0.S | |
729 | --- linux.orig/arch/ppc/coffboot/crt0.S Sun Mar 25 18:31:49 2001 | |
730 | +++ linux/arch/ppc/coffboot/crt0.S Thu Jul 11 15:43:29 2002 | |
731 | @@ -9,6 +9,10 @@ | |
732 | .text | |
733 | .globl _start | |
734 | _start: | |
735 | + .long __start,0,0 | |
736 | + | |
737 | + .globl __start | |
738 | +__start: | |
739 | lis 9,_start@h | |
740 | lis 8,_etext@ha | |
741 | addi 8,8,_etext@l | |
742 | diff -urN linux.orig/arch/ppc/coffboot/dummy.c linux/arch/ppc/coffboot/dummy.c | |
743 | --- linux.orig/arch/ppc/coffboot/dummy.c Sun Mar 25 18:31:49 2001 | |
744 | +++ linux/arch/ppc/coffboot/dummy.c Thu Jan 1 01:00:00 1970 | |
745 | @@ -1,4 +0,0 @@ | |
746 | -int main(void) | |
747 | -{ | |
748 | - return 0; | |
749 | -} | |
750 | diff -urN linux.orig/arch/ppc/coffboot/misc.S linux/arch/ppc/coffboot/misc.S | |
751 | --- linux.orig/arch/ppc/coffboot/misc.S Sun Mar 25 18:31:49 2001 | |
752 | +++ linux/arch/ppc/coffboot/misc.S Thu Jul 11 15:43:29 2002 | |
753 | @@ -14,26 +14,23 @@ | |
754 | */ | |
755 | .globl setup_bats | |
756 | setup_bats: | |
757 | - mfpvr 5 | |
758 | - rlwinm 5,5,16,16,31 /* r3 = 1 for 601, 4 for 604 */ | |
759 | - cmpi 0,5,1 | |
760 | - li 0,0 | |
761 | + mr 4,3 | |
762 | + mfpvr 3 | |
763 | + rlwinm 3,3,16,16,31 /* r3 = 1 for 601, 4 for 604 */ | |
764 | + cmpi 0,3,1 | |
765 | bne 4f | |
766 | - mtibatl 3,0 /* invalidate BAT first */ | |
767 | - ori 3,3,4 /* set up BAT registers for 601 */ | |
768 | - li 4,0x7f | |
769 | - mtibatu 3,3 | |
770 | - mtibatl 3,4 | |
771 | - b 5f | |
772 | -4: mtdbatu 3,0 /* invalidate BATs first */ | |
773 | - mtibatu 3,0 | |
774 | - ori 3,3,0xff /* set up BAT registers for 604 */ | |
775 | - li 4,2 | |
776 | - mtdbatl 3,4 | |
777 | - mtdbatu 3,3 | |
778 | - mtibatl 3,4 | |
779 | - mtibatu 3,3 | |
780 | -5: sync | |
781 | + ori 4,4,4 /* set up BAT registers for 601 */ | |
782 | + li 5,0x7f | |
783 | + mtibatu 3,4 | |
784 | + mtibatl 3,5 | |
785 | + isync | |
786 | + blr | |
787 | +4: ori 4,4,0xfe /* set up BAT registers for 604 */ | |
788 | + li 5,2 | |
789 | + mtdbatl 3,5 | |
790 | + mtdbatu 3,4 | |
791 | + mtibatl 3,5 | |
792 | + mtibatu 3,4 | |
793 | isync | |
794 | blr | |
795 | ||
796 | diff -urN linux.orig/arch/ppc/coffboot/mknote.c linux/arch/ppc/coffboot/mknote.c | |
797 | --- linux.orig/arch/ppc/coffboot/mknote.c Sun Mar 25 18:31:49 2001 | |
798 | +++ linux/arch/ppc/coffboot/mknote.c Thu Jan 1 01:00:00 1970 | |
799 | @@ -1,43 +0,0 @@ | |
800 | -/* | |
801 | - * Copyright (C) Cort Dougan 1999. | |
802 | - * | |
803 | - * This program is free software; you can redistribute it and/or | |
804 | - * modify it under the terms of the GNU General Public License | |
805 | - * as published by the Free Software Foundation; either version | |
806 | - * 2 of the License, or (at your option) any later version. | |
807 | - * | |
808 | - * Generate a note section as per the CHRP specification. | |
809 | - * | |
810 | - */ | |
811 | - | |
812 | -#include <stdio.h> | |
813 | - | |
814 | -#define PL(x) printf("%c%c%c%c", ((x)>>24)&0xff, ((x)>>16)&0xff, ((x)>>8)&0xff, (x)&0xff ); | |
815 | - | |
816 | -int main(void) | |
817 | -{ | |
818 | -/* header */ | |
819 | - /* namesz */ | |
820 | - PL(strlen("PowerPC")+1); | |
821 | - /* descrsz */ | |
822 | - PL(6*4); | |
823 | - /* type */ | |
824 | - PL(0x1275); | |
825 | - /* name */ | |
826 | - printf("PowerPC"); printf("%c", 0); | |
827 | - | |
828 | -/* descriptor */ | |
829 | - /* real-mode */ | |
830 | - PL(0xffffffff); | |
831 | - /* real-base */ | |
832 | - PL(0x00c00000); | |
833 | - /* real-size */ | |
834 | - PL(0xffffffff); | |
835 | - /* virt-base */ | |
836 | - PL(0xffffffff); | |
837 | - /* virt-size */ | |
838 | - PL(0xffffffff); | |
839 | - /* load-base */ | |
840 | - PL(0x4000); | |
841 | - return 0; | |
842 | -} | |
843 | diff -urN linux.orig/arch/ppc/coffboot/no_initrd.c linux/arch/ppc/coffboot/no_initrd.c | |
844 | --- linux.orig/arch/ppc/coffboot/no_initrd.c Sun Mar 25 18:31:49 2001 | |
845 | +++ linux/arch/ppc/coffboot/no_initrd.c Thu Jan 1 01:00:00 1970 | |
846 | @@ -1,2 +0,0 @@ | |
847 | -char initrd_data[1]; | |
848 | -int initrd_len = 0; | |
849 | diff -urN linux.orig/arch/ppc/coffboot/piggyback.c linux/arch/ppc/coffboot/piggyback.c | |
850 | --- linux.orig/arch/ppc/coffboot/piggyback.c Sun Mar 25 18:31:49 2001 | |
851 | +++ linux/arch/ppc/coffboot/piggyback.c Thu Jan 1 01:00:00 1970 | |
852 | @@ -1,65 +0,0 @@ | |
853 | -#include <stdio.h> | |
854 | - | |
855 | -extern long ce_exec_config[]; | |
856 | - | |
857 | -main(int argc, char *argv[]) | |
858 | -{ | |
859 | - int i, cnt, pos, len; | |
860 | - unsigned int cksum, val; | |
861 | - unsigned char *lp; | |
862 | - unsigned char buf[8192]; | |
863 | - if (argc != 2) | |
864 | - { | |
865 | - fprintf(stderr, "usage: %s name <in-file >out-file\n", | |
866 | - argv[0]); | |
867 | - exit(1); | |
868 | - } | |
869 | - fprintf(stdout, "#\n"); | |
870 | - fprintf(stdout, "# Miscellaneous data structures:\n"); | |
871 | - fprintf(stdout, "# WARNING - this file is automatically generated!\n"); | |
872 | - fprintf(stdout, "#\n"); | |
873 | - fprintf(stdout, "\n"); | |
874 | - fprintf(stdout, "\t.data\n"); | |
875 | - fprintf(stdout, "\t.globl %s_data\n", argv[1]); | |
876 | - fprintf(stdout, "%s_data:\n", argv[1]); | |
877 | - pos = 0; | |
878 | - cksum = 0; | |
879 | - while ((len = read(0, buf, sizeof(buf))) > 0) | |
880 | - { | |
881 | - cnt = 0; | |
882 | - lp = (unsigned char *)buf; | |
883 | - len = (len + 3) & ~3; /* Round up to longwords */ | |
884 | - for (i = 0; i < len; i += 4) | |
885 | - { | |
886 | - if (cnt == 0) | |
887 | - { | |
888 | - fprintf(stdout, "\t.long\t"); | |
889 | - } | |
890 | - fprintf(stdout, "0x%02X%02X%02X%02X", lp[0], lp[1], lp[2], lp[3]); | |
891 | - val = *(unsigned long *)lp; | |
892 | - cksum ^= val; | |
893 | - lp += 4; | |
894 | - if (++cnt == 4) | |
895 | - { | |
896 | - cnt = 0; | |
897 | - fprintf(stdout, " # %x \n", pos+i-12); | |
898 | - fflush(stdout); | |
899 | - } else | |
900 | - { | |
901 | - fprintf(stdout, ","); | |
902 | - } | |
903 | - } | |
904 | - if (cnt) | |
905 | - { | |
906 | - fprintf(stdout, "0\n"); | |
907 | - } | |
908 | - pos += len; | |
909 | - } | |
910 | - fprintf(stdout, "\t.globl %s_len\n", argv[1]); | |
911 | - fprintf(stdout, "%s_len:\t.long\t0x%x\n", argv[1], pos); | |
912 | - fflush(stdout); | |
913 | - fclose(stdout); | |
914 | - fprintf(stderr, "cksum = %x\n", cksum); | |
915 | - exit(0); | |
916 | -} | |
917 | - | |
918 | diff -urN linux.orig/arch/ppc/coffboot/start.c linux/arch/ppc/coffboot/start.c | |
919 | --- linux.orig/arch/ppc/coffboot/start.c Sun Mar 25 18:31:49 2001 | |
920 | +++ linux/arch/ppc/coffboot/start.c Thu Jul 11 15:43:29 2002 | |
921 | @@ -33,7 +33,7 @@ | |
922 | if (getprop(chosen_handle, "stdin", &stdin, sizeof(stdin)) != 4) | |
923 | exit(); | |
924 | ||
925 | - boot(a1, a2, promptr); | |
926 | + coffboot(a1, a2, promptr); | |
927 | for (;;) | |
928 | exit(); | |
929 | } | |
930 | @@ -62,25 +62,6 @@ | |
931 | return args.actual; | |
932 | } | |
933 | ||
934 | -int writestring(void *f, char *ptr, int nb) | |
935 | -{ | |
936 | - int w = 0, i; | |
937 | - char *ret = "\r"; | |
938 | - | |
939 | - for (i = 0; i < nb; ++i) { | |
940 | - if (ptr[i] == '\n') { | |
941 | - if (i > w) { | |
942 | - write(f, ptr + w, i - w); | |
943 | - w = i; | |
944 | - } | |
945 | - write(f, ret, 1); | |
946 | - } | |
947 | - } | |
948 | - if (w < nb) | |
949 | - write(f, ptr + w, nb - w); | |
950 | - return nb; | |
951 | -} | |
952 | - | |
953 | int | |
954 | read(void *handle, void *ptr, int nb) | |
955 | { | |
956 | @@ -149,29 +130,6 @@ | |
957 | return args.phandle; | |
958 | } | |
959 | ||
960 | -void * | |
961 | -claim(unsigned int virt, unsigned int size, unsigned int align) | |
962 | -{ | |
963 | - struct prom_args { | |
964 | - char *service; | |
965 | - int nargs; | |
966 | - int nret; | |
967 | - unsigned int virt; | |
968 | - unsigned int size; | |
969 | - unsigned int align; | |
970 | - void *ret; | |
971 | - } args; | |
972 | - | |
973 | - args.service = "claim"; | |
974 | - args.nargs = 3; | |
975 | - args.nret = 1; | |
976 | - args.virt = virt; | |
977 | - args.size = size; | |
978 | - args.align = align; | |
979 | - (*prom)(&args); | |
980 | - return args.ret; | |
981 | -} | |
982 | - | |
983 | int | |
984 | getprop(void *phandle, const char *name, void *buf, int buflen) | |
985 | { | |
986 | @@ -203,7 +161,9 @@ | |
987 | { | |
988 | char ch = c; | |
989 | ||
990 | - return writestring(f, &ch, 1) == 1? c: -1; | |
991 | + if (c == '\n') | |
992 | + putc('\r', f); | |
993 | + return write(f, &ch, 1) == 1? c: -1; | |
994 | } | |
995 | ||
996 | int | |
997 | @@ -217,7 +177,7 @@ | |
998 | { | |
999 | int n = strlen(str); | |
1000 | ||
1001 | - return writestring(f, str, n) == n? 0: -1; | |
1002 | + return write(f, str, n) == n? 0: -1; | |
1003 | } | |
1004 | ||
1005 | int | |
1006 | @@ -230,7 +190,7 @@ | |
1007 | case 1: | |
1008 | return ch; | |
1009 | case -1: | |
1010 | - printk("read(stdin) returned -1\n"); | |
1011 | + printk("read(stdin) returned -1\r\n"); | |
1012 | return -1; | |
1013 | } | |
1014 | } | |
1015 | @@ -304,7 +264,7 @@ | |
1016 | va_start(args, fmt); | |
1017 | n = vsprintf(sprint_buf, fmt, args); | |
1018 | va_end(args); | |
1019 | - writestring(stdout, sprint_buf, n); | |
1020 | + write(stdout, sprint_buf, n); | |
1021 | } | |
1022 | ||
1023 | int | |
1024 | @@ -316,6 +276,6 @@ | |
1025 | va_start(args, fmt); | |
1026 | n = vsprintf(sprint_buf, fmt, args); | |
1027 | va_end(args); | |
1028 | - writestring(stdout, sprint_buf, n); | |
1029 | + write(stdout, sprint_buf, n); | |
1030 | return n; | |
1031 | } | |
1032 | diff -urN linux.orig/arch/ppc/common_defconfig linux/arch/ppc/common_defconfig | |
1033 | --- linux.orig/arch/ppc/common_defconfig Sun Mar 25 18:31:50 2001 | |
1034 | +++ linux/arch/ppc/common_defconfig Thu Jul 11 15:43:29 2002 | |
1035 | @@ -1,5 +1,5 @@ | |
1036 | # | |
1037 | -# Automatically generated make config: don't edit | |
1038 | +# Automatically generated by make menuconfig: don't edit | |
1039 | # | |
1040 | ||
1041 | # | |
1042 | @@ -16,7 +16,6 @@ | |
1043 | # CONFIG_GEMINI is not set | |
1044 | # CONFIG_MBX is not set | |
1045 | # CONFIG_SMP is not set | |
1046 | -CONFIG_ALTIVEC=y | |
1047 | CONFIG_6xx=y | |
1048 | ||
1049 | # | |
1050 | @@ -24,7 +23,7 @@ | |
1051 | # | |
1052 | CONFIG_EXPERIMENTAL=y | |
1053 | CONFIG_MODULES=y | |
1054 | -# CONFIG_MODVERSIONS is not set | |
1055 | +CONFIG_MODVERSIONS=y | |
1056 | CONFIG_KMOD=y | |
1057 | CONFIG_PCI=y | |
1058 | # CONFIG_PCI_QUIRKS is not set | |
1059 | @@ -35,17 +34,17 @@ | |
1060 | # CONFIG_BSD_PROCESS_ACCT is not set | |
1061 | CONFIG_BINFMT_ELF=y | |
1062 | CONFIG_KERNEL_ELF=y | |
1063 | -CONFIG_BINFMT_MISC=y | |
1064 | +# CONFIG_BINFMT_MISC is not set | |
1065 | # CONFIG_BINFMT_JAVA is not set | |
1066 | -CONFIG_PARPORT=m | |
1067 | -# CONFIG_PARPORT_PC is not set | |
1068 | +# CONFIG_PARPORT is not set | |
1069 | CONFIG_VGA_CONSOLE=y | |
1070 | CONFIG_FB=y | |
1071 | +CONFIG_FB_COMPAT_XPMAC=y | |
1072 | CONFIG_PMAC_PBOOK=y | |
1073 | CONFIG_MAC_KEYBOARD=y | |
1074 | CONFIG_MAC_FLOPPY=y | |
1075 | CONFIG_MAC_SERIAL=y | |
1076 | -# CONFIG_PPC_RTC is not set | |
1077 | +# CONFIG_SERIAL_CONSOLE is not set | |
1078 | CONFIG_ADBMOUSE=y | |
1079 | CONFIG_PROC_DEVICETREE=y | |
1080 | # CONFIG_TOTALMP is not set | |
1081 | @@ -63,10 +62,6 @@ | |
1082 | # | |
1083 | CONFIG_BLK_DEV_FD=y | |
1084 | CONFIG_BLK_DEV_IDE=y | |
1085 | - | |
1086 | -# | |
1087 | -# Please see Documentation/ide.txt for help/info on IDE drives | |
1088 | -# | |
1089 | # CONFIG_BLK_DEV_HD_IDE is not set | |
1090 | CONFIG_BLK_DEV_IDEDISK=y | |
1091 | CONFIG_BLK_DEV_IDECD=y | |
1092 | @@ -75,35 +70,21 @@ | |
1093 | # CONFIG_BLK_DEV_IDESCSI is not set | |
1094 | # CONFIG_BLK_DEV_CMD640 is not set | |
1095 | # CONFIG_BLK_DEV_RZ1000 is not set | |
1096 | -CONFIG_BLK_DEV_IDEPCI=y | |
1097 | -CONFIG_BLK_DEV_IDEDMA=y | |
1098 | -# CONFIG_BLK_DEV_OFFBOARD is not set | |
1099 | -CONFIG_IDEDMA_AUTO=y | |
1100 | -# CONFIG_BLK_DEV_OPTI621 is not set | |
1101 | -# CONFIG_BLK_DEV_TRM290 is not set | |
1102 | -# CONFIG_BLK_DEV_NS87415 is not set | |
1103 | -# CONFIG_BLK_DEV_VIA82C586 is not set | |
1104 | -CONFIG_BLK_DEV_CMD646=y | |
1105 | -# CONFIG_BLK_DEV_CS5530 is not set | |
1106 | -# CONFIG_BLK_DEV_SL82C105 is not set | |
1107 | +# CONFIG_BLK_DEV_IDEPCI is not set | |
1108 | +CONFIG_BLK_DEV_SL82C105=y | |
1109 | CONFIG_BLK_DEV_IDE_PMAC=y | |
1110 | CONFIG_BLK_DEV_IDEDMA_PMAC=y | |
1111 | CONFIG_BLK_DEV_IDEDMA=y | |
1112 | CONFIG_PMAC_IDEDMA_AUTO=y | |
1113 | # CONFIG_IDE_CHIPSETS is not set | |
1114 | - | |
1115 | -# | |
1116 | -# Additional Block Devices | |
1117 | -# | |
1118 | CONFIG_BLK_DEV_LOOP=y | |
1119 | # CONFIG_BLK_DEV_NBD is not set | |
1120 | # CONFIG_BLK_DEV_MD is not set | |
1121 | CONFIG_BLK_DEV_RAM=y | |
1122 | -CONFIG_BLK_DEV_RAM_SIZE=4096 | |
1123 | CONFIG_BLK_DEV_INITRD=y | |
1124 | # CONFIG_BLK_DEV_XD is not set | |
1125 | # CONFIG_BLK_DEV_DAC960 is not set | |
1126 | -CONFIG_PARIDE_PARPORT=m | |
1127 | +CONFIG_PARIDE_PARPORT=y | |
1128 | # CONFIG_PARIDE is not set | |
1129 | # CONFIG_BLK_CPQ_DA is not set | |
1130 | # CONFIG_BLK_DEV_HD is not set | |
1131 | @@ -115,44 +96,22 @@ | |
1132 | CONFIG_NETLINK=y | |
1133 | # CONFIG_RTNETLINK is not set | |
1134 | # CONFIG_NETLINK_DEV is not set | |
1135 | -CONFIG_FIREWALL=y | |
1136 | +# CONFIG_FIREWALL is not set | |
1137 | # CONFIG_FILTER is not set | |
1138 | CONFIG_UNIX=y | |
1139 | CONFIG_INET=y | |
1140 | CONFIG_IP_MULTICAST=y | |
1141 | # CONFIG_IP_ADVANCED_ROUTER is not set | |
1142 | # CONFIG_IP_PNP is not set | |
1143 | -CONFIG_IP_FIREWALL=y | |
1144 | -# CONFIG_IP_FIREWALL_NETLINK is not set | |
1145 | -CONFIG_IP_TRANSPARENT_PROXY=y | |
1146 | -CONFIG_IP_MASQUERADE=y | |
1147 | - | |
1148 | -# | |
1149 | -# Protocol-specific masquerading support will be built as modules. | |
1150 | -# | |
1151 | -# CONFIG_IP_MASQUERADE_ICMP is not set | |
1152 | - | |
1153 | -# | |
1154 | -# Protocol-specific masquerading support will be built as modules. | |
1155 | -# | |
1156 | -# CONFIG_IP_MASQUERADE_MOD is not set | |
1157 | # CONFIG_IP_ROUTER is not set | |
1158 | # CONFIG_NET_IPIP is not set | |
1159 | # CONFIG_NET_IPGRE is not set | |
1160 | # CONFIG_IP_MROUTE is not set | |
1161 | CONFIG_IP_ALIAS=y | |
1162 | CONFIG_SYN_COOKIES=y | |
1163 | - | |
1164 | -# | |
1165 | -# (it is safe to leave these untouched) | |
1166 | -# | |
1167 | CONFIG_INET_RARP=y | |
1168 | CONFIG_SKB_LARGE=y | |
1169 | # CONFIG_IPV6 is not set | |
1170 | - | |
1171 | -# | |
1172 | -# | |
1173 | -# | |
1174 | # CONFIG_IPX is not set | |
1175 | CONFIG_ATALK=m | |
1176 | # CONFIG_X25 is not set | |
1177 | @@ -174,19 +133,11 @@ | |
1178 | # SCSI support | |
1179 | # | |
1180 | CONFIG_SCSI=y | |
1181 | - | |
1182 | -# | |
1183 | -# SCSI support type (disk, tape, CD-ROM) | |
1184 | -# | |
1185 | CONFIG_BLK_DEV_SD=y | |
1186 | CONFIG_CHR_DEV_ST=y | |
1187 | CONFIG_BLK_DEV_SR=y | |
1188 | CONFIG_BLK_DEV_SR_VENDOR=y | |
1189 | -# CONFIG_CHR_DEV_SG is not set | |
1190 | - | |
1191 | -# | |
1192 | -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs | |
1193 | -# | |
1194 | +CONFIG_CHR_DEV_SG=y | |
1195 | # CONFIG_SCSI_MULTI_LUN is not set | |
1196 | CONFIG_SCSI_CONSTANTS=y | |
1197 | # CONFIG_SCSI_LOGGING is not set | |
1198 | @@ -194,7 +145,6 @@ | |
1199 | # | |
1200 | # SCSI low-level drivers | |
1201 | # | |
1202 | -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set | |
1203 | # CONFIG_SCSI_7000FASST is not set | |
1204 | # CONFIG_SCSI_ACARD is not set | |
1205 | # CONFIG_SCSI_AHA152X is not set | |
1206 | @@ -220,13 +170,11 @@ | |
1207 | # CONFIG_SCSI_GENERIC_NCR5380 is not set | |
1208 | # CONFIG_SCSI_INITIO is not set | |
1209 | # CONFIG_SCSI_INIA100 is not set | |
1210 | -# CONFIG_SCSI_PPA is not set | |
1211 | -# CONFIG_SCSI_IMM is not set | |
1212 | # CONFIG_SCSI_NCR53C406A is not set | |
1213 | # CONFIG_SCSI_SYM53C416 is not set | |
1214 | # CONFIG_SCSI_SIM710 is not set | |
1215 | # CONFIG_SCSI_NCR53C7xx is not set | |
1216 | -CONFIG_SCSI_NCR53C8XX=y | |
1217 | +# CONFIG_SCSI_NCR53C8XX is not set | |
1218 | CONFIG_SCSI_SYM53C8XX=y | |
1219 | CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8 | |
1220 | CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 | |
1221 | @@ -234,7 +182,7 @@ | |
1222 | # CONFIG_SCSI_NCR53C8XX_PROFILE is not set | |
1223 | # CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set | |
1224 | # CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set | |
1225 | -CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT=y | |
1226 | +# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set | |
1227 | # CONFIG_SCSI_PAS16 is not set | |
1228 | # CONFIG_SCSI_PCI2000 is not set | |
1229 | # CONFIG_SCSI_PCI2220I is not set | |
1230 | @@ -262,7 +210,6 @@ | |
1231 | # | |
1232 | # CONFIG_ARCNET is not set | |
1233 | # CONFIG_DUMMY is not set | |
1234 | -# CONFIG_BONDING is not set | |
1235 | # CONFIG_EQUALIZER is not set | |
1236 | # CONFIG_ETHERTAP is not set | |
1237 | # CONFIG_NET_SB1000 is not set | |
1238 | @@ -272,25 +219,24 @@ | |
1239 | # | |
1240 | CONFIG_NET_ETHERNET=y | |
1241 | CONFIG_MACE=y | |
1242 | -# CONFIG_MACE_AAUI_PORT is not set | |
1243 | CONFIG_BMAC=y | |
1244 | -CONFIG_GMAC=y | |
1245 | # CONFIG_NCR885E is not set | |
1246 | # CONFIG_NET_VENDOR_3COM is not set | |
1247 | # CONFIG_LANCE is not set | |
1248 | # CONFIG_NET_VENDOR_SMC is not set | |
1249 | # CONFIG_NET_VENDOR_RACAL is not set | |
1250 | # CONFIG_RTL8139 is not set | |
1251 | +# CONFIG_YELLOWFIN is not set | |
1252 | # CONFIG_NET_ISA is not set | |
1253 | CONFIG_NET_EISA=y | |
1254 | CONFIG_PCNET32=y | |
1255 | +# CONFIG_ACENIC is not set | |
1256 | # CONFIG_AC3200 is not set | |
1257 | # CONFIG_APRICOT is not set | |
1258 | # CONFIG_CS89x0 is not set | |
1259 | # CONFIG_DM9102 is not set | |
1260 | CONFIG_DE4X5=y | |
1261 | # CONFIG_DEC_ELCP is not set | |
1262 | -# CONFIG_DEC_ELCP_OLD is not set | |
1263 | # CONFIG_DGRS is not set | |
1264 | # CONFIG_EEXPRESS_PRO100 is not set | |
1265 | # CONFIG_LNE390 is not set | |
1266 | @@ -303,14 +249,6 @@ | |
1267 | # CONFIG_EPIC100 is not set | |
1268 | # CONFIG_ZNET is not set | |
1269 | # CONFIG_NET_POCKET is not set | |
1270 | - | |
1271 | -# | |
1272 | -# Ethernet (1000 Mbit) | |
1273 | -# | |
1274 | -# CONFIG_ACENIC is not set | |
1275 | -# CONFIG_HAMACHI is not set | |
1276 | -# CONFIG_YELLOWFIN is not set | |
1277 | -# CONFIG_SK98LIN is not set | |
1278 | # CONFIG_FDDI is not set | |
1279 | # CONFIG_HIPPI is not set | |
1280 | ||
1281 | @@ -320,12 +258,7 @@ | |
1282 | # CONFIG_LTPC is not set | |
1283 | # CONFIG_COPS is not set | |
1284 | # CONFIG_IPDDP is not set | |
1285 | -# CONFIG_PLIP is not set | |
1286 | CONFIG_PPP=y | |
1287 | - | |
1288 | -# | |
1289 | -# CCP compressors for PPP are only built as modules. | |
1290 | -# | |
1291 | # CONFIG_SLIP is not set | |
1292 | # CONFIG_NET_RADIO is not set | |
1293 | ||
1294 | @@ -343,10 +276,7 @@ | |
1295 | # CONFIG_HOSTESS_SV11 is not set | |
1296 | # CONFIG_COSA is not set | |
1297 | # CONFIG_SEALEVEL_4021 is not set | |
1298 | -# CONFIG_SYNCLINK_SYNCPPP is not set | |
1299 | -# CONFIG_LANMEDIA is not set | |
1300 | # CONFIG_COMX is not set | |
1301 | -# CONFIG_HDLC is not set | |
1302 | # CONFIG_DLCI is not set | |
1303 | # CONFIG_SBNI is not set | |
1304 | ||
1305 | @@ -356,11 +286,6 @@ | |
1306 | # CONFIG_HAMRADIO is not set | |
1307 | ||
1308 | # | |
1309 | -# IrDA (infrared) support | |
1310 | -# | |
1311 | -# CONFIG_IRDA is not set | |
1312 | - | |
1313 | -# | |
1314 | # ISDN subsystem | |
1315 | # | |
1316 | # CONFIG_ISDN is not set | |
1317 | @@ -375,7 +300,6 @@ | |
1318 | # | |
1319 | CONFIG_DUMMY_CONSOLE=y | |
1320 | # CONFIG_FB_PM2 is not set | |
1321 | -CONFIG_FB_ATY=y | |
1322 | CONFIG_FB_OF=y | |
1323 | CONFIG_FB_CONTROL=y | |
1324 | CONFIG_FB_PLATINUM=y | |
1325 | @@ -383,12 +307,12 @@ | |
1326 | CONFIG_FB_IMSTT=y | |
1327 | CONFIG_FB_CT65550=y | |
1328 | # CONFIG_FB_S3TRIO is not set | |
1329 | -CONFIG_FB_COMPAT_XPMAC=y | |
1330 | CONFIG_FB_MATROX=y | |
1331 | -CONFIG_FB_MATROX_MILLENIUM=y | |
1332 | +# CONFIG_FB_MATROX_MILLENIUM is not set | |
1333 | CONFIG_FB_MATROX_MYSTIQUE=y | |
1334 | CONFIG_FB_MATROX_G100=y | |
1335 | -CONFIG_FB_MATROX_MULTIHEAD=y | |
1336 | +# CONFIG_FB_MATROX_MULTIHEAD is not set | |
1337 | +CONFIG_FB_ATY=y | |
1338 | # CONFIG_FB_VIRTUAL is not set | |
1339 | # CONFIG_FBCON_ADVANCED is not set | |
1340 | CONFIG_FBCON_CFB8=y | |
1341 | @@ -415,7 +339,6 @@ | |
1342 | # CONFIG_SERIAL_NONSTANDARD is not set | |
1343 | CONFIG_UNIX98_PTYS=y | |
1344 | CONFIG_UNIX98_PTY_COUNT=256 | |
1345 | -# CONFIG_PRINTER is not set | |
1346 | CONFIG_MOUSE=y | |
1347 | ||
1348 | # | |
1349 | @@ -427,11 +350,6 @@ | |
1350 | CONFIG_PSMOUSE=y | |
1351 | # CONFIG_82C710_MOUSE is not set | |
1352 | # CONFIG_PC110_PAD is not set | |
1353 | - | |
1354 | -# | |
1355 | -# Joysticks | |
1356 | -# | |
1357 | -# CONFIG_JOYSTICK is not set | |
1358 | # CONFIG_QIC02_TAPE is not set | |
1359 | # CONFIG_WATCHDOG is not set | |
1360 | CONFIG_NVRAM=y | |
1361 | @@ -441,16 +359,20 @@ | |
1362 | # Video For Linux | |
1363 | # | |
1364 | # CONFIG_VIDEO_DEV is not set | |
1365 | + | |
1366 | +# | |
1367 | +# Joystick support | |
1368 | +# | |
1369 | +# CONFIG_JOYSTICK is not set | |
1370 | # CONFIG_DTLK is not set | |
1371 | ||
1372 | # | |
1373 | # Ftape, the floppy tape device driver | |
1374 | # | |
1375 | # CONFIG_FTAPE is not set | |
1376 | -# CONFIG_TOSHIBA is not set | |
1377 | ||
1378 | # | |
1379 | -# Support for USB | |
1380 | +# USB drivers - not for the faint of heart | |
1381 | # | |
1382 | # CONFIG_USB is not set | |
1383 | ||
1384 | @@ -462,10 +384,10 @@ | |
1385 | # CONFIG_ADFS_FS is not set | |
1386 | # CONFIG_AFFS_FS is not set | |
1387 | CONFIG_HFS_FS=y | |
1388 | -CONFIG_FAT_FS=m | |
1389 | -CONFIG_MSDOS_FS=m | |
1390 | +CONFIG_FAT_FS=y | |
1391 | +CONFIG_MSDOS_FS=y | |
1392 | # CONFIG_UMSDOS_FS is not set | |
1393 | -CONFIG_VFAT_FS=m | |
1394 | +CONFIG_VFAT_FS=y | |
1395 | CONFIG_ISO9660_FS=y | |
1396 | # CONFIG_JOLIET is not set | |
1397 | # CONFIG_MINIX_FS is not set | |
1398 | @@ -505,7 +427,6 @@ | |
1399 | # | |
1400 | # Native Language Support | |
1401 | # | |
1402 | -CONFIG_NLS_DEFAULT="cp437" | |
1403 | CONFIG_NLS_CODEPAGE_437=y | |
1404 | # CONFIG_NLS_CODEPAGE_737 is not set | |
1405 | # CONFIG_NLS_CODEPAGE_775 is not set | |
1406 | @@ -522,10 +443,6 @@ | |
1407 | # CONFIG_NLS_CODEPAGE_866 is not set | |
1408 | # CONFIG_NLS_CODEPAGE_869 is not set | |
1409 | # CONFIG_NLS_CODEPAGE_874 is not set | |
1410 | -# CONFIG_NLS_CODEPAGE_932 is not set | |
1411 | -# CONFIG_NLS_CODEPAGE_936 is not set | |
1412 | -# CONFIG_NLS_CODEPAGE_949 is not set | |
1413 | -# CONFIG_NLS_CODEPAGE_950 is not set | |
1414 | # CONFIG_NLS_ISO8859_1 is not set | |
1415 | # CONFIG_NLS_ISO8859_2 is not set | |
1416 | # CONFIG_NLS_ISO8859_3 is not set | |
1417 | @@ -536,17 +453,55 @@ | |
1418 | # CONFIG_NLS_ISO8859_8 is not set | |
1419 | # CONFIG_NLS_ISO8859_9 is not set | |
1420 | # CONFIG_NLS_ISO8859_14 is not set | |
1421 | -CONFIG_NLS_ISO8859_15=y | |
1422 | +# CONFIG_NLS_ISO8859_15 is not set | |
1423 | # CONFIG_NLS_KOI8_R is not set | |
1424 | ||
1425 | # | |
1426 | # Sound | |
1427 | # | |
1428 | -# CONFIG_SOUND is not set | |
1429 | +CONFIG_SOUND=y | |
1430 | +CONFIG_DMASOUND=y | |
1431 | +# CONFIG_SOUND_CMPCI is not set | |
1432 | +# CONFIG_SOUND_ES1370 is not set | |
1433 | +# CONFIG_SOUND_ES1371 is not set | |
1434 | +# CONFIG_SOUND_MAESTRO is not set | |
1435 | +# CONFIG_SOUND_ESSSOLO1 is not set | |
1436 | +# CONFIG_SOUND_SONICVIBES is not set | |
1437 | +# CONFIG_SOUND_MSNDCLAS is not set | |
1438 | +# CONFIG_SOUND_MSNDPIN is not set | |
1439 | +CONFIG_SOUND_OSS=y | |
1440 | +# CONFIG_SOUND_DMAP is not set | |
1441 | +# CONFIG_SOUND_PAS is not set | |
1442 | +# CONFIG_SOUND_SB is not set | |
1443 | +# CONFIG_SOUND_GUS is not set | |
1444 | +# CONFIG_SOUND_MPU401 is not set | |
1445 | +# CONFIG_SOUND_PSS is not set | |
1446 | +# CONFIG_SOUND_MSS is not set | |
1447 | +# CONFIG_SOUND_SSCAPE is not set | |
1448 | +# CONFIG_SOUND_TRIX is not set | |
1449 | +# CONFIG_SOUND_VIA82CXXX is not set | |
1450 | +# CONFIG_SOUND_MAD16 is not set | |
1451 | +# CONFIG_SOUND_WAVEFRONT is not set | |
1452 | +CONFIG_SOUND_CS4232=m | |
1453 | +# CONFIG_SOUND_OPL3SA2 is not set | |
1454 | +# CONFIG_SOUND_MAUI is not set | |
1455 | +# CONFIG_SOUND_SGALAXY is not set | |
1456 | +# CONFIG_SOUND_AD1816 is not set | |
1457 | +# CONFIG_SOUND_OPL3SA1 is not set | |
1458 | +# CONFIG_SOUND_SOFTOSS is not set | |
1459 | +# CONFIG_SOUND_YM3812 is not set | |
1460 | +# CONFIG_SOUND_VMIDI is not set | |
1461 | +# CONFIG_SOUND_UART6850 is not set | |
1462 | +# CONFIG_SOUND_NM256 is not set | |
1463 | + | |
1464 | +# | |
1465 | +# Additional low level sound drivers | |
1466 | +# | |
1467 | +# CONFIG_LOWLEVEL_SOUND is not set | |
1468 | ||
1469 | # | |
1470 | # Kernel hacking | |
1471 | # | |
1472 | -CONFIG_MAGIC_SYSRQ=y | |
1473 | +# CONFIG_MAGIC_SYSRQ is not set | |
1474 | # CONFIG_KGDB is not set | |
1475 | # CONFIG_XMON is not set | |
1476 | diff -urN linux.orig/arch/ppc/config.in linux/arch/ppc/config.in | |
1477 | --- linux.orig/arch/ppc/config.in Fri Nov 2 17:39:05 2001 | |
1478 | +++ linux/arch/ppc/config.in Thu Jul 11 15:43:29 2002 | |
1479 | @@ -22,10 +22,6 @@ | |
1480 | ||
1481 | bool 'Symmetric multi-processing support' CONFIG_SMP | |
1482 | ||
1483 | -if [ "$CONFIG_6xx" = "y" ]; then | |
1484 | - bool 'Altivec (G4) support' CONFIG_ALTIVEC | |
1485 | -fi | |
1486 | - | |
1487 | if [ "$CONFIG_ALL_PPC" != "y" ]; then | |
1488 | define_bool CONFIG_MACH_SPECIFIC y | |
1489 | fi | |
1490 | diff -urN linux.orig/arch/ppc/defconfig linux/arch/ppc/defconfig | |
1491 | --- linux.orig/arch/ppc/defconfig Sun Mar 25 18:31:49 2001 | |
1492 | +++ linux/arch/ppc/defconfig Thu Jul 11 15:43:29 2002 | |
1493 | @@ -1,5 +1,5 @@ | |
1494 | # | |
1495 | -# Automatically generated make config: don't edit | |
1496 | +# Automatically generated by make menuconfig: don't edit | |
1497 | # | |
1498 | ||
1499 | # | |
1500 | @@ -7,16 +7,15 @@ | |
1501 | # | |
1502 | CONFIG_PPC=y | |
1503 | CONFIG_6xx=y | |
1504 | -# CONFIG_PPC64 is not set | |
1505 | # CONFIG_8xx is not set | |
1506 | -CONFIG_PMAC=y | |
1507 | +# CONFIG_PMAC is not set | |
1508 | # CONFIG_PREP is not set | |
1509 | # CONFIG_CHRP is not set | |
1510 | -# CONFIG_ALL_PPC is not set | |
1511 | +CONFIG_ALL_PPC=y | |
1512 | # CONFIG_APUS is not set | |
1513 | +# CONFIG_GEMINI is not set | |
1514 | # CONFIG_MBX is not set | |
1515 | # CONFIG_SMP is not set | |
1516 | -CONFIG_MACH_SPECIFIC=y | |
1517 | CONFIG_6xx=y | |
1518 | ||
1519 | # | |
1520 | @@ -24,7 +23,7 @@ | |
1521 | # | |
1522 | CONFIG_EXPERIMENTAL=y | |
1523 | CONFIG_MODULES=y | |
1524 | -# CONFIG_MODVERSIONS is not set | |
1525 | +CONFIG_MODVERSIONS=y | |
1526 | CONFIG_KMOD=y | |
1527 | CONFIG_PCI=y | |
1528 | # CONFIG_PCI_QUIRKS is not set | |
1529 | @@ -35,11 +34,10 @@ | |
1530 | # CONFIG_BSD_PROCESS_ACCT is not set | |
1531 | CONFIG_BINFMT_ELF=y | |
1532 | CONFIG_KERNEL_ELF=y | |
1533 | -CONFIG_BINFMT_MISC=m | |
1534 | +# CONFIG_BINFMT_MISC is not set | |
1535 | # CONFIG_BINFMT_JAVA is not set | |
1536 | -CONFIG_PARPORT=m | |
1537 | -# CONFIG_PARPORT_PC is not set | |
1538 | -# CONFIG_VGA_CONSOLE is not set | |
1539 | +# CONFIG_PARPORT is not set | |
1540 | +CONFIG_VGA_CONSOLE=y | |
1541 | CONFIG_FB=y | |
1542 | CONFIG_FB_COMPAT_XPMAC=y | |
1543 | CONFIG_PMAC_PBOOK=y | |
1544 | @@ -52,6 +50,7 @@ | |
1545 | # CONFIG_TOTALMP is not set | |
1546 | CONFIG_BOOTX_TEXT=y | |
1547 | # CONFIG_MOTOROLA_HOTSWAP is not set | |
1548 | +# CONFIG_CMDLINE_BOOL is not set | |
1549 | ||
1550 | # | |
1551 | # Plug and Play support | |
1552 | @@ -61,12 +60,8 @@ | |
1553 | # | |
1554 | # Block devices | |
1555 | # | |
1556 | -# CONFIG_BLK_DEV_FD is not set | |
1557 | +CONFIG_BLK_DEV_FD=y | |
1558 | CONFIG_BLK_DEV_IDE=y | |
1559 | - | |
1560 | -# | |
1561 | -# Please see Documentation/ide.txt for help/info on IDE drives | |
1562 | -# | |
1563 | # CONFIG_BLK_DEV_HD_IDE is not set | |
1564 | CONFIG_BLK_DEV_IDEDISK=y | |
1565 | CONFIG_BLK_DEV_IDECD=y | |
1566 | @@ -75,25 +70,13 @@ | |
1567 | # CONFIG_BLK_DEV_IDESCSI is not set | |
1568 | # CONFIG_BLK_DEV_CMD640 is not set | |
1569 | # CONFIG_BLK_DEV_RZ1000 is not set | |
1570 | -CONFIG_BLK_DEV_IDEPCI=y | |
1571 | -CONFIG_BLK_DEV_IDEDMA=y | |
1572 | -# CONFIG_BLK_DEV_OFFBOARD is not set | |
1573 | -CONFIG_IDEDMA_AUTO=y | |
1574 | -# CONFIG_BLK_DEV_OPTI621 is not set | |
1575 | -# CONFIG_BLK_DEV_TRM290 is not set | |
1576 | -# CONFIG_BLK_DEV_NS87415 is not set | |
1577 | -# CONFIG_BLK_DEV_VIA82C586 is not set | |
1578 | -CONFIG_BLK_DEV_CMD646=y | |
1579 | -# CONFIG_BLK_DEV_SL82C105 is not set | |
1580 | +# CONFIG_BLK_DEV_IDEPCI is not set | |
1581 | +CONFIG_BLK_DEV_SL82C105=y | |
1582 | CONFIG_BLK_DEV_IDE_PMAC=y | |
1583 | CONFIG_BLK_DEV_IDEDMA_PMAC=y | |
1584 | CONFIG_BLK_DEV_IDEDMA=y | |
1585 | CONFIG_PMAC_IDEDMA_AUTO=y | |
1586 | # CONFIG_IDE_CHIPSETS is not set | |
1587 | - | |
1588 | -# | |
1589 | -# Additional Block Devices | |
1590 | -# | |
1591 | CONFIG_BLK_DEV_LOOP=y | |
1592 | # CONFIG_BLK_DEV_NBD is not set | |
1593 | # CONFIG_BLK_DEV_MD is not set | |
1594 | @@ -101,7 +84,7 @@ | |
1595 | CONFIG_BLK_DEV_INITRD=y | |
1596 | # CONFIG_BLK_DEV_XD is not set | |
1597 | # CONFIG_BLK_DEV_DAC960 is not set | |
1598 | -CONFIG_PARIDE_PARPORT=m | |
1599 | +CONFIG_PARIDE_PARPORT=y | |
1600 | # CONFIG_PARIDE is not set | |
1601 | # CONFIG_BLK_CPQ_DA is not set | |
1602 | # CONFIG_BLK_DEV_HD is not set | |
1603 | @@ -125,18 +108,10 @@ | |
1604 | # CONFIG_NET_IPGRE is not set | |
1605 | # CONFIG_IP_MROUTE is not set | |
1606 | CONFIG_IP_ALIAS=y | |
1607 | -# CONFIG_SYN_COOKIES is not set | |
1608 | - | |
1609 | -# | |
1610 | -# (it is safe to leave these untouched) | |
1611 | -# | |
1612 | +CONFIG_SYN_COOKIES=y | |
1613 | CONFIG_INET_RARP=y | |
1614 | CONFIG_SKB_LARGE=y | |
1615 | # CONFIG_IPV6 is not set | |
1616 | - | |
1617 | -# | |
1618 | -# | |
1619 | -# | |
1620 | # CONFIG_IPX is not set | |
1621 | CONFIG_ATALK=m | |
1622 | # CONFIG_X25 is not set | |
1623 | @@ -158,19 +133,11 @@ | |
1624 | # SCSI support | |
1625 | # | |
1626 | CONFIG_SCSI=y | |
1627 | - | |
1628 | -# | |
1629 | -# SCSI support type (disk, tape, CD-ROM) | |
1630 | -# | |
1631 | CONFIG_BLK_DEV_SD=y | |
1632 | CONFIG_CHR_DEV_ST=y | |
1633 | CONFIG_BLK_DEV_SR=y | |
1634 | CONFIG_BLK_DEV_SR_VENDOR=y | |
1635 | -# CONFIG_CHR_DEV_SG is not set | |
1636 | - | |
1637 | -# | |
1638 | -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs | |
1639 | -# | |
1640 | +CONFIG_CHR_DEV_SG=y | |
1641 | # CONFIG_SCSI_MULTI_LUN is not set | |
1642 | CONFIG_SCSI_CONSTANTS=y | |
1643 | # CONFIG_SCSI_LOGGING is not set | |
1644 | @@ -188,6 +155,7 @@ | |
1645 | CONFIG_AIC7XXX_CMDS_PER_DEVICE=8 | |
1646 | CONFIG_AIC7XXX_PROC_STATS=y | |
1647 | CONFIG_AIC7XXX_RESET_DELAY=15 | |
1648 | +# CONFIG_SCSI_IPS is not set | |
1649 | # CONFIG_SCSI_ADVANSYS is not set | |
1650 | # CONFIG_SCSI_IN2000 is not set | |
1651 | # CONFIG_SCSI_AM53C974 is not set | |
1652 | @@ -202,12 +170,11 @@ | |
1653 | # CONFIG_SCSI_GENERIC_NCR5380 is not set | |
1654 | # CONFIG_SCSI_INITIO is not set | |
1655 | # CONFIG_SCSI_INIA100 is not set | |
1656 | -# CONFIG_SCSI_PPA is not set | |
1657 | -# CONFIG_SCSI_IMM is not set | |
1658 | # CONFIG_SCSI_NCR53C406A is not set | |
1659 | # CONFIG_SCSI_SYM53C416 is not set | |
1660 | +# CONFIG_SCSI_SIM710 is not set | |
1661 | # CONFIG_SCSI_NCR53C7xx is not set | |
1662 | -CONFIG_SCSI_NCR53C8XX=y | |
1663 | +# CONFIG_SCSI_NCR53C8XX is not set | |
1664 | CONFIG_SCSI_SYM53C8XX=y | |
1665 | CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8 | |
1666 | CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 | |
1667 | @@ -215,7 +182,7 @@ | |
1668 | # CONFIG_SCSI_NCR53C8XX_PROFILE is not set | |
1669 | # CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set | |
1670 | # CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set | |
1671 | -CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT=y | |
1672 | +# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set | |
1673 | # CONFIG_SCSI_PAS16 is not set | |
1674 | # CONFIG_SCSI_PCI2000 is not set | |
1675 | # CONFIG_SCSI_PCI2220I is not set | |
1676 | @@ -253,21 +220,21 @@ | |
1677 | CONFIG_NET_ETHERNET=y | |
1678 | CONFIG_MACE=y | |
1679 | CONFIG_BMAC=y | |
1680 | -CONFIG_GMAC=y | |
1681 | +# CONFIG_NCR885E is not set | |
1682 | # CONFIG_NET_VENDOR_3COM is not set | |
1683 | # CONFIG_LANCE is not set | |
1684 | # CONFIG_NET_VENDOR_SMC is not set | |
1685 | # CONFIG_NET_VENDOR_RACAL is not set | |
1686 | # CONFIG_RTL8139 is not set | |
1687 | -# CONFIG_SIS900 is not set | |
1688 | # CONFIG_YELLOWFIN is not set | |
1689 | # CONFIG_NET_ISA is not set | |
1690 | CONFIG_NET_EISA=y | |
1691 | -# CONFIG_PCNET32 is not set | |
1692 | +CONFIG_PCNET32=y | |
1693 | # CONFIG_ACENIC is not set | |
1694 | # CONFIG_AC3200 is not set | |
1695 | # CONFIG_APRICOT is not set | |
1696 | # CONFIG_CS89x0 is not set | |
1697 | +# CONFIG_DM9102 is not set | |
1698 | CONFIG_DE4X5=y | |
1699 | # CONFIG_DEC_ELCP is not set | |
1700 | # CONFIG_DGRS is not set | |
1701 | @@ -277,6 +244,7 @@ | |
1702 | # CONFIG_NE2K_PCI is not set | |
1703 | # CONFIG_TLAN is not set | |
1704 | # CONFIG_VIA_RHINE is not set | |
1705 | +# CONFIG_SIS900 is not set | |
1706 | # CONFIG_ES3210 is not set | |
1707 | # CONFIG_EPIC100 is not set | |
1708 | # CONFIG_ZNET is not set | |
1709 | @@ -290,12 +258,7 @@ | |
1710 | # CONFIG_LTPC is not set | |
1711 | # CONFIG_COPS is not set | |
1712 | # CONFIG_IPDDP is not set | |
1713 | -# CONFIG_PLIP is not set | |
1714 | CONFIG_PPP=y | |
1715 | - | |
1716 | -# | |
1717 | -# CCP compressors for PPP are only built as modules. | |
1718 | -# | |
1719 | # CONFIG_SLIP is not set | |
1720 | # CONFIG_NET_RADIO is not set | |
1721 | ||
1722 | @@ -313,7 +276,9 @@ | |
1723 | # CONFIG_HOSTESS_SV11 is not set | |
1724 | # CONFIG_COSA is not set | |
1725 | # CONFIG_SEALEVEL_4021 is not set | |
1726 | +# CONFIG_COMX is not set | |
1727 | # CONFIG_DLCI is not set | |
1728 | +# CONFIG_SBNI is not set | |
1729 | ||
1730 | # | |
1731 | # Amateur Radio support | |
1732 | @@ -339,12 +304,14 @@ | |
1733 | CONFIG_FB_CONTROL=y | |
1734 | CONFIG_FB_PLATINUM=y | |
1735 | CONFIG_FB_VALKYRIE=y | |
1736 | -CONFIG_FB_ATY=y | |
1737 | -CONFIG_FB_ATY128=y | |
1738 | CONFIG_FB_IMSTT=y | |
1739 | CONFIG_FB_CT65550=y | |
1740 | # CONFIG_FB_S3TRIO is not set | |
1741 | -# CONFIG_FB_MATROX is not set | |
1742 | +CONFIG_FB_MATROX=y | |
1743 | +# CONFIG_FB_MATROX_MILLENIUM is not set | |
1744 | +CONFIG_FB_MATROX_MYSTIQUE=y | |
1745 | +CONFIG_FB_MATROX_G100=y | |
1746 | +# CONFIG_FB_MATROX_MULTIHEAD is not set | |
1747 | CONFIG_FB_ATY=y | |
1748 | # CONFIG_FB_VIRTUAL is not set | |
1749 | # CONFIG_FBCON_ADVANCED is not set | |
1750 | @@ -367,13 +334,22 @@ | |
1751 | # | |
1752 | CONFIG_VT=y | |
1753 | CONFIG_VT_CONSOLE=y | |
1754 | -# CONFIG_SERIAL is not set | |
1755 | +CONFIG_SERIAL=m | |
1756 | # CONFIG_SERIAL_EXTENDED is not set | |
1757 | # CONFIG_SERIAL_NONSTANDARD is not set | |
1758 | CONFIG_UNIX98_PTYS=y | |
1759 | CONFIG_UNIX98_PTY_COUNT=256 | |
1760 | -# CONFIG_PRINTER is not set | |
1761 | -# CONFIG_MOUSE is not set | |
1762 | +CONFIG_MOUSE=y | |
1763 | + | |
1764 | +# | |
1765 | +# Mice | |
1766 | +# | |
1767 | +# CONFIG_ATIXL_BUSMOUSE is not set | |
1768 | +# CONFIG_BUSMOUSE is not set | |
1769 | +# CONFIG_MS_BUSMOUSE is not set | |
1770 | +CONFIG_PSMOUSE=y | |
1771 | +# CONFIG_82C710_MOUSE is not set | |
1772 | +# CONFIG_PC110_PAD is not set | |
1773 | # CONFIG_QIC02_TAPE is not set | |
1774 | # CONFIG_WATCHDOG is not set | |
1775 | CONFIG_NVRAM=y | |
1776 | @@ -408,10 +384,10 @@ | |
1777 | # CONFIG_ADFS_FS is not set | |
1778 | # CONFIG_AFFS_FS is not set | |
1779 | CONFIG_HFS_FS=y | |
1780 | -CONFIG_FAT_FS=m | |
1781 | -CONFIG_MSDOS_FS=m | |
1782 | +CONFIG_FAT_FS=y | |
1783 | +CONFIG_MSDOS_FS=y | |
1784 | # CONFIG_UMSDOS_FS is not set | |
1785 | -CONFIG_VFAT_FS=m | |
1786 | +CONFIG_VFAT_FS=y | |
1787 | CONFIG_ISO9660_FS=y | |
1788 | # CONFIG_JOLIET is not set | |
1789 | # CONFIG_MINIX_FS is not set | |
1790 | @@ -477,7 +453,7 @@ | |
1791 | # CONFIG_NLS_ISO8859_8 is not set | |
1792 | # CONFIG_NLS_ISO8859_9 is not set | |
1793 | # CONFIG_NLS_ISO8859_14 is not set | |
1794 | -CONFIG_NLS_ISO8859_15=y | |
1795 | +# CONFIG_NLS_ISO8859_15 is not set | |
1796 | # CONFIG_NLS_KOI8_R is not set | |
1797 | ||
1798 | # | |
1799 | @@ -485,13 +461,43 @@ | |
1800 | # | |
1801 | CONFIG_SOUND=y | |
1802 | CONFIG_DMASOUND=y | |
1803 | +# CONFIG_SOUND_CMPCI is not set | |
1804 | # CONFIG_SOUND_ES1370 is not set | |
1805 | # CONFIG_SOUND_ES1371 is not set | |
1806 | +# CONFIG_SOUND_MAESTRO is not set | |
1807 | # CONFIG_SOUND_ESSSOLO1 is not set | |
1808 | # CONFIG_SOUND_SONICVIBES is not set | |
1809 | # CONFIG_SOUND_MSNDCLAS is not set | |
1810 | # CONFIG_SOUND_MSNDPIN is not set | |
1811 | -# CONFIG_SOUND_OSS is not set | |
1812 | +CONFIG_SOUND_OSS=y | |
1813 | +# CONFIG_SOUND_DMAP is not set | |
1814 | +# CONFIG_SOUND_PAS is not set | |
1815 | +# CONFIG_SOUND_SB is not set | |
1816 | +# CONFIG_SOUND_GUS is not set | |
1817 | +# CONFIG_SOUND_MPU401 is not set | |
1818 | +# CONFIG_SOUND_PSS is not set | |
1819 | +# CONFIG_SOUND_MSS is not set | |
1820 | +# CONFIG_SOUND_SSCAPE is not set | |
1821 | +# CONFIG_SOUND_TRIX is not set | |
1822 | +# CONFIG_SOUND_VIA82CXXX is not set | |
1823 | +# CONFIG_SOUND_MAD16 is not set | |
1824 | +# CONFIG_SOUND_WAVEFRONT is not set | |
1825 | +CONFIG_SOUND_CS4232=m | |
1826 | +# CONFIG_SOUND_OPL3SA2 is not set | |
1827 | +# CONFIG_SOUND_MAUI is not set | |
1828 | +# CONFIG_SOUND_SGALAXY is not set | |
1829 | +# CONFIG_SOUND_AD1816 is not set | |
1830 | +# CONFIG_SOUND_OPL3SA1 is not set | |
1831 | +# CONFIG_SOUND_SOFTOSS is not set | |
1832 | +# CONFIG_SOUND_YM3812 is not set | |
1833 | +# CONFIG_SOUND_VMIDI is not set | |
1834 | +# CONFIG_SOUND_UART6850 is not set | |
1835 | +# CONFIG_SOUND_NM256 is not set | |
1836 | + | |
1837 | +# | |
1838 | +# Additional low level sound drivers | |
1839 | +# | |
1840 | +# CONFIG_LOWLEVEL_SOUND is not set | |
1841 | ||
1842 | # | |
1843 | # Kernel hacking | |
1844 | diff -urN linux.orig/arch/ppc/kernel/Makefile linux/arch/ppc/kernel/Makefile | |
1845 | --- linux.orig/arch/ppc/kernel/Makefile Sun Mar 25 18:31:48 2001 | |
1846 | +++ linux/arch/ppc/kernel/Makefile Thu Jul 11 15:43:29 2002 | |
1847 | @@ -7,13 +7,8 @@ | |
1848 | # | |
1849 | # Note 2! The CFLAGS definitions are now in the main makefile... | |
1850 | ||
1851 | -# Once a gas that groks -mvec is generally available, we'll use it... | |
1852 | .S.o: | |
1853 | -#ifdef CONFIG_ALTIVEC | |
1854 | -# $(CC) $(CFLAGS) -D__ASSEMBLY__ -Wa,-mvec -c $< -o $*.o | |
1855 | -#else | |
1856 | $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $*.o | |
1857 | -#endif | |
1858 | ||
1859 | O_TARGET := kernel.o | |
1860 | OX_OBJS := ppc_ksyms.o setup.o | |
1861 | @@ -36,40 +31,20 @@ | |
1862 | ||
1863 | ifeq ($(CONFIG_MBX),y) | |
1864 | O_OBJS += mbx_setup.o mbx_pci.o softemu8xx.o i8259.o ppc8xx_pic.o | |
1865 | -endif | |
1866 | +else | |
1867 | ifeq ($(CONFIG_APUS),y) | |
1868 | O_OBJS += apus_setup.o prom.o openpic.o | |
1869 | +else | |
1870 | +ifneq ($(CONFIG_MBX),y) | |
1871 | +O_OBJS += prep_time.o pmac_time.o chrp_time.o \ | |
1872 | + pmac_setup.o pmac_support.o \ | |
1873 | + prep_pci.o pmac_pci.o chrp_pci.o \ | |
1874 | + residual.o prom.o openpic.o feature.o \ | |
1875 | + prep_nvram.o open_pic.o i8259.o pmac_pic.o indirect_pci.o \ | |
1876 | + gemini_pci.o gemini_prom.o gemini_setup.o | |
1877 | +OX_OBJS += chrp_setup.o prep_setup.o | |
1878 | +endif | |
1879 | endif | |
1880 | - | |
1881 | -PMAC_OBJS = pmac_time.o pmac_setup.o pmac_support.o pmac_pci.o pmac_pic.o \ | |
1882 | - feature.o openpic.o open_pic.o prom.o | |
1883 | -CHRP_OBJS = $(PMAC_OBJS) chrp_time.o chrp_pci.o i8259.o indirect_pci.o | |
1884 | -CHRPX_OBJS = chrp_setup.o | |
1885 | -PREP_OBJS = prep_time.o prep_pci.o residual.o prep_nvram.o i8259.o \ | |
1886 | - indirect_pci.o openpic.o open_pic.o prom.o | |
1887 | -PREPX_OBJS = prep_setup.o | |
1888 | - | |
1889 | -ifeq ($(CONFIG_ALL_PPC),y) | |
1890 | -O_OBJS += $(sort $(PMAC_OBJS) $(PREP_OBJS) $(CHRP_OBJS)) | |
1891 | -OX_OBJS += $(PMACX_OBJS) $(PREPX_OBJS) $(CHRPX_OBJS) | |
1892 | -endif | |
1893 | -ifeq ($(CONFIG_PMAC),y) | |
1894 | -O_OBJS += $(PMAC_OBJS) | |
1895 | -OX_OBJS += $(PMACX_OBJS) | |
1896 | -endif | |
1897 | -ifeq ($(CONFIG_PREP),y) | |
1898 | -O_OBJS += $(PREP_OBJS) | |
1899 | -OX_OBJS += $(PREPX_OBJS) | |
1900 | -endif | |
1901 | -ifeq ($(CONFIG_CHRP),y) | |
1902 | -O_OBJS += $(CHRP_OBJS) | |
1903 | -OX_OBJS += $(CHRPX_OBJS) | |
1904 | -endif | |
1905 | - | |
1906 | -GEMINI_OBJS = $(PREP_OBJS) gemini_pci.o gemini_prom.o gemini_setup.o | |
1907 | -ifeq ($(CONFIG_GEMINI),y) | |
1908 | -O_OBJS += $(GEMINI_OBJS) | |
1909 | -OX_OBJS += $(PREPX_OBJS) | |
1910 | endif | |
1911 | ||
1912 | ifdef CONFIG_SMP | |
1913 | @@ -87,15 +62,14 @@ | |
1914 | $(TOPDIR)/include/asm/ptrace.h | |
1915 | $(CC) ${CFLAGS} -S mk_defs.c | |
1916 | cp ppc_defs.head ppc_defs.h | |
1917 | - chmod 755 ppc_defs.h | |
1918 | - grep '^#define' mk_defs.s >> ppc_defs.h | |
1919 | + grep '^#define' mk_defs.s >>ppc_defs.h | |
1920 | rm mk_defs.s | |
1921 | ||
1922 | find_name : find_name.c | |
1923 | $(HOSTCC) -o find_name find_name.c | |
1924 | ||
1925 | checks: checks.c | |
1926 | - $(HOSTCC) ${CFLAGS} -D__KERNEL__ -I../../../include -o checks checks.c | |
1927 | + $(HOSTCC) ${CFLAGS} -D__KERNEL__ -o checks checks.c | |
1928 | ./checks | |
1929 | ||
1930 | include $(TOPDIR)/Rules.make | |
1931 | diff -urN linux.orig/arch/ppc/kernel/apus_setup.c linux/arch/ppc/kernel/apus_setup.c | |
1932 | --- linux.orig/arch/ppc/kernel/apus_setup.c Sun Mar 25 18:31:49 2001 | |
1933 | +++ linux/arch/ppc/kernel/apus_setup.c Thu Jul 11 15:43:29 2002 | |
1934 | @@ -42,7 +42,7 @@ | |
1935 | #include <asm/machdep.h> | |
1936 | #include <asm/ide.h> | |
1937 | ||
1938 | -#include <asm/time.h> | |
1939 | +#include "time.h" | |
1940 | #include "local_irq.h" | |
1941 | ||
1942 | unsigned long apus_get_rtc_time(void); | |
1943 | @@ -624,7 +624,7 @@ | |
1944 | ppc_md.kbd_unexpected_up = NULL; | |
1945 | ppc_md.kbd_leds = NULL; | |
1946 | ppc_md.kbd_init_hw = NULL; | |
1947 | - ppc_md.sysrq_xlate = NULL; | |
1948 | + ppc_md.kbd_sysrq_xlate = NULL; | |
1949 | ||
1950 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) | |
1951 | ppc_ide_md.insw = apus_ide_insw; | |
1952 | diff -urN linux.orig/arch/ppc/kernel/checks.c linux/arch/ppc/kernel/checks.c | |
1953 | --- linux.orig/arch/ppc/kernel/checks.c Sun Mar 25 18:31:48 2001 | |
1954 | +++ linux/arch/ppc/kernel/checks.c Thu Jul 11 15:43:29 2002 | |
1955 | @@ -1,4 +1,3 @@ | |
1956 | -#include <linux/config.h> | |
1957 | #include <linux/errno.h> | |
1958 | #include <linux/sched.h> | |
1959 | #include <linux/kernel.h> | |
1960 | diff -urN linux.orig/arch/ppc/kernel/chrp_pci.c linux/arch/ppc/kernel/chrp_pci.c | |
1961 | --- linux.orig/arch/ppc/kernel/chrp_pci.c Sun Mar 25 18:31:48 2001 | |
1962 | +++ linux/arch/ppc/kernel/chrp_pci.c Thu Jul 11 15:43:29 2002 | |
1963 | @@ -12,6 +12,7 @@ | |
1964 | #include <asm/io.h> | |
1965 | #include <asm/pgtable.h> | |
1966 | #include <asm/irq.h> | |
1967 | +#include <asm/irq-compat.h> | |
1968 | #include <asm/hydra.h> | |
1969 | #include <asm/prom.h> | |
1970 | #include <asm/gg2.h> | |
1971 | @@ -19,7 +20,6 @@ | |
1972 | #include <asm/machdep.h> | |
1973 | ||
1974 | #include "pci.h" | |
1975 | -#include "open_pic.h" | |
1976 | ||
1977 | /* LongTrail */ | |
1978 | #define pci_config_addr(bus, dev, offset) \ | |
1979 | @@ -287,7 +287,7 @@ | |
1980 | for( dev=pci_devices ; dev; dev=dev->next ) | |
1981 | { | |
1982 | if ( dev->irq ) | |
1983 | - dev->irq = dev->irq + open_pic.irq_offset; | |
1984 | + dev->irq = openpic_to_irq( dev->irq ); | |
1985 | /* these need to be absolute addrs for OF and Matrox FB -- Cort */ | |
1986 | if ( dev->vendor == PCI_VENDOR_ID_MATROX ) | |
1987 | { | |
1988 | diff -urN linux.orig/arch/ppc/kernel/chrp_setup.c linux/arch/ppc/kernel/chrp_setup.c | |
1989 | --- linux.orig/arch/ppc/kernel/chrp_setup.c Sun Mar 25 18:31:49 2001 | |
1990 | +++ linux/arch/ppc/kernel/chrp_setup.c Thu Jul 11 16:22:09 2002 | |
1991 | @@ -33,7 +33,6 @@ | |
1992 | #include <linux/pci.h> | |
1993 | #include <linux/openpic.h> | |
1994 | #include <linux/version.h> | |
1995 | -#include <linux/delay.h> | |
1996 | ||
1997 | #include <asm/mmu.h> | |
1998 | #include <asm/processor.h> | |
1999 | @@ -46,11 +45,12 @@ | |
2000 | #include <asm/dma.h> | |
2001 | #include <asm/machdep.h> | |
2002 | #include <asm/irq.h> | |
2003 | +#include <asm/irq-compat.h> | |
2004 | #include <asm/adb.h> | |
2005 | #include <asm/hydra.h> | |
2006 | #include <asm/keyboard.h> | |
2007 | ||
2008 | -#include <asm/time.h> | |
2009 | +#include "time.h" | |
2010 | #include "local_irq.h" | |
2011 | #include "i8259.h" | |
2012 | #include "open_pic.h" | |
2013 | @@ -69,7 +69,7 @@ | |
2014 | int chrp_set_rtc_time(unsigned long nowtime); | |
2015 | unsigned long rtas_event_scan_rate = 0, rtas_event_scan_ct = 0; | |
2016 | void chrp_calibrate_decr(void); | |
2017 | -long chrp_time_init(void); | |
2018 | +void chrp_time_init(void); | |
2019 | ||
2020 | void chrp_setup_pci_ptrs(void); | |
2021 | ||
2022 | @@ -359,6 +359,81 @@ | |
2023 | } | |
2024 | } | |
2025 | ||
2026 | +void | |
2027 | +chrp_do_IRQ(struct pt_regs *regs, | |
2028 | + int cpu, | |
2029 | + int isfake) | |
2030 | +{ | |
2031 | + int irq; | |
2032 | + unsigned long bits = 0; | |
2033 | + int openpic_eoi_done = 0; | |
2034 | + | |
2035 | +#ifdef __SMP__ | |
2036 | + { | |
2037 | + unsigned int loops = 1000000; | |
2038 | + while (test_bit(0, &global_irq_lock)) { | |
2039 | + if (smp_processor_id() == global_irq_holder) { | |
2040 | + printk("uh oh, interrupt while we hold global irq lock!\n"); | |
2041 | +#ifdef CONFIG_XMON | |
2042 | + xmon(0); | |
2043 | +#endif | |
2044 | + break; | |
2045 | + } | |
2046 | + if (loops-- == 0) { | |
2047 | + printk("do_IRQ waiting for irq lock (holder=%d)\n", global_irq_holder); | |
2048 | +#ifdef CONFIG_XMON | |
2049 | + xmon(0); | |
2050 | +#endif | |
2051 | + } | |
2052 | + } | |
2053 | + } | |
2054 | +#endif /* __SMP__ */ | |
2055 | + | |
2056 | + irq = openpic_irq(smp_processor_id()); | |
2057 | + if (irq == IRQ_8259_CASCADE) | |
2058 | + { | |
2059 | + /* | |
2060 | + * This magic address generates a PCI IACK cycle. | |
2061 | + * | |
2062 | + * This should go in the above mask/ack code soon. -- Cort | |
2063 | + */ | |
2064 | + if ( chrp_int_ack_special ) | |
2065 | + irq = *chrp_int_ack_special; | |
2066 | + else | |
2067 | + irq = i8259_irq(0); | |
2068 | + /* | |
2069 | + * Acknowledge as soon as possible to allow i8259 | |
2070 | + * interrupt nesting */ | |
2071 | + openpic_eoi(smp_processor_id()); | |
2072 | + openpic_eoi_done = 1; | |
2073 | + } | |
2074 | + if (irq == OPENPIC_VEC_SPURIOUS) | |
2075 | + { | |
2076 | + /* | |
2077 | + * Spurious interrupts should never be | |
2078 | + * acknowledged | |
2079 | + */ | |
2080 | + ppc_spurious_interrupts++; | |
2081 | + openpic_eoi_done = 1; | |
2082 | + goto out; | |
2083 | + } | |
2084 | + bits = 1UL << irq; | |
2085 | + | |
2086 | + if (irq < 0) | |
2087 | + { | |
2088 | + printk(KERN_DEBUG "Bogus interrupt %d from PC = %lx\n", | |
2089 | + irq, regs->nip); | |
2090 | + ppc_spurious_interrupts++; | |
2091 | + } | |
2092 | + else | |
2093 | + { | |
2094 | + ppc_irq_dispatch_handler( regs, irq ); | |
2095 | + } | |
2096 | +out: | |
2097 | + if (!openpic_eoi_done) | |
2098 | + openpic_eoi(smp_processor_id()); | |
2099 | +} | |
2100 | + | |
2101 | __initfunc(void | |
2102 | chrp_init_IRQ(void)) | |
2103 | { | |
2104 | @@ -373,7 +448,7 @@ | |
2105 | (*(unsigned long *)get_property(np, | |
2106 | "8259-interrupt-acknowledge", NULL)); | |
2107 | } | |
2108 | - open_pic.irq_offset = NUM_8259_INTERRUPTS; | |
2109 | + open_pic.irq_offset = 16; | |
2110 | for ( i = 16 ; i < NR_IRQS ; i++ ) | |
2111 | irq_desc[i].ctl = &open_pic; | |
2112 | openpic_init(1); | |
2113 | @@ -381,7 +456,7 @@ | |
2114 | irq_desc[i].ctl = &i8259_pic; | |
2115 | i8259_init(); | |
2116 | #ifdef CONFIG_XMON | |
2117 | - request_irq(HYDRA_INT_ADB_NMI+open_pic.irq_offset, | |
2118 | + request_irq(openpic_to_irq(HYDRA_INT_ADB_NMI), | |
2119 | xmon_irq, 0, "NMI", 0); | |
2120 | #endif /* CONFIG_XMON */ | |
2121 | #ifdef __SMP__ | |
2122 | @@ -570,7 +645,7 @@ | |
2123 | ppc_md.get_cpuinfo = chrp_get_cpuinfo; | |
2124 | ppc_md.irq_cannonicalize = chrp_irq_cannonicalize; | |
2125 | ppc_md.init_IRQ = chrp_init_IRQ; | |
2126 | - ppc_md.do_IRQ = open_pic_do_IRQ; | |
2127 | + ppc_md.do_IRQ = chrp_do_IRQ; | |
2128 | ||
2129 | ppc_md.init = chrp_init2; | |
2130 | ||
2131 | @@ -612,8 +687,3 @@ | |
2132 | while ( *s ) | |
2133 | call_rtas( "display-character", 1, 1, NULL, *s++ ); | |
2134 | } | |
2135 | - | |
2136 | -void chrp_indicator(int x) | |
2137 | -{ | |
2138 | - call_rtas("set-indicator", 3, 1, NULL, 6, 0, x); | |
2139 | -} | |
2140 | diff -urN linux.orig/arch/ppc/kernel/chrp_time.c linux/arch/ppc/kernel/chrp_time.c | |
2141 | --- linux.orig/arch/ppc/kernel/chrp_time.c Sun Mar 25 18:31:49 2001 | |
2142 | +++ linux/arch/ppc/kernel/chrp_time.c Thu Jul 11 15:43:29 2002 | |
2143 | @@ -25,25 +25,24 @@ | |
2144 | #include <asm/processor.h> | |
2145 | #include <asm/nvram.h> | |
2146 | #include <asm/prom.h> | |
2147 | -#include <asm/time.h> | |
2148 | +#include "time.h" | |
2149 | ||
2150 | static int nvram_as1 = NVRAM_AS1; | |
2151 | static int nvram_as0 = NVRAM_AS0; | |
2152 | static int nvram_data = NVRAM_DATA; | |
2153 | ||
2154 | -__initfunc(long chrp_time_init(void)) | |
2155 | +__initfunc(void chrp_time_init(void)) | |
2156 | { | |
2157 | struct device_node *rtcs; | |
2158 | int base; | |
2159 | ||
2160 | rtcs = find_compatible_devices("rtc", "pnpPNP,b00"); | |
2161 | if (rtcs == NULL || rtcs->addrs == NULL) | |
2162 | - return 0; | |
2163 | + return; | |
2164 | base = rtcs->addrs[0].address; | |
2165 | nvram_as1 = 0; | |
2166 | nvram_as0 = base; | |
2167 | nvram_data = base + 1; | |
2168 | - return 0; | |
2169 | } | |
2170 | ||
2171 | int chrp_cmos_clock_read(int addr) | |
2172 | diff -urN linux.orig/arch/ppc/kernel/gemini_setup.c linux/arch/ppc/kernel/gemini_setup.c | |
2173 | --- linux.orig/arch/ppc/kernel/gemini_setup.c Sun Mar 25 18:31:49 2001 | |
2174 | +++ linux/arch/ppc/kernel/gemini_setup.c Thu Jul 11 15:45:25 2002 | |
2175 | @@ -21,7 +21,6 @@ | |
2176 | #include <linux/blk.h> | |
2177 | #include <linux/console.h> | |
2178 | #include <linux/openpic.h> | |
2179 | -#include <linux/delay.h> | |
2180 | ||
2181 | #include <asm/system.h> | |
2182 | #include <asm/pgtable.h> | |
2183 | @@ -30,9 +29,8 @@ | |
2184 | #include <asm/io.h> | |
2185 | #include <asm/m48t35.h> | |
2186 | #include <asm/gemini.h> | |
2187 | -#include <asm/processor.h> | |
2188 | ||
2189 | -#include <asm/time.h> | |
2190 | +#include "time.h" | |
2191 | #include "local_irq.h" | |
2192 | #include "open_pic.h" | |
2193 | ||
2194 | @@ -168,6 +166,8 @@ | |
2195 | ioremap( GEMINI_MPIC_ADDR, sizeof( struct OpenPIC )); | |
2196 | } | |
2197 | ||
2198 | + | |
2199 | +extern unsigned long loops_per_jiffy; | |
2200 | extern int root_mountflags; | |
2201 | extern char cmd_line[]; | |
2202 | ||
2203 | @@ -258,6 +258,14 @@ | |
2204 | return clock; | |
2205 | } | |
2206 | ||
2207 | + | |
2208 | +#define L2CR_PIPE_LATEWR (0x01800000) /* late-write SRAM */ | |
2209 | +#define L2CR_L2CTL (0x00100000) /* RAM control */ | |
2210 | +#define L2CR_INST_DISABLE (0x00400000) /* disable for insn's */ | |
2211 | +#define L2CR_L2I (0x00200000) /* global invalidate */ | |
2212 | +#define L2CR_L2E (0x80000000) /* enable */ | |
2213 | +#define L2CR_L2WT (0x00080000) /* write-through */ | |
2214 | + | |
2215 | void __init gemini_init_l2(void) | |
2216 | { | |
2217 | unsigned char reg; | |
2218 | @@ -331,7 +339,8 @@ | |
2219 | cache |= L2CR_L2WT; | |
2220 | #endif | |
2221 | cache |= L2CR_PIPE_LATEWR|L2CR_L2CTL|L2CR_INST_DISABLE; | |
2222 | - _set_L2CR(cache|L2CR_L2E); | |
2223 | + _set_L2CR(0); | |
2224 | + _set_L2CR(cache|L2CR_L2I|L2CR_L2E); | |
2225 | } | |
2226 | } | |
2227 | ||
2228 | @@ -381,7 +390,7 @@ | |
2229 | #define gemini_rtc_write(val,x) (writeb((val),(GEMINI_RTC+(x)))) | |
2230 | ||
2231 | /* ensure that the RTC is up and running */ | |
2232 | -long __init gemini_time_init(void) | |
2233 | +void __init gemini_time_init(void) | |
2234 | { | |
2235 | unsigned char reg; | |
2236 | ||
2237 | @@ -392,7 +401,6 @@ | |
2238 | gemini_rtc_write((reg & ~(M48T35_RTC_STOPPED)), M48T35_RTC_CONTROL); | |
2239 | gemini_rtc_write((reg | M48T35_RTC_SET), M48T35_RTC_CONTROL); | |
2240 | } | |
2241 | - return 0; | |
2242 | } | |
2243 | ||
2244 | #undef DEBUG_RTC | |
2245 | diff -urN linux.orig/arch/ppc/kernel/head.S linux/arch/ppc/kernel/head.S | |
2246 | --- linux.orig/arch/ppc/kernel/head.S Fri Nov 2 17:39:05 2001 | |
2247 | +++ linux/arch/ppc/kernel/head.S Thu Jul 11 15:43:29 2002 | |
2248 | @@ -13,7 +13,6 @@ | |
2249 | * Copyright (C) 1996 Paul Mackerras. | |
2250 | * MPC8xx modifications Copyright (C) 1997 Dan Malek (dmalek@jlc.net). | |
2251 | * Amiga/APUS changes by Jesper Skov (jskov@cygnus.co.uk). | |
2252 | - * AltiVec additions by Kumar Gala (kumar.gala@motorola.com). | |
2253 | * | |
2254 | * This file contains the low-level support and setup for the | |
2255 | * PowerPC platform, including trap and interrupt dispatch. | |
2256 | @@ -23,10 +22,6 @@ | |
2257 | * modify it under the terms of the GNU General Public License | |
2258 | * as published by the Free Software Foundation; either version | |
2259 | * 2 of the License, or (at your option) any later version. | |
2260 | - * | |
2261 | - * 2000-04-10. | |
2262 | - * Add sys_rt_sigreturn in DoSyscall Handler. | |
2263 | - * Giovanna Ambrosini (ambrosini@lightning.ch). | |
2264 | * | |
2265 | */ | |
2266 | ||
2267 | @@ -87,28 +82,6 @@ | |
2268 | #define REST_16FPRS(n, base) REST_8FPRS(n, base); REST_8FPRS(n+8, base) | |
2269 | #define REST_32FPRS(n, base) REST_16FPRS(n, base); REST_16FPRS(n+16, base) | |
2270 | ||
2271 | -/* | |
2272 | - * Once a version of gas that understands the AltiVec instructions | |
2273 | - * is freely available, we can do this the normal way... - paulus | |
2274 | - */ | |
2275 | -#define LVX(r,a,b) .long (31<<26)+((r)<<21)+((a)<<16)+((b)<<11)+(103<<1) | |
2276 | -#define STVX(r,a,b) .long (31<<26)+((r)<<21)+((a)<<16)+((b)<<11)+(231<<1) | |
2277 | -#define MFVSCR(r) .long (4<<26)+((r)<<11)+(770<<1) | |
2278 | -#define MTVSCR(r) .long (4<<26)+((r)<<11)+(802<<1) | |
2279 | - | |
2280 | -#define SAVE_VR(n,b,base) li b,TSS_VR0+(16*(n)); STVX(n,b,base) | |
2281 | -#define SAVE_2VR(n,b,base) SAVE_VR(n,b,base); SAVE_VR(n+1,b,base) | |
2282 | -#define SAVE_4VR(n,b,base) SAVE_2VR(n,b,base); SAVE_2VR(n+2,b,base) | |
2283 | -#define SAVE_8VR(n,b,base) SAVE_4VR(n,b,base); SAVE_4VR(n+4,b,base) | |
2284 | -#define SAVE_16VR(n,b,base) SAVE_8VR(n,b,base); SAVE_8VR(n+8,b,base) | |
2285 | -#define SAVE_32VR(n,b,base) SAVE_16VR(n,b,base); SAVE_16VR(n+16,b,base) | |
2286 | -#define REST_VR(n,b,base) li b,TSS_VR0+(16*(n)); LVX(n,b,base) | |
2287 | -#define REST_2VR(n,b,base) REST_VR(n,b,base); REST_VR(n+1,b,base) | |
2288 | -#define REST_4VR(n,b,base) REST_2VR(n,b,base); REST_2VR(n+2,b,base) | |
2289 | -#define REST_8VR(n,b,base) REST_4VR(n,b,base); REST_4VR(n+4,b,base) | |
2290 | -#define REST_16VR(n,b,base) REST_8VR(n,b,base); REST_8VR(n+8,b,base) | |
2291 | -#define REST_32VR(n,b,base) REST_16VR(n,b,base); REST_16VR(n+16,b,base) | |
2292 | - | |
2293 | #define SYNC \ | |
2294 | sync; \ | |
2295 | isync | |
2296 | @@ -262,15 +235,66 @@ | |
2297 | __secondary_start: | |
2298 | /* Switch MMU off, clear BATs and flush TLB */ | |
2299 | bl mmu_off | |
2300 | -mmu_off_return: | |
2301 | bl clear_bats | |
2302 | bl flush_tlbs | |
2303 | - bl setup_init_bats | |
2304 | -#ifndef CONFIG_APUS | |
2305 | -#ifdef CONFIG_BOOTX_TEXT | |
2306 | - bl setup_disp_bat | |
2307 | -#endif | |
2308 | + | |
2309 | +/* Use the first pair of BAT registers to map the 1st 16MB | |
2310 | + * of RAM to KERNELBASE. From this point on we can't safely | |
2311 | + * call OF any more. | |
2312 | + */ | |
2313 | + lis r11,KERNELBASE@h | |
2314 | + mfspr r9,PVR | |
2315 | + rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */ | |
2316 | + cmpi 0,r9,1 | |
2317 | + bne 4f | |
2318 | + ori r11,r11,4 /* set up BAT registers for 601 */ | |
2319 | + li r8,0x7f /* valid, block length = 8MB */ | |
2320 | + oris r9,r11,0x800000@h /* set up BAT reg for 2nd 8M */ | |
2321 | + oris r10,r8,0x800000@h /* set up BAT reg for 2nd 8M */ | |
2322 | + mtspr IBAT0U,r11 /* N.B. 601 has valid bit in */ | |
2323 | + mtspr IBAT0L,r8 /* lower BAT register */ | |
2324 | + mtspr IBAT1U,r9 | |
2325 | + mtspr IBAT1L,r10 | |
2326 | + b 5f | |
2327 | +4: | |
2328 | +#ifdef CONFIG_APUS | |
2329 | + ori r11,r11,BL_8M<<2|0x2 /* set up an 8MB mapping */ | |
2330 | + ori r11,r11,0xfe /* set up an 8MB mapping */ | |
2331 | + lis r8,CYBERBASEp@h | |
2332 | + lwz r8,0(r8) | |
2333 | + addis r8,r8,KERNELBASE@h | |
2334 | + addi r8,r8,2 | |
2335 | +#else | |
2336 | + ori r11,r11,BL_256M<<2|0x2 /* set up BAT registers for 604 */ | |
2337 | + li r8,2 /* R/W access */ | |
2338 | + /* | |
2339 | + * If the MMU is off clear the bats. See clear_bat() -- Cort | |
2340 | + */ | |
2341 | +#ifndef CONFIG_GEMINI | |
2342 | + /* | |
2343 | + * allow secondary cpus to get at all of ram in early bootup | |
2344 | + * since their init_task may be up there -- Cort | |
2345 | + */ | |
2346 | + oris r18,r8,0x10000000@h | |
2347 | + oris r21,r11,(KERNELBASE+0x10000000)@h | |
2348 | + mtspr DBAT1L,r18 /* N.B. 6xx (not 601) have valid */ | |
2349 | + mtspr DBAT1U,r21 /* bit in upper BAT register */ | |
2350 | + mtspr IBAT1L,r18 | |
2351 | + mtspr IBAT1U,r21 | |
2352 | + | |
2353 | + oris r18,r8,0x20000000@h | |
2354 | + oris r21,r11,(KERNELBASE+0x20000000)@h | |
2355 | + mtspr DBAT2L,r18 /* N.B. 6xx (not 601) have valid */ | |
2356 | + mtspr DBAT2U,r21 /* bit in upper BAT register */ | |
2357 | + mtspr IBAT2L,r18 | |
2358 | + mtspr IBAT2U,r21 | |
2359 | +#endif /* ndef CONFIG_GEMINI */ | |
2360 | #endif | |
2361 | + mtspr DBAT0L,r8 /* N.B. 6xx (not 601) have valid */ | |
2362 | + mtspr DBAT0U,r11 /* bit in upper BAT register */ | |
2363 | + mtspr IBAT0L,r8 | |
2364 | + mtspr IBAT0U,r11 | |
2365 | +5: isync | |
2366 | #ifdef CONFIG_APUS | |
2367 | /* Unfortunately the APUS specific instructions bloat the | |
2368 | * code so it cannot fit in the 0x100 bytes available. We have | |
2369 | @@ -396,15 +420,6 @@ | |
2370 | #endif /* CONFIG_8xx */ | |
2371 | b turn_on_mmu | |
2372 | ||
2373 | -/* Hack for sleep on Core99 machines | |
2374 | - */ | |
2375 | -#ifdef CONFIG_POWERMAC | |
2376 | - . = 0x80 | |
2377 | -SleepVector: | |
2378 | - .long 0 | |
2379 | - .long 0 | |
2380 | -#endif /* CONFIG_POWERMAC */ | |
2381 | - | |
2382 | /* | |
2383 | * GCC sometimes accesses words at negative offsets from the stack | |
2384 | * pointer, although the SysV ABI says it shouldn't. To cope with | |
2385 | @@ -477,7 +492,7 @@ | |
2386 | #endif /* CONFIG_GEMINI */ | |
2387 | #else | |
2388 | STD_EXCEPTION(0x100, Reset, UnknownException) | |
2389 | -#endif | |
2390 | +#endif | |
2391 | ||
2392 | /* Machine check */ | |
2393 | STD_EXCEPTION(0x200, MachineCheck, MachineCheckException) | |
2394 | @@ -636,26 +651,7 @@ | |
2395 | STD_EXCEPTION(0xd00, SingleStep, SingleStepException) | |
2396 | ||
2397 | STD_EXCEPTION(0xe00, Trap_0e, UnknownException) | |
2398 | - | |
2399 | -#ifndef CONFIG_ALTIVEC | |
2400 | STD_EXCEPTION(0xf00, Trap_0f, UnknownException) | |
2401 | -#else | |
2402 | -/* | |
2403 | - * The Altivec unavailable trap is at 0x0f20. Foo. | |
2404 | - * We effectively remap it to 0x3000. | |
2405 | - */ | |
2406 | - . = 0xf00 | |
2407 | - b Trap_0f | |
2408 | -trap_0f_cont: | |
2409 | - addi r3,r1,STACK_FRAME_OVERHEAD | |
2410 | - li r20,MSR_KERNEL | |
2411 | - bl transfer_to_handler | |
2412 | - .long UnknownException | |
2413 | - .long int_return | |
2414 | - | |
2415 | - . = 0xf20 | |
2416 | - b AltiVecUnavailable | |
2417 | -#endif /* CONFIG_ALTIVEC */ | |
2418 | ||
2419 | #ifndef CONFIG_8xx | |
2420 | /* | |
2421 | @@ -1173,24 +1169,9 @@ | |
2422 | STD_EXCEPTION(0x2f00, Trap_2f, UnknownException) | |
2423 | ||
2424 | . = 0x3000 | |
2425 | -#ifdef CONFIG_ALTIVEC | |
2426 | -AltiVecUnavailable: | |
2427 | - EXCEPTION_PROLOG | |
2428 | - bne load_up_altivec /* if from user, just load it up */ | |
2429 | - li r20,MSR_KERNEL | |
2430 | - bl transfer_to_handler /* if from kernel, take a trap */ | |
2431 | - .long KernelAltiVec | |
2432 | - .long int_return | |
2433 | - | |
2434 | -/* here are the bits of trap 0xf00 which got displaced */ | |
2435 | -Trap_0f: | |
2436 | - EXCEPTION_PROLOG | |
2437 | - b trap_0f_cont | |
2438 | -#endif /* CONFIG_ALTIVEC */ | |
2439 | - | |
2440 | -#else /* CONFIG_8xx */ | |
2441 | +#else | |
2442 | . = 0x2000 | |
2443 | -#endif /* CONFIG_8xx */ | |
2444 | +#endif | |
2445 | ||
2446 | /* | |
2447 | * This code finishes saving the registers to the exception frame | |
2448 | @@ -1345,7 +1326,11 @@ | |
2449 | /* Construct the high word of the PPC-style PTE */ | |
2450 | mfsrin r5,r3 /* get segment reg for segment */ | |
2451 | rlwinm r5,r5,7,1,24 /* put VSID in 0x7fffff80 bits */ | |
2452 | + | |
2453 | +#ifndef __SMP__ /* do this later for SMP */ | |
2454 | oris r5,r5,0x8000 /* set V (valid) bit */ | |
2455 | +#endif | |
2456 | + | |
2457 | rlwimi r5,r3,10,26,31 /* put in API (abbrev page index) */ | |
2458 | /* Get the address of the primary PTE group in the hash table */ | |
2459 | .globl hash_page_patch_A | |
2460 | @@ -1457,7 +1442,6 @@ | |
2461 | */ | |
2462 | found_empty: | |
2463 | found_slot: | |
2464 | - clrlwi r5,r5,1 /* clear valid bit (0x80000000) */ | |
2465 | stw r5,0(r3) /* clear V (valid) bit in PTE */ | |
2466 | sync | |
2467 | tlbsync | |
2468 | @@ -1509,7 +1493,6 @@ | |
2469 | REST_GPR(20, r21) | |
2470 | REST_2GPRS(22, r21) | |
2471 | lwz r21,GPR21(r21) | |
2472 | - sync | |
2473 | rfi | |
2474 | ||
2475 | #ifdef __SMP__ | |
2476 | @@ -1649,145 +1632,24 @@ | |
2477 | #endif /* __SMP__ */ | |
2478 | blr | |
2479 | ||
2480 | -#ifdef CONFIG_ALTIVEC | |
2481 | -/* Note that the AltiVec support is closely modeled after the FP | |
2482 | - * support. Changes to one are likely to be applicable to the | |
2483 | - * other! */ | |
2484 | -load_up_altivec: | |
2485 | -/* | |
2486 | - * Disable AltiVec for the task which had AltiVec previously, | |
2487 | - * and save its AltiVec registers in its thread_struct. | |
2488 | - * Enables AltiVec for use in the kernel on return. | |
2489 | - * On SMP we know the AltiVec units are free, since we give it up every | |
2490 | - * switch. -- Kumar | |
2491 | - */ | |
2492 | - mfmsr r5 | |
2493 | - oris r5,r5,MSR_VEC@h | |
2494 | - SYNC | |
2495 | - mtmsr r5 /* enable use of AltiVec now */ | |
2496 | - SYNC | |
2497 | -/* | |
2498 | - * For SMP, we don't do lazy AltiVec switching because it just gets too | |
2499 | - * horrendously complex, especially when a task switches from one CPU | |
2500 | - * to another. Instead we call giveup_altivec in switch_to. | |
2501 | - */ | |
2502 | -#ifndef __SMP__ | |
2503 | -#ifndef CONFIG_APUS | |
2504 | - lis r6,-KERNELBASE@h | |
2505 | -#else | |
2506 | - lis r6,CYBERBASEp@h | |
2507 | - lwz r6,0(r6) | |
2508 | -#endif | |
2509 | - addis r3,r6,last_task_used_altivec@ha | |
2510 | - lwz r4,last_task_used_altivec@l(r3) | |
2511 | - cmpi 0,r4,0 | |
2512 | - beq 1f | |
2513 | - add r4,r4,r6 | |
2514 | - addi r4,r4,TSS /* want TSS of last_task_used_altivec */ | |
2515 | - SAVE_32VR(0,r20,r4) | |
2516 | - MFVSCR(vr0) | |
2517 | - li r20,TSS_VSCR | |
2518 | - STVX(vr0,r20,r4) | |
2519 | - lwz r5,PT_REGS(r4) | |
2520 | - add r5,r5,r6 | |
2521 | - lwz r4,_MSR-STACK_FRAME_OVERHEAD(r5) | |
2522 | - lis r20,MSR_VEC@h | |
2523 | - andc r4,r4,r20 /* disable altivec for previous task */ | |
2524 | - stw r4,_MSR-STACK_FRAME_OVERHEAD(r5) | |
2525 | -1: | |
2526 | -#endif /* __SMP__ */ | |
2527 | - /* enable use of AltiVec after return */ | |
2528 | - oris r23,r23,MSR_VEC@h | |
2529 | - mfspr r5,SPRG3 /* current task's TSS (phys) */ | |
2530 | - li r20,TSS_VSCR | |
2531 | - LVX(vr0,r20,r5) | |
2532 | - MTVSCR(vr0) | |
2533 | - REST_32VR(0,r20,r5) | |
2534 | -#ifndef __SMP__ | |
2535 | - subi r4,r5,TSS | |
2536 | - sub r4,r4,r6 | |
2537 | - stw r4,last_task_used_altivec@l(r3) | |
2538 | -#endif /* __SMP__ */ | |
2539 | - /* restore registers and return */ | |
2540 | - lwz r3,_CCR(r21) | |
2541 | - lwz r4,_LINK(r21) | |
2542 | - mtcrf 0xff,r3 | |
2543 | - mtlr r4 | |
2544 | - REST_GPR(1, r21) | |
2545 | - REST_4GPRS(3, r21) | |
2546 | - /* we haven't used ctr or xer */ | |
2547 | - mtspr SRR1,r23 | |
2548 | - mtspr SRR0,r22 | |
2549 | - REST_GPR(20, r21) | |
2550 | - REST_2GPRS(22, r21) | |
2551 | - lwz r21,GPR21(r21) | |
2552 | - SYNC | |
2553 | - rfi | |
2554 | - | |
2555 | -/* | |
2556 | - * AltiVec unavailable trap from kernel - print a message, but let | |
2557 | - * the task use AltiVec in the kernel until it returns to user mode. | |
2558 | - */ | |
2559 | -KernelAltiVec: | |
2560 | - lwz r3,_MSR(r1) | |
2561 | - oris r3,r3,MSR_VEC@h | |
2562 | - stw r3,_MSR(r1) /* enable use of AltiVec after return */ | |
2563 | - lis r3,87f@h | |
2564 | - ori r3,r3,87f@l | |
2565 | - mr r4,r2 /* current */ | |
2566 | - lwz r5,_NIP(r1) | |
2567 | - bl printk | |
2568 | - b int_return | |
2569 | -87: .string "AltiVec used in kernel (task=%p, pc=%x) \n" | |
2570 | - .align 4 | |
2571 | - | |
2572 | -/* | |
2573 | - * giveup_altivec(tsk) | |
2574 | - * Disable AltiVec for the task given as the argument, | |
2575 | - * and save the AltiVec registers in its thread_struct. | |
2576 | - * Enables AltiVec for use in the kernel on return. | |
2577 | - */ | |
2578 | - | |
2579 | - .globl giveup_altivec | |
2580 | -giveup_altivec: | |
2581 | - mfmsr r5 | |
2582 | - oris r5,r5,MSR_VEC@h | |
2583 | - SYNC | |
2584 | - mtmsr r5 /* enable use of AltiVec now */ | |
2585 | - SYNC | |
2586 | - cmpi 0,r3,0 | |
2587 | - beqlr- /* if no previous owner, done */ | |
2588 | - addi r3,r3,TSS /* want TSS of task */ | |
2589 | - lwz r5,PT_REGS(r3) | |
2590 | - cmpi 0,r5,0 | |
2591 | - SAVE_32VR(0, r4, r3) | |
2592 | - MFVSCR(vr0) | |
2593 | - li r4,TSS_VSCR | |
2594 | - STVX(vr0, r4, r3) | |
2595 | - beq 1f | |
2596 | - lwz r4,_MSR-STACK_FRAME_OVERHEAD(r5) | |
2597 | - lis r3,MSR_VEC@h | |
2598 | - andc r4,r4,r3 /* disable AltiVec for previous task */ | |
2599 | - stw r4,_MSR-STACK_FRAME_OVERHEAD(r5) | |
2600 | -1: | |
2601 | -#ifndef __SMP__ | |
2602 | - li r5,0 | |
2603 | - lis r4,last_task_used_altivec@ha | |
2604 | - stw r5,last_task_used_altivec@l(r4) | |
2605 | -#endif /* __SMP__ */ | |
2606 | +#else /* CONFIG_8xx */ | |
2607 | + .globl giveup_fpu | |
2608 | +giveup_fpu: | |
2609 | blr | |
2610 | -#endif /* CONFIG_ALTIVEC */ | |
2611 | +#endif /* CONFIG_8xx */ | |
2612 | ||
2613 | mmu_off: | |
2614 | - addi r4, r3, mmu_off_return - _start | |
2615 | + addi r4, r3, __secondary_start - _start | |
2616 | mfmsr r3 | |
2617 | andi. r0,r3,MSR_DR|MSR_IR /* MMU enabled? */ | |
2618 | - beqlr | |
2619 | - andc r3,r3,r0 | |
2620 | + beq 1f | |
2621 | + ori r3,r3,MSR_DR|MSR_IR | |
2622 | + xori r3,r3,MSR_DR|MSR_IR | |
2623 | mtspr SRR0,r4 | |
2624 | mtspr SRR1,r3 | |
2625 | - SYNC | |
2626 | + sync | |
2627 | rfi | |
2628 | +1: blr | |
2629 | ||
2630 | /* | |
2631 | * This code is jumped to from the startup code to copy | |
2632 | @@ -1798,6 +1660,10 @@ | |
2633 | addi r9,r9,0x6f58 /* translate source addr */ | |
2634 | cmpw r31,r9 /* (we have to on chrp) */ | |
2635 | beq 7f | |
2636 | +#if 0 // still needed ? breaks on me if I don't disable this | |
2637 | + rlwinm r4,r4,0,8,31 /* translate source address */ | |
2638 | + add r4,r4,r3 /* to region mapped with BATs */ | |
2639 | +#endif | |
2640 | 7: addis r9,r26,klimit@ha /* fetch klimit */ | |
2641 | lwz r25,klimit@l(r9) | |
2642 | addis r25,r25,-KERNELBASE@h | |
2643 | @@ -1845,12 +1711,6 @@ | |
2644 | . = 0x4000 | |
2645 | #endif | |
2646 | ||
2647 | -#else /* CONFIG_8xx */ | |
2648 | - .globl giveup_fpu | |
2649 | -giveup_fpu: | |
2650 | - blr | |
2651 | -#endif /* CONFIG_8xx */ | |
2652 | - | |
2653 | turn_on_mmu: | |
2654 | mfmsr r0 | |
2655 | ori r1,r0,MSR_DR|MSR_IR | |
2656 | @@ -1913,7 +1773,7 @@ | |
2657 | mfspr r9,PVR | |
2658 | rlwinm r9,r9,16,16,31 | |
2659 | cmpi 0,r9,1 | |
2660 | - beq 6f /* not needed for 601 */ | |
2661 | + beq 4f /* not needed for 601 */ | |
2662 | mfspr r11,HID0 | |
2663 | andi. r0,r11,HID0_DCE | |
2664 | ori r11,r11,HID0_ICE|HID0_DCE | |
2665 | @@ -1930,24 +1790,14 @@ | |
2666 | cmpi 0,r9,4 /* check for 604 */ | |
2667 | cmpi 1,r9,9 /* or 604e */ | |
2668 | cmpi 2,r9,10 /* or mach5 */ | |
2669 | - cmpi 3,r9,8 /* check for 750 (G3) */ | |
2670 | - cmpi 4,r9,12 /* or 7400 (G4) */ | |
2671 | cror 2,2,6 | |
2672 | cror 2,2,10 | |
2673 | bne 4f | |
2674 | ori r11,r11,HID0_SIED|HID0_BHTE /* for 604[e], enable */ | |
2675 | bne 2,5f | |
2676 | ori r11,r11,HID0_BTCD | |
2677 | - b 5f | |
2678 | -4: | |
2679 | - cror 14,14,18 | |
2680 | - bne 3,6f | |
2681 | - ori r11,r11,HID0_SGE|HID0_BHTE|HID0_BTIC|HID0_ABE /* for g3/g4, enable */ | |
2682 | - rlwinm r11,r11,0,23,21 /* clear HID0_SPD */ | |
2683 | - li r3,0 | |
2684 | - mtspr ICTC,r3 | |
2685 | 5: mtspr HID0,r11 /* superscalar exec & br history tbl */ | |
2686 | -6: | |
2687 | +4: | |
2688 | #endif /* CONFIG_8xx */ | |
2689 | #ifdef __SMP__ | |
2690 | /* if we're the second cpu stack and r2 are different | |
2691 | @@ -2028,10 +1878,10 @@ | |
2692 | li r3,MSR_KERNEL & ~(MSR_IR|MSR_DR) | |
2693 | mtspr SRR0,r4 | |
2694 | mtspr SRR1,r3 | |
2695 | - SYNC | |
2696 | rfi | |
2697 | /* Load up the kernel context */ | |
2698 | 2: | |
2699 | + SYNC /* Force all PTE updates to finish */ | |
2700 | tlbia /* Clear all TLB entries */ | |
2701 | sync /* wait for tlbia/tlbie to finish */ | |
2702 | #ifdef __SMP__ | |
2703 | @@ -2088,7 +1938,6 @@ | |
2704 | #endif /* __SMP__ */ | |
2705 | mtspr SRR0,r3 | |
2706 | mtspr SRR1,r4 | |
2707 | - SYNC | |
2708 | rfi /* enable MMU and jump to start_kernel */ | |
2709 | ||
2710 | /* | |
2711 | @@ -2126,11 +1975,9 @@ | |
2712 | 1: | |
2713 | #endif /* SHOW_SYSCALLS */ | |
2714 | cmpi 0,r0,0x7777 /* Special case for 'sys_sigreturn' */ | |
2715 | - cmpi 1,r0,0x6666 /* Special case for 'sys_rt_sigreturn' */ | |
2716 | beq- 10f | |
2717 | - beq- cr1,16f | |
2718 | - lwz r10,TASK_PTRACE(r2) | |
2719 | - andi. r10,r10,PT_TRACESYS | |
2720 | + lwz r10,TASK_FLAGS(r2) | |
2721 | + andi. r10,r10,PF_TRACESYS | |
2722 | bne- 50f | |
2723 | cmpli 0,r0,NR_syscalls | |
2724 | bge- 66f | |
2725 | @@ -2175,12 +2022,6 @@ | |
2726 | /* sys_sigreturn */ | |
2727 | 10: addi r3,r1,STACK_FRAME_OVERHEAD | |
2728 | bl sys_sigreturn | |
2729 | - cmpi 0,r3,0 /* Check for restarted system call */ | |
2730 | - bge int_return | |
2731 | - b 20b | |
2732 | -/* sys_rt_sigreturn */ | |
2733 | -16: addi r3,r1,STACK_FRAME_OVERHEAD | |
2734 | - bl sys_rt_sigreturn | |
2735 | cmpi 0,r3,0 /* Check for restarted system call */ | |
2736 | bge int_return | |
2737 | b 20b | |
2738 | @@ -2273,9 +2114,6 @@ | |
2739 | mflr r20 /* Return to switch caller */ | |
2740 | mfmsr r22 | |
2741 | li r0,MSR_FP /* Disable floating-point */ | |
2742 | -#ifdef CONFIG_ALTIVEC | |
2743 | - oris r0,r0,MSR_VEC@h | |
2744 | -#endif /* CONFIG_ALTIVEC */ | |
2745 | andc r22,r22,r0 | |
2746 | stw r20,_NIP(r1) | |
2747 | stw r22,_MSR(r1) | |
2748 | @@ -2589,38 +2427,6 @@ | |
2749 | blr | |
2750 | ||
2751 | /* | |
2752 | - * Copy a whole page. We use the dcbz instruction on the destination | |
2753 | - * to reduce memory traffic (it eliminates the unnecessary reads of | |
2754 | - * the destination into cache). This requires that the destination | |
2755 | - * is cacheable. | |
2756 | - */ | |
2757 | -_GLOBAL(copy_page) | |
2758 | - li r0,4096/CACHE_LINE_SIZE | |
2759 | - mtctr r0 | |
2760 | - addi r3,r3,-4 | |
2761 | - addi r4,r4,-4 | |
2762 | - li r5,4 | |
2763 | -1: dcbz r5,r3 | |
2764 | - lwz r6,4(r4) | |
2765 | - lwz r7,8(r4) | |
2766 | - lwz r8,12(r4) | |
2767 | - lwzu r9,16(r4) | |
2768 | - stw r6,4(r3) | |
2769 | - stw r7,8(r3) | |
2770 | - stw r8,12(r3) | |
2771 | - stwu r9,16(r3) | |
2772 | - lwz r6,4(r4) | |
2773 | - lwz r7,8(r4) | |
2774 | - lwz r8,12(r4) | |
2775 | - lwzu r9,16(r4) | |
2776 | - stw r6,4(r3) | |
2777 | - stw r7,8(r3) | |
2778 | - stw r8,12(r3) | |
2779 | - stwu r9,16(r3) | |
2780 | - bdnz 1b | |
2781 | - blr | |
2782 | - | |
2783 | -/* | |
2784 | * Flush entries from the hash table with VSIDs in the range | |
2785 | * given. | |
2786 | */ | |
2787 | @@ -2798,6 +2604,7 @@ | |
2788 | stw r0,20(r1) | |
2789 | lis r4,rtas_data@ha | |
2790 | lwz r4,rtas_data@l(r4) | |
2791 | + addis r4,r4,-KERNELBASE@h | |
2792 | lis r6,1f@ha /* physical return address for rtas */ | |
2793 | addi r6,r6,1f@l | |
2794 | addis r6,r6,-KERNELBASE@h | |
2795 | @@ -2817,7 +2624,6 @@ | |
2796 | mtspr SPRG2,r7 | |
2797 | mtspr SRR0,r8 | |
2798 | mtspr SRR1,r9 | |
2799 | - SYNC | |
2800 | rfi | |
2801 | 1: addis r9,r1,-KERNELBASE@h | |
2802 | lwz r8,20(r9) /* get return address */ | |
2803 | @@ -2826,7 +2632,6 @@ | |
2804 | mtspr SPRG2,r0 | |
2805 | mtspr SRR0,r8 | |
2806 | mtspr SRR1,r9 | |
2807 | - SYNC | |
2808 | rfi /* return to caller */ | |
2809 | #endif /* CONFIG_8xx */ | |
2810 | ||
2811 | @@ -2851,6 +2656,30 @@ | |
2812 | mtlr r4 | |
2813 | blr | |
2814 | #endif /* CONFIG_8xx */ | |
2815 | + | |
2816 | +/* | |
2817 | + * We put a few things here that have to be page-aligned. | |
2818 | + * This stuff goes at the beginning of the data segment, | |
2819 | + * which is page-aligned. | |
2820 | + */ | |
2821 | + .data | |
2822 | + .globl sdata | |
2823 | +sdata: | |
2824 | + .globl empty_zero_page | |
2825 | +empty_zero_page: | |
2826 | + .space 4096 | |
2827 | + | |
2828 | + .globl swapper_pg_dir | |
2829 | +swapper_pg_dir: | |
2830 | + .space 4096 | |
2831 | + | |
2832 | +/* | |
2833 | + * This space gets a copy of optional info passed to us by the bootstrap | |
2834 | + * Used to pass parameters into the kernel like root=/dev/sda1, etc. | |
2835 | + */ | |
2836 | + .globl cmd_line | |
2837 | +cmd_line: | |
2838 | + .space 512 | |
2839 | ||
2840 | /* | |
2841 | * An undocumented "feature" of 604e requires that the v bit | |
2842 | @@ -2895,117 +2724,4 @@ | |
2843 | blt 1b | |
2844 | sync | |
2845 | blr | |
2846 | - | |
2847 | -/* Use the first pair of BAT registers to map the 1st 16MB | |
2848 | - * of RAM to KERNELBASE. From this point on we can't safely | |
2849 | - * call OF any more. | |
2850 | - */ | |
2851 | -setup_init_bats: | |
2852 | - lis r11,KERNELBASE@h | |
2853 | - mfspr r9,PVR | |
2854 | - rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */ | |
2855 | - cmpi 0,r9,1 | |
2856 | - bne 4f | |
2857 | - ori r11,r11,4 /* set up BAT registers for 601 */ | |
2858 | - li r8,0x7f /* valid, block length = 8MB */ | |
2859 | - oris r9,r11,0x800000@h /* set up BAT reg for 2nd 8M */ | |
2860 | - oris r10,r8,0x800000@h /* set up BAT reg for 2nd 8M */ | |
2861 | - mtspr IBAT0U,r11 /* N.B. 601 has valid bit in */ | |
2862 | - mtspr IBAT0L,r8 /* lower BAT register */ | |
2863 | - mtspr IBAT1U,r9 | |
2864 | - mtspr IBAT1L,r10 | |
2865 | - b 5f | |
2866 | -4: | |
2867 | -#ifdef CONFIG_APUS | |
2868 | - ori r11,r11,BL_8M<<2|0x2 /* set up an 8MB mapping */ | |
2869 | - ori r11,r11,0xfe /* set up an 8MB mapping */ | |
2870 | - lis r8,CYBERBASEp@h | |
2871 | - lwz r8,0(r8) | |
2872 | - addis r8,r8,KERNELBASE@h | |
2873 | - addi r8,r8,2 | |
2874 | -#else | |
2875 | - ori r11,r11,BL_256M<<2|0x2 /* set up BAT registers for 604 */ | |
2876 | - li r8,2 /* R/W access */ | |
2877 | - /* | |
2878 | - * If the MMU is off clear the bats. See clear_bat() -- Cort | |
2879 | - */ | |
2880 | -#ifndef CONFIG_GEMINI | |
2881 | - /* | |
2882 | - * allow secondary cpus to get at all of ram in early bootup | |
2883 | - * since their init_task may be up there -- Cort | |
2884 | - */ | |
2885 | - oris r18,r8,0x10000000@h | |
2886 | - oris r21,r11,(KERNELBASE+0x10000000)@h | |
2887 | - mtspr DBAT1L,r18 /* N.B. 6xx (not 601) have valid */ | |
2888 | - mtspr DBAT1U,r21 /* bit in upper BAT register */ | |
2889 | - mtspr IBAT1L,r18 | |
2890 | - mtspr IBAT1U,r21 | |
2891 | ||
2892 | - oris r18,r8,0x20000000@h | |
2893 | - oris r21,r11,(KERNELBASE+0x20000000)@h | |
2894 | - mtspr DBAT2L,r18 /* N.B. 6xx (not 601) have valid */ | |
2895 | - mtspr DBAT2U,r21 /* bit in upper BAT register */ | |
2896 | - mtspr IBAT2L,r18 | |
2897 | - mtspr IBAT2U,r21 | |
2898 | -#endif /* ndef CONFIG_GEMINI */ | |
2899 | -#endif | |
2900 | - mtspr DBAT0L,r8 /* N.B. 6xx (not 601) have valid */ | |
2901 | - mtspr DBAT0U,r11 /* bit in upper BAT register */ | |
2902 | - mtspr IBAT0L,r8 | |
2903 | - mtspr IBAT0U,r11 | |
2904 | -5: isync | |
2905 | - blr | |
2906 | - | |
2907 | -#ifdef CONFIG_BOOTX_TEXT | |
2908 | -setup_disp_bat: | |
2909 | - /* | |
2910 | - * setup the display bat prepared for us in prom.c | |
2911 | - */ | |
2912 | - mflr r8 | |
2913 | - bl reloc_offset | |
2914 | - mtlr r8 | |
2915 | - lis r8, disp_BATL@h | |
2916 | - ori r8, r8, disp_BATL@l | |
2917 | - add r8, r3, r8 | |
2918 | - lwz r8, 0(r8) | |
2919 | - lis r11, disp_BATU@h | |
2920 | - ori r11, r11, disp_BATU@l | |
2921 | - add r11, r3, r11 | |
2922 | - lwz r11, 0(r11) | |
2923 | - mtspr IBAT3L,r8 | |
2924 | - mtspr IBAT3U,r11 | |
2925 | - mfspr r9,PVR | |
2926 | - rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */ | |
2927 | - cmpi 0,r9,1 | |
2928 | - beq 1f | |
2929 | - mtspr DBAT3L,r8 | |
2930 | - mtspr DBAT3U,r11 | |
2931 | -1: | |
2932 | - blr | |
2933 | -#endif | |
2934 | - | |
2935 | -/* | |
2936 | - * We put a few things here that have to be page-aligned. | |
2937 | - * This stuff goes at the beginning of the data segment, | |
2938 | - * which is page-aligned. | |
2939 | - */ | |
2940 | - .data | |
2941 | - .globl sdata | |
2942 | -sdata: | |
2943 | - .globl empty_zero_page | |
2944 | -empty_zero_page: | |
2945 | - .space 4096 | |
2946 | - | |
2947 | - .globl swapper_pg_dir | |
2948 | -swapper_pg_dir: | |
2949 | - .space 4096 | |
2950 | - | |
2951 | -/* | |
2952 | - * This space gets a copy of optional info passed to us by the bootstrap | |
2953 | - * Used to pass parameters into the kernel like root=/dev/sda1, etc. | |
2954 | - */ | |
2955 | - .globl cmd_line | |
2956 | -cmd_line: | |
2957 | - .space 512 | |
2958 | - | |
2959 | - | |
2960 | diff -urN linux.orig/arch/ppc/kernel/irq.c linux/arch/ppc/kernel/irq.c | |
2961 | --- linux.orig/arch/ppc/kernel/irq.c Sun Mar 25 18:31:48 2001 | |
2962 | +++ linux/arch/ppc/kernel/irq.c Thu Jul 11 15:43:29 2002 | |
2963 | @@ -61,9 +61,7 @@ | |
2964 | ||
2965 | #include "local_irq.h" | |
2966 | ||
2967 | -extern atomic_t ipi_recv; | |
2968 | -extern atomic_t ipi_sent; | |
2969 | -void enable_irq(unsigned int irq_nr); | |
2970 | +extern volatile unsigned long ipi_count; | |
2971 | void enable_irq(unsigned int irq_nr); | |
2972 | void disable_irq(unsigned int irq_nr); | |
2973 | ||
2974 | @@ -139,21 +137,20 @@ | |
2975 | if (!handler) | |
2976 | { | |
2977 | /* Free */ | |
2978 | - p = &irq_desc[irq].action; | |
2979 | - while ((action = *p) != NULL && action->dev_id != dev_id) | |
2980 | - p = &action->next; | |
2981 | - if (action == NULL) | |
2982 | - return -ENOENT; | |
2983 | - | |
2984 | - /* Found it - now free it */ | |
2985 | - save_flags(flags); | |
2986 | - cli(); | |
2987 | - *p = action->next; | |
2988 | - if (irq_desc[irq].action == NULL) | |
2989 | - disable_irq(irq); | |
2990 | - restore_flags(flags); | |
2991 | - irq_kfree(action); | |
2992 | - return 0; | |
2993 | + for (p = &irq_desc[irq].action; (action = *p) != NULL; p = &action->next) | |
2994 | + { | |
2995 | + if (action->dev_id == dev_id) | |
2996 | + { | |
2997 | + /* Found it - now free it */ | |
2998 | + save_flags(flags); | |
2999 | + cli(); | |
3000 | + *p = action->next; | |
3001 | + restore_flags(flags); | |
3002 | + irq_kfree(action); | |
3003 | + return 0; | |
3004 | + } | |
3005 | + } | |
3006 | + return -ENOENT; | |
3007 | } | |
3008 | ||
3009 | action = (struct irqaction *) | |
3010 | @@ -244,10 +241,8 @@ | |
3011 | } | |
3012 | #ifdef __SMP__ | |
3013 | /* should this be per processor send/receive? */ | |
3014 | - /* should this be per processor send/receive? */ | |
3015 | - len += sprintf(buf+len, "IPI: (recv/sent) %10lu/%lu\n", | |
3016 | - atomic_read(&ipi_recv), atomic_read(&ipi_sent)); | |
3017 | -#endif /* __SMP__ */ | |
3018 | + len += sprintf(buf+len, "IPI: %10lu\n", ipi_count); | |
3019 | +#endif | |
3020 | len += sprintf(buf+len, "BAD: %10u\n", ppc_spurious_interrupts); | |
3021 | return len; | |
3022 | } | |
3023 | @@ -322,14 +317,10 @@ | |
3024 | atomic_t global_bh_count; | |
3025 | atomic_t global_bh_lock; | |
3026 | ||
3027 | -extern unsigned long *_get_SP(void); | |
3028 | - | |
3029 | static void show(char * str) | |
3030 | { | |
3031 | -#if 0 | |
3032 | int i; | |
3033 | unsigned long *stack; | |
3034 | -#endif | |
3035 | int cpu = smp_processor_id(); | |
3036 | ||
3037 | printk("\n%s, CPU %d:\n", str, cpu); | |
3038 | @@ -341,10 +332,6 @@ | |
3039 | atomic_read(&global_bh_count), | |
3040 | ppc_local_bh_count[0], | |
3041 | ppc_local_bh_count[1]); | |
3042 | -#if 1 | |
3043 | - printk(" CPU: %d last CPU: %d\n", current->processor,current->last_processor); | |
3044 | - print_backtrace (_get_SP()); | |
3045 | -#else | |
3046 | stack = (unsigned long *) &str; | |
3047 | for (i = 40; i ; i--) { | |
3048 | unsigned long x = *++stack; | |
3049 | @@ -352,7 +339,6 @@ | |
3050 | printk("<[%08lx]> ", x); | |
3051 | } | |
3052 | } | |
3053 | -#endif | |
3054 | } | |
3055 | ||
3056 | static inline void wait_on_bh(void) | |
3057 | diff -urN linux.orig/arch/ppc/kernel/local_irq.h linux/arch/ppc/kernel/local_irq.h | |
3058 | --- linux.orig/arch/ppc/kernel/local_irq.h Sun Mar 25 18:31:49 2001 | |
3059 | +++ linux/arch/ppc/kernel/local_irq.h Thu Jul 11 15:43:29 2002 | |
3060 | @@ -26,7 +26,6 @@ | |
3061 | struct irqdesc { | |
3062 | struct irqaction *action; | |
3063 | struct hw_interrupt_type *ctl; | |
3064 | - int level; | |
3065 | }; | |
3066 | ||
3067 | extern struct irqdesc irq_desc[NR_IRQS]; | |
3068 | diff -urN linux.orig/arch/ppc/kernel/mbx_pci.c linux/arch/ppc/kernel/mbx_pci.c | |
3069 | --- linux.orig/arch/ppc/kernel/mbx_pci.c Sun Mar 25 18:31:49 2001 | |
3070 | +++ linux/arch/ppc/kernel/mbx_pci.c Thu Jul 11 15:43:29 2002 | |
3071 | @@ -17,9 +17,7 @@ | |
3072 | ||
3073 | #include <asm/io.h> | |
3074 | #include <asm/mbx.h> | |
3075 | -#include <asm/machdep.h> | |
3076 | ||
3077 | -#include "pci.h" | |
3078 | ||
3079 | /* | |
3080 | * This blows......The MBX uses the Tundra QSpan PCI bridge. When | |
3081 | diff -urN linux.orig/arch/ppc/kernel/mbx_setup.c linux/arch/ppc/kernel/mbx_setup.c | |
3082 | --- linux.orig/arch/ppc/kernel/mbx_setup.c Sun Mar 25 18:31:49 2001 | |
3083 | +++ linux/arch/ppc/kernel/mbx_setup.c Thu Jul 11 15:43:29 2002 | |
3084 | @@ -31,7 +31,6 @@ | |
3085 | #include <linux/init.h> | |
3086 | #include <linux/blk.h> | |
3087 | #include <linux/ioport.h> | |
3088 | -#include <linux/delay.h> | |
3089 | ||
3090 | #include <asm/mmu.h> | |
3091 | #include <asm/processor.h> | |
3092 | @@ -41,25 +40,14 @@ | |
3093 | #include <asm/ide.h> | |
3094 | #include <asm/mbx.h> | |
3095 | #include <asm/machdep.h> | |
3096 | -#include <asm/keyboard.h> | |
3097 | -#include <asm/8xx_immap.h> | |
3098 | -#include <asm/time.h> | |
3099 | ||
3100 | +#include "time.h" | |
3101 | #include "local_irq.h" | |
3102 | ||
3103 | static int mbx_set_rtc_time(unsigned long time); | |
3104 | unsigned long mbx_get_rtc_time(void); | |
3105 | void mbx_calibrate_decr(void); | |
3106 | ||
3107 | -extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode); | |
3108 | -extern int pckbd_getkeycode(unsigned int scancode); | |
3109 | -extern int pckbd_translate(unsigned char scancode, unsigned char *keycode, | |
3110 | - char raw_mode); | |
3111 | -extern char pckbd_unexpected_up(unsigned char keycode); | |
3112 | -extern void pckbd_leds(unsigned char leds); | |
3113 | -extern void pckbd_init_hw(void); | |
3114 | -extern unsigned char pckbd_sysrq_xlate[128]; | |
3115 | - | |
3116 | extern int mackbd_setkeycode(unsigned int scancode, unsigned int keycode); | |
3117 | extern int mackbd_getkeycode(unsigned int scancode); | |
3118 | extern int mackbd_translate(unsigned char scancode, unsigned char *keycode, | |
3119 | @@ -68,6 +56,8 @@ | |
3120 | extern void mackbd_leds(unsigned char leds); | |
3121 | extern void mackbd_init_hw(void); | |
3122 | ||
3123 | +extern unsigned long loops_per_jiffy; | |
3124 | + | |
3125 | unsigned long empty_zero_page[1024]; | |
3126 | ||
3127 | #ifdef CONFIG_BLK_DEV_RAM | |
3128 | @@ -463,7 +453,7 @@ | |
3129 | ppc_md.kbd_leds = pckbd_leds; | |
3130 | ppc_md.kbd_init_hw = pckbd_init_hw; | |
3131 | #ifdef CONFIG_MAGIC_SYSRQ | |
3132 | - ppc_md.sysrq_xlate = pckbd_sysrq_xlate; | |
3133 | + ppc_md.kbd_sysrq_xlate = pckbd_sysrq_xlate; | |
3134 | SYSRQ_KEY = 0x54; | |
3135 | #endif | |
3136 | ||
3137 | diff -urN linux.orig/arch/ppc/kernel/misc.S linux/arch/ppc/kernel/misc.S | |
3138 | --- linux.orig/arch/ppc/kernel/misc.S Sun Mar 25 18:37:30 2001 | |
3139 | +++ linux/arch/ppc/kernel/misc.S Thu Jul 11 15:43:29 2002 | |
3140 | @@ -125,33 +125,12 @@ | |
3141 | * Flush MMU TLB | |
3142 | */ | |
3143 | _GLOBAL(_tlbia) | |
3144 | -#if defined(CONFIG_SMP) | |
3145 | - mfmsr r10 | |
3146 | - sync | |
3147 | - rlwinm r0,r10,0,17,15 /* clear bit 16 (MSR_EE) */ | |
3148 | - mtmsr r0 | |
3149 | - SYNC | |
3150 | - lis r9,hash_table_lock@h | |
3151 | - ori r9,r9,hash_table_lock@l | |
3152 | - lwz r8,PROCESSOR(r2) | |
3153 | - oris r8,r8,10 | |
3154 | -10: lwarx r7,0,r9 | |
3155 | - cmpi 0,r7,0 | |
3156 | - bne- 10b | |
3157 | - stwcx. r8,0,r9 | |
3158 | - bne- 10b | |
3159 | - eieio | |
3160 | -#endif /* CONFIG_SMP */ | |
3161 | sync | |
3162 | tlbia | |
3163 | sync | |
3164 | #ifdef __SMP__ | |
3165 | tlbsync | |
3166 | sync | |
3167 | - li r0,0 | |
3168 | - stw r0,0(r9) /* clear hash_table_lock */ | |
3169 | - mtmsr r10 | |
3170 | - SYNC | |
3171 | #endif | |
3172 | blr | |
3173 | ||
3174 | @@ -159,32 +138,11 @@ | |
3175 | * Flush MMU TLB for a particular address | |
3176 | */ | |
3177 | _GLOBAL(_tlbie) | |
3178 | -#if defined(CONFIG_SMP) | |
3179 | - mfmsr r10 | |
3180 | - sync | |
3181 | - rlwinm r0,r10,0,17,15 /* clear bit 16 (MSR_EE) */ | |
3182 | - mtmsr r0 | |
3183 | - SYNC | |
3184 | - lis r9,hash_table_lock@h | |
3185 | - ori r9,r9,hash_table_lock@l | |
3186 | - lwz r8,PROCESSOR(r2) | |
3187 | - oris r8,r8,11 | |
3188 | -10: lwarx r7,0,r9 | |
3189 | - cmpi 0,r7,0 | |
3190 | - bne- 10b | |
3191 | - stwcx. r8,0,r9 | |
3192 | - bne- 10b | |
3193 | - eieio | |
3194 | -#endif /* CONFIG_SMP */ | |
3195 | tlbie r3 | |
3196 | sync | |
3197 | -#ifdef CONFIG_SMP | |
3198 | +#ifdef __SMP__ | |
3199 | tlbsync | |
3200 | sync | |
3201 | - li r0,0 | |
3202 | - stw r0,0(r9) /* clear hash_table_lock */ | |
3203 | - mtmsr r10 | |
3204 | - SYNC | |
3205 | #endif | |
3206 | blr | |
3207 | ||
3208 | @@ -317,8 +275,10 @@ | |
3209 | stwcx. r5,0,r3 /* Update with new value */ | |
3210 | bne- 10b /* Retry if "reservation" (i.e. lock) lost */ | |
3211 | SMP_MB | |
3212 | - cntlzw r3,r5 | |
3213 | - srwi r3,r3,5 | |
3214 | + cmpi 0,r5,0 /* Return 'true' IFF 0 */ | |
3215 | + li r3,1 | |
3216 | + beqlr | |
3217 | + li r3,0 | |
3218 | blr | |
3219 | _GLOBAL(atomic_clear_mask) | |
3220 | SMP_WMB /* wmb() */ | |
3221 | @@ -354,10 +314,8 @@ | |
3222 | * The *_ns versions don't do byte-swapping. | |
3223 | */ | |
3224 | _GLOBAL(_insb) | |
3225 | - cmpwi 0,r5,0 | |
3226 | mtctr r5 | |
3227 | subi r4,r4,1 | |
3228 | - blelr- | |
3229 | 00: lbz r5,0(r3) | |
3230 | eieio | |
3231 | stbu r5,1(r4) | |
3232 | @@ -365,10 +323,8 @@ | |
3233 | blr | |
3234 | ||
3235 | _GLOBAL(_outsb) | |
3236 | - cmpwi 0,r5,0 | |
3237 | mtctr r5 | |
3238 | subi r4,r4,1 | |
3239 | - blelr- | |
3240 | 00: lbzu r5,1(r4) | |
3241 | stb r5,0(r3) | |
3242 | eieio | |
3243 | @@ -376,10 +332,8 @@ | |
3244 | blr | |
3245 | ||
3246 | _GLOBAL(_insw) | |
3247 | - cmpwi 0,r5,0 | |
3248 | mtctr r5 | |
3249 | subi r4,r4,2 | |
3250 | - blelr- | |
3251 | 00: lhbrx r5,0,r3 | |
3252 | eieio | |
3253 | sthu r5,2(r4) | |
3254 | @@ -387,10 +341,8 @@ | |
3255 | blr | |
3256 | ||
3257 | _GLOBAL(_outsw) | |
3258 | - cmpwi 0,r5,0 | |
3259 | mtctr r5 | |
3260 | subi r4,r4,2 | |
3261 | - blelr- | |
3262 | 00: lhzu r5,2(r4) | |
3263 | eieio | |
3264 | sthbrx r5,0,r3 | |
3265 | @@ -398,10 +350,8 @@ | |
3266 | blr | |
3267 | ||
3268 | _GLOBAL(_insl) | |
3269 | - cmpwi 0,r5,0 | |
3270 | mtctr r5 | |
3271 | subi r4,r4,4 | |
3272 | - blelr- | |
3273 | 00: lwbrx r5,0,r3 | |
3274 | eieio | |
3275 | stwu r5,4(r4) | |
3276 | @@ -409,10 +359,8 @@ | |
3277 | blr | |
3278 | ||
3279 | _GLOBAL(_outsl) | |
3280 | - cmpwi 0,r5,0 | |
3281 | mtctr r5 | |
3282 | subi r4,r4,4 | |
3283 | - blelr- | |
3284 | 00: lwzu r5,4(r4) | |
3285 | stwbrx r5,0,r3 | |
3286 | eieio | |
3287 | @@ -421,10 +369,8 @@ | |
3288 | ||
3289 | _GLOBAL(ide_insw) | |
3290 | _GLOBAL(_insw_ns) | |
3291 | - cmpwi 0,r5,0 | |
3292 | mtctr r5 | |
3293 | subi r4,r4,2 | |
3294 | - blelr- | |
3295 | 00: lhz r5,0(r3) | |
3296 | eieio | |
3297 | sthu r5,2(r4) | |
3298 | @@ -433,10 +379,8 @@ | |
3299 | ||
3300 | _GLOBAL(ide_outsw) | |
3301 | _GLOBAL(_outsw_ns) | |
3302 | - cmpwi 0,r5,0 | |
3303 | mtctr r5 | |
3304 | subi r4,r4,2 | |
3305 | - blelr- | |
3306 | 00: lhzu r5,2(r4) | |
3307 | sth r5,0(r3) | |
3308 | eieio | |
3309 | @@ -444,10 +388,8 @@ | |
3310 | blr | |
3311 | ||
3312 | _GLOBAL(_insl_ns) | |
3313 | - cmpwi 0,r5,0 | |
3314 | mtctr r5 | |
3315 | subi r4,r4,4 | |
3316 | - blelr- | |
3317 | 00: lwz r5,0(r3) | |
3318 | eieio | |
3319 | stwu r5,4(r4) | |
3320 | @@ -455,10 +397,8 @@ | |
3321 | blr | |
3322 | ||
3323 | _GLOBAL(_outsl_ns) | |
3324 | - cmpwi 0,r5,0 | |
3325 | mtctr r5 | |
3326 | subi r4,r4,4 | |
3327 | - blelr- | |
3328 | 00: lwzu r5,4(r4) | |
3329 | stw r5,0(r3) | |
3330 | eieio | |
3331 | @@ -466,59 +406,48 @@ | |
3332 | blr | |
3333 | ||
3334 | /* | |
3335 | - * Extended precision shifts. | |
3336 | - * | |
3337 | - * Updated to be valid for shift counts from 0 to 63 inclusive. | |
3338 | - * -- Gabriel | |
3339 | + * Extended precision shifts | |
3340 | * | |
3341 | * R3/R4 has 64 bit value | |
3342 | * R5 has shift count | |
3343 | * result in R3/R4 | |
3344 | * | |
3345 | - * ashrdi3: arithmetic right shift (sign propagation) | |
3346 | - * lshrdi3: logical right shift | |
3347 | - * ashldi3: left shift | |
3348 | + * ashrdi3: XXXYYY/ZZZAAA -> SSSXXX/YYYZZZ | |
3349 | + * ashldi3: XXXYYY/ZZZAAA -> YYYZZZ/AAA000 | |
3350 | + * lshrdi3: XXXYYY/ZZZAAA -> 000XXX/YYYZZZ | |
3351 | */ | |
3352 | _GLOBAL(__ashrdi3) | |
3353 | - subfic r6,r5,32 | |
3354 | - srw r4,r4,r5 # LSW = count > 31 ? 0 : LSW >> count | |
3355 | - addi r7,r5,32 # could be xori, or addi with -32 | |
3356 | - slw r6,r3,r6 # t1 = count > 31 ? 0 : MSW << (32-count) | |
3357 | - rlwinm r8,r7,0,32 # t3 = (count < 32) ? 32 : 0 | |
3358 | - sraw r7,r3,r7 # t2 = MSW >> (count-32) | |
3359 | - or r4,r4,r6 # LSW |= t1 | |
3360 | - slw r7,r7,r8 # t2 = (count < 32) ? 0 : t2 | |
3361 | - sraw r3,r3,r5 # MSW = MSW >> count | |
3362 | - or r4,r4,r7 # LSW |= t2 | |
3363 | + li r6,32 | |
3364 | + sub r6,r6,r5 | |
3365 | + slw r7,r3,r6 /* isolate YYY */ | |
3366 | + srw r4,r4,r5 /* isolate ZZZ */ | |
3367 | + or r4,r4,r7 /* YYYZZZ */ | |
3368 | + sraw r3,r3,r5 /* SSSXXX */ | |
3369 | blr | |
3370 | ||
3371 | _GLOBAL(__ashldi3) | |
3372 | - subfic r6,r5,32 | |
3373 | - slw r3,r3,r5 # MSW = count > 31 ? 0 : MSW << count | |
3374 | - addi r7,r5,32 # could be xori, or addi with -32 | |
3375 | - srw r6,r4,r6 # t1 = count > 31 ? 0 : LSW >> (32-count) | |
3376 | - slw r7,r4,r7 # t2 = count < 32 ? 0 : LSW << (count-32) | |
3377 | - or r3,r3,r6 # MSW |= t1 | |
3378 | - slw r4,r4,r5 # LSW = LSW << count | |
3379 | - or r3,r3,r7 # MSW |= t2 | |
3380 | + li r6,32 | |
3381 | + sub r6,r6,r5 | |
3382 | + srw r7,r4,r6 /* isolate ZZZ */ | |
3383 | + slw r4,r4,r5 /* AAA000 */ | |
3384 | + slw r3,r3,r5 /* YYY--- */ | |
3385 | + or r3,r3,r7 /* YYYZZZ */ | |
3386 | blr | |
3387 | ||
3388 | _GLOBAL(__lshrdi3) | |
3389 | - subfic r6,r5,32 | |
3390 | - srw r4,r4,r5 # LSW = count > 31 ? 0 : LSW >> count | |
3391 | - addi r7,r5,32 # could be xori, or addi with -32 | |
3392 | - slw r6,r3,r6 # t1 = count > 31 ? 0 : MSW << (32-count) | |
3393 | - srw r7,r3,r7 # t2 = count < 32 ? 0 : MSW >> (count-32) | |
3394 | - or r4,r4,r6 # LSW |= t1 | |
3395 | - srw r3,r3,r5 # MSW = MSW >> count | |
3396 | - or r4,r4,r7 # LSW |= t2 | |
3397 | + li r6,32 | |
3398 | + sub r6,r6,r5 | |
3399 | + slw r7,r3,r6 /* isolate YYY */ | |
3400 | + srw r4,r4,r5 /* isolate ZZZ */ | |
3401 | + or r4,r4,r7 /* YYYZZZ */ | |
3402 | + srw r3,r3,r5 /* 000XXX */ | |
3403 | blr | |
3404 | ||
3405 | _GLOBAL(abs) | |
3406 | - srawi r4,r3,31 | |
3407 | - xor r3,r3,r4 | |
3408 | - sub r3,r3,r4 | |
3409 | - blr | |
3410 | + cmpi 0,r3,0 | |
3411 | + bge 10f | |
3412 | + neg r3,r3 | |
3413 | +10: blr | |
3414 | ||
3415 | _GLOBAL(_get_SP) | |
3416 | mr r3,r1 /* Close enough */ | |
3417 | @@ -563,14 +492,6 @@ | |
3418 | isync /* Handle erratas in some cases */ | |
3419 | blr | |
3420 | ||
3421 | -_GLOBAL(_get_ICTC) | |
3422 | - mfspr r3,ICTC | |
3423 | - blr | |
3424 | - | |
3425 | -_GLOBAL(_set_ICTC) | |
3426 | - mtspr ICTC,r3 | |
3427 | - blr | |
3428 | - | |
3429 | /* | |
3430 | L2CR functions | |
3431 |