Commit 66b21747 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.30pre3

parent 3b2e203d
......@@ -85,8 +85,8 @@ work to narrow it down.
If you get it down to a routine, you'll probably get a fix in 24 hours.
My apologies to Linus and the other kernel hackers for describing this
brute force approach, it's hardly what a kernel hack would do. However,
it does work and it lets non-hackers help bug fix. And it is cool
brute force approach, it's hardly what a kernel hacker would do. However,
it does work and it lets non-hackers help fix bugs. And it is cool
because Linux snapshots will let you do this - something that you can't
do with vender supplied releases.
do with vendor supplied releases.
......@@ -43,7 +43,7 @@ Current Minimal Requirements
encountered a bug! If you're unsure what version you're currently
running, the suggested command should tell you.
- Kernel modutils 2.3.6 ; insmod -V
- Kernel modutils 2.3.7 ; insmod -V
- Gnu C 2.7.2.3 ; gcc --version
- Binutils 2.9.1.0.7 ; ld -v
- Linux libc5 C Library 5.4.46 ; ls -l /lib/libc*
......@@ -576,8 +576,8 @@ ftp://metalab.unc.edu/pub/Linux/GCC/ld.so-1.9.9.tar.gz
Modules utilities
=================
The 2.3.6 release:
ftp://ftp.ocs.com.au/pub/modutils/v2.3/modutils-2.3.6.tar.gz
The 2.3.7 release:
ftp://ftp.ocs.com.au/pub/modutils/v2.3/modutils-2.3.7.tar.gz
Procps utilities
================
......
......@@ -123,6 +123,7 @@ EXPORT_SYMBOL(csum_tcpudp_magic);
EXPORT_SYMBOL(ip_compute_csum);
EXPORT_SYMBOL(ip_fast_csum);
EXPORT_SYMBOL(csum_partial_copy);
EXPORT_SYMBOL(csum_partial_copy_nocheck);
EXPORT_SYMBOL(csum_partial_copy_from_user);
EXPORT_SYMBOL(csum_ipv6_magic);
......
......@@ -9,7 +9,6 @@
* Code common to all IRONGATE core logic chips.
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/pci.h>
......
......@@ -24,6 +24,7 @@
* 2 USB ports
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/mm.h>
......
......@@ -2,7 +2,17 @@
* i386 semaphore implementation.
*
* (C) Copyright 1999 Linus Torvalds
*
* Portions Copyright 1999 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
* rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@redhat.com>
*/
#include <linux/config.h>
#include <linux/sched.h>
#include <asm/semaphore.h>
......@@ -218,3 +228,226 @@ asm(
"popl %eax\n\t"
"ret"
);
asm(
"
.align 4
.globl __down_read_failed
__down_read_failed:
pushl %edx
pushl %ecx
jnc 2f
3: call down_read_failed_biased
1: popl %ecx
popl %edx
ret
2: call down_read_failed
" LOCK "subl $1,(%eax)
jns 1b
jnc 2b
jmp 3b
"
);
asm(
"
.align 4
.globl __down_write_failed
__down_write_failed:
pushl %edx
pushl %ecx
jnc 2f
3: call down_write_failed_biased
1: popl %ecx
popl %edx
ret
2: call down_write_failed
" LOCK "subl $" RW_LOCK_BIAS_STR ",(%eax)
jz 1b
jnc 2b
jmp 3b
"
);
struct rw_semaphore *FASTCALL(rwsem_wake_readers(struct rw_semaphore *sem));
struct rw_semaphore *FASTCALL(rwsem_wake_writer(struct rw_semaphore *sem));
struct rw_semaphore *FASTCALL(down_read_failed_biased(struct rw_semaphore *sem));
struct rw_semaphore *FASTCALL(down_write_failed_biased(struct rw_semaphore *sem));
struct rw_semaphore *FASTCALL(down_read_failed(struct rw_semaphore *sem));
struct rw_semaphore *FASTCALL(down_write_failed(struct rw_semaphore *sem));
struct rw_semaphore *down_read_failed_biased(struct rw_semaphore *sem)
{
struct task_struct *tsk = current;
DECLARE_WAITQUEUE(wait, tsk);
add_wait_queue(&sem->wait, &wait); /* put ourselves at the head of the list */
for (;;) {
if (sem->read_bias_granted && xchg(&sem->read_bias_granted, 0))
break;
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
if (!sem->read_bias_granted)
schedule();
}
remove_wait_queue(&sem->wait, &wait);
tsk->state = TASK_RUNNING;
return sem;
}
struct rw_semaphore *down_write_failed_biased(struct rw_semaphore *sem)
{
struct task_struct *tsk = current;
DECLARE_WAITQUEUE(wait, tsk);
add_wait_queue_exclusive(&sem->write_bias_wait, &wait); /* put ourselves at the end of the list */
for (;;) {
if (sem->write_bias_granted && xchg(&sem->write_bias_granted, 0))
break;
set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
if (!sem->write_bias_granted)
schedule();
}
remove_wait_queue(&sem->write_bias_wait, &wait);
tsk->state = TASK_RUNNING;
/* if the lock is currently unbiased, awaken the sleepers
* FIXME: this wakes up the readers early in a bit of a
* stampede -> bad!
*/
if (atomic_read(&sem->count) >= 0)
wake_up(&sem->wait);
return sem;
}
/* Wait for the lock to become unbiased. Readers
* are non-exclusive. =)
*/
struct rw_semaphore *down_read_failed(struct rw_semaphore *sem)
{
struct task_struct *tsk = current;
DECLARE_WAITQUEUE(wait, tsk);
__up_read(sem); /* this takes care of granting the lock */
add_wait_queue(&sem->wait, &wait);
while (atomic_read(&sem->count) < 0) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
if (atomic_read(&sem->count) >= 0)
break;
schedule();
}
remove_wait_queue(&sem->wait, &wait);
tsk->state = TASK_RUNNING;
return sem;
}
/* Wait for the lock to become unbiased. Since we're
* a writer, we'll make ourselves exclusive.
*/
struct rw_semaphore *down_write_failed(struct rw_semaphore *sem)
{
struct task_struct *tsk = current;
DECLARE_WAITQUEUE(wait, tsk);
__up_write(sem); /* this takes care of granting the lock */
add_wait_queue_exclusive(&sem->wait, &wait);
while (atomic_read(&sem->count) < 0) {
set_task_state(tsk, TASK_UNINTERRUPTIBLE | TASK_EXCLUSIVE);
if (atomic_read(&sem->count) >= 0)
break; /* we must attempt to aquire or bias the lock */
schedule();
}
remove_wait_queue(&sem->wait, &wait);
tsk->state = TASK_RUNNING;
return sem;
}
asm(
"
.align 4
.globl __rwsem_wake
__rwsem_wake:
pushl %edx
pushl %ecx
jz 1f
call rwsem_wake_readers
jmp 2f
1: call rwsem_wake_writer
2: popl %ecx
popl %edx
ret
"
);
/* Called when someone has done an up that transitioned from
* negative to non-negative, meaning that the lock has been
* granted to whomever owned the bias.
*/
struct rw_semaphore *rwsem_wake_readers(struct rw_semaphore *sem)
{
if (xchg(&sem->read_bias_granted, 1))
BUG();
wake_up(&sem->wait);
return sem;
}
struct rw_semaphore *rwsem_wake_writer(struct rw_semaphore *sem)
{
if (xchg(&sem->write_bias_granted, 1))
BUG();
wake_up(&sem->write_bias_wait);
return sem;
}
#if defined(CONFIG_SMP)
asm(
"
.align 4
.globl __write_lock_failed
__write_lock_failed:
" LOCK "addl $" RW_LOCK_BIAS_STR ",(%eax)
1: cmpl $" RW_LOCK_BIAS_STR ",(%eax)
jne 1b
" LOCK "subl $" RW_LOCK_BIAS_STR ",(%eax)
jnz __write_lock_failed
ret
.align 4
.globl __read_lock_failed
__read_lock_failed:
lock ; incl (%eax)
1: cmpl $1,(%eax)
js 1b
lock ; decl (%eax)
js __read_lock_failed
ret
"
);
#endif
......@@ -201,7 +201,7 @@ static void show_registers(struct pt_regs *regs)
printk("\n");
}
spinlock_t die_lock;
spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
void die(const char * str, struct pt_regs * regs, long err)
{
......
......@@ -21,11 +21,15 @@ endif
ASFLAGS =
LINKFLAGS = -T arch/ppc/vmlinux.lds -Ttext $(KERNELLOAD) -Bstatic
CFLAGSINC = -D__KERNEL__ -I$(TOPDIR)/include -D__powerpc__
CFLAGS := $(CFLAGS) -I$(HPATH) -D__powerpc__ -fsigned-char -msoft-float \
-pipe -fno-builtin -ffixed-r2 -Wno-uninitialized -mmultiple \
-mstring
CFLAGS := $(CFLAGS) -I$(HPATH) -D__powerpc__ -fsigned-char \
-msoft-float -pipe -fno-builtin -ffixed-r2 -Wno-uninitialized \
-mmultiple -mstring
CPP = $(CC) -E $(CFLAGS)
ifdef CONFIG_4xx
CFLAGS := $(CFLAGS) -mcpu=403
endif
ifdef CONFIG_8xx
CFLAGS := $(CFLAGS) -mcpu=860 -I../8xx_io
endif
......@@ -34,10 +38,13 @@ ifdef CONFIG_PPC64
CFLAGS := $(CFLAGS) -Wa,-mppc64bridge #-mpowerpc64
endif
ifndef CONFIG_8xx
HEAD := arch/ppc/kernel/head.o
ifdef CONFIG_4xx
HEAD := arch/ppc/kernel/head_4xx.o
else
HEAD := arch/ppc/kernel/head_8xx.o
ifdef CONFIG_8xx
HEAD := arch/ppc/kernel/head_8xx.o
endif
HEAD := arch/ppc/kernel/head.o
endif
ARCH_SUBDIRS = arch/ppc/kernel arch/ppc/mm arch/ppc/lib
......@@ -60,6 +67,7 @@ MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
MAKECOFFBOOT = $(MAKE) -C arch/$(ARCH)/coffboot
MAKECHRPBOOT = $(MAKE) -C arch/$(ARCH)/chrpboot
MAKEMBXBOOT = $(MAKE) -C arch/$(ARCH)/mbxboot
MAKETREEBOOT = $(MAKE) -C arch/$(ARCH)/treeboot
ifdef CONFIG_8xx
SUBDIRS += arch/ppc/8xx_io
......@@ -77,11 +85,18 @@ checks:
BOOT_TARGETS = zImage znetboot.initrd zImage.initrd
ifdef CONFIG_4xx
$(BOOT_TARGETS): $(CHECKS) vmlinux
@$(MAKETREEBOOT) $@
endif
ifdef CONFIG_8xx
$(BOOT_TARGETS): $(CHECKS) vmlinux
@$(MAKECOFFBOOT) $@
@$(MAKEMBXBOOT) $@
else
endif
ifdef CONFIG_6xx
$(BOOT_TARGETS): $(CHECKS) vmlinux
@$(MAKECOFFBOOT) $@
@$(MAKEBOOT) $@
......@@ -108,33 +123,36 @@ endif
@$(MAKECHRPBOOT) $@
endif
gemini_config:
.PHONY: clean_config
clean_config:
rm -f .config arch/ppc/defconfig
ln -s gemini_defconfig arch/ppc/defconfig
pmac_config:
rm -f .config arch/ppc/defconfig
ln -s pmac_defconfig arch/ppc/defconfig
gemini_config: clean_config
ln -s configs/gemini_defconfig arch/ppc/defconfig
prep_config:
rm -f .config arch/ppc/defconfig
ln -s prep_defconfig arch/ppc/defconfig
pmac_config: clean_config
ln -s configs/pmac_defconfig arch/ppc/defconfig
chrp_config:
rm -f .config arch/ppc/defconfig
ln -s chrp_defconfig arch/ppc/defconfig
prep_config: clean_config
ln -s configs/prep_defconfig arch/ppc/defconfig
common_config:
rm -f .config arch/ppc/defconfig
ln -s common_defconfig arch/ppc/defconfig
chrp_config: clean_config
ln -s configs/chrp_defconfig arch/ppc/defconfig
mbx_config:
rm -f .config arch/ppc/defconfig
ln -s mbx_defconfig arch/ppc/defconfig
common_config: clean_config
ln -s configs/common_defconfig arch/ppc/defconfig
apus_config:
rm -f .config arch/ppc/defconfig
ln -s apus_defconfig arch/ppc/defconfig
mbx_config: clean_config
ln -s configs/mbx_defconfig arch/ppc/defconfig
apus_config: clean_config
ln -s configs/apus_defconfig arch/ppc/defconfig
oak_config: clean_config
ln -s configs/oak_defconfig arch/ppc/defconfig
walnut_config: clean_config
ln -s configs/walnut_defconfig arch/ppc/defconfig
tags:
etags */*.c include/{asm,linux}/*.h arch/ppc/kernel/*.{c,h}
......@@ -145,6 +163,7 @@ archclean:
@$(MAKEBOOT) clean
@$(MAKECHRPBOOT) clean
@$(MAKEMBXBOOT) clean
@$(MAKETREEBOOT) clean
archmrproper:
......
......@@ -134,7 +134,7 @@ znetboot.initrd : zImage.initrd
cp zImage.initrd $(TFTPIMAGE)
clean:
rm -f vmlinux* zvmlinux* mkprep zImage*
rm -f vmlinux* zvmlinux* mkprep zImage* sImage*
fastdep:
$(TOPDIR)/scripts/mkdep *.[Sch] > .depend
......
......@@ -112,14 +112,6 @@ start_ldr:
cmpi 0,r2,0
bne 00b
/* r4,r5 have initrd_start, size */
lis r2,initrd_start@h
ori r2,r2,initrd_start@l
lwz r4,0(r2)
lis r2,initrd_end@h
ori r2,r2,initrd_end@l
lwz r5,0(r2)
/* tell kernel we're prep */
/*
* get start address of kernel code which is stored as a coff
......
......@@ -16,6 +16,7 @@
#include <linux/config.h>
#include <asm/page.h>
#include <asm/processor.h>
#include <asm/bootinfo.h>
#include <asm/mmu.h>
#if defined(CONFIG_SERIAL_CONSOLE)
#include "ns16550.h"
......@@ -518,17 +519,39 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum,
*cp = 0;
puts("\n");
/* mappings on early boot can only handle 16M */
if ( (int)(cmd_line[0]) > (16<<20))
puts("cmd_line located > 16M\n");
if ( (int)hold_residual > (16<<20))
puts("hold_residual located > 16M\n");
if ( initrd_start > (16<<20))
puts("initrd_start located > 16M\n");
puts("Uncompressing Linux...");
gunzip(0, 0x400000, zimage_start, &zimage_size);
puts("done.\n");
{
struct bi_record *rec;
rec = (struct bi_record *)PAGE_ALIGN(zimage_size);
rec->tag = BI_FIRST;
rec->size = sizeof(struct bi_record);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
rec->tag = BI_BOOTLOADER_ID;
memcpy( (void *)rec->data, "prepboot", 9);
rec->size = sizeof(struct bi_record) + 8 + 1;
rec = (struct bi_record *)((unsigned long)rec + rec->size);
rec->tag = BI_MACHTYPE;
rec->data[0] = _MACH_prep;
rec->data[1] = 1;
rec->size = sizeof(struct bi_record) + sizeof(unsigned long);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
rec->tag = BI_CMD_LINE;
memcpy( (char *)rec->data, cmd_line, strlen(cmd_line)+1);
rec->size = sizeof(struct bi_record) + strlen(cmd_line) + 1;
rec = (struct bi_record *)((ulong)rec + rec->size);
rec->tag = BI_LAST;
rec->size = sizeof(struct bi_record);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
}
puts("Now booting the kernel\n");
return (unsigned long)hold_residual;
}
......
......@@ -8,6 +8,10 @@
*/
#include "../coffboot/nonstdio.h"
#include "../coffboot/zlib.h"
#include <asm/bootinfo.h>
#include <asm/processor.h>
#define __KERNEL__
#include <asm/page.h>
extern void *finddevice(const char *);
extern int getprop(void *, const char *, void *, int);
......@@ -71,6 +75,30 @@ chrpboot(int a1, int a2, void *prom)
sa = (unsigned long)PROG_START;
printf("start address = 0x%x\n\r", sa);
{
struct bi_record *rec;
rec = (struct bi_record *)PAGE_ALIGN((unsigned long)dst+len);
rec->tag = BI_FIRST;
rec->size = sizeof(struct bi_record);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
rec->tag = BI_BOOTLOADER_ID;
sprintf( (char *)rec->data, "chrpboot");
rec->size = sizeof(struct bi_record) + strlen("chrpboot") + 1;
rec = (struct bi_record *)((unsigned long)rec + rec->size);
rec->tag = BI_MACHTYPE;
rec->data[0] = _MACH_chrp;
rec->data[1] = 1;
rec->size = sizeof(struct bi_record) + sizeof(unsigned long);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
rec->tag = BI_LAST;
rec->size = sizeof(struct bi_record);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
}
(*(void (*)())sa)(0, 0, prom, a1, a2);
printf("returned?\n\r");
......
/*
* String handling functions for PowerPC.
*
* Copyright (C) 1996 Paul Mackerras.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#define r0 0
#define r3 3
#define r4 4
#define r5 5
#define r6 6
#define r7 7
#define r8 8
.globl strcpy
strcpy:
addi r5,r3,-1
addi r4,r4,-1
1: lbzu r0,1(r4)
cmpwi 0,r0,0
stbu r0,1(r5)
bne 1b
blr
.globl strncpy
strncpy:
cmpwi 0,r5,0
beqlr
mtctr r5
addi r6,r3,-1
addi r4,r4,-1
1: lbzu r0,1(r4)
cmpwi 0,r0,0
stbu r0,1(r6)
bdnzf 2,1b /* dec ctr, branch if ctr != 0 && !cr0.eq */
blr
.globl strcat
strcat:
addi r5,r3,-1
addi r4,r4,-1
1: lbzu r0,1(r5)
cmpwi 0,r0,0
bne 1b
addi r5,r5,-1
1: lbzu r0,1(r4)
cmpwi 0,r0,0
stbu r0,1(r5)
bne 1b
blr
.globl strcmp
strcmp:
addi r5,r3,-1
addi r4,r4,-1
1: lbzu r3,1(r5)
cmpwi 1,r3,0
lbzu r0,1(r4)
subf. r3,r0,r3
beqlr 1
beq 1b
blr
.globl strlen
strlen:
addi r4,r3,-1
1: lbzu r0,1(r4)
cmpwi 0,r0,0
bne 1b
subf r3,r3,r4
blr
.globl memset
memset:
rlwimi r4,r4,8,16,23
rlwimi r4,r4,16,0,15
addi r6,r3,-4
cmplwi 0,r5,4
blt 7f
stwu r4,4(r6)
beqlr
andi. r0,r6,3
add r5,r0,r5
subf r6,r0,r6
rlwinm r0,r5,32-2,2,31
mtctr r0
bdz 6f
1: stwu r4,4(r6)
bdnz 1b
6: andi. r5,r5,3
7: cmpwi 0,r5,0
beqlr
mtctr r5
addi r6,r6,3
8: stbu r4,1(r6)
bdnz 8b
blr
.globl bcopy
bcopy:
mr r6,r3
mr r3,r4
mr r4,r6
b memcpy
.globl memmove
memmove:
cmplw 0,r3,r4
bgt backwards_memcpy
/* fall through */
.globl memcpy
memcpy:
rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */
addi r6,r3,-4
addi r4,r4,-4
beq 2f /* if less than 8 bytes to do */
andi. r0,r6,3 /* get dest word aligned */
mtctr r7
bne 5f
1: lwz r7,4(r4)
lwzu r8,8(r4)
stw r7,4(r6)
stwu r8,8(r6)
bdnz 1b
andi. r5,r5,7
2: cmplwi 0,r5,4
blt 3f
lwzu r0,4(r4)
addi r5,r5,-4
stwu r0,4(r6)
3: cmpwi 0,r5,0
beqlr
mtctr r5
addi r4,r4,3
addi r6,r6,3
4: lbzu r0,1(r4)
stbu r0,1(r6)
bdnz 4b
blr
5: subfic r0,r0,4
mtctr r0
6: lbz r7,4(r4)
addi r4,r4,1
stb r7,4(r6)
addi r6,r6,1
bdnz 6b
subf r5,r0,r5
rlwinm. r7,r5,32-3,3,31
beq 2b
mtctr r7
b 1b
.globl backwards_memcpy
backwards_memcpy:
rlwinm. r7,r5,32-3,3,31 /* r0 = r5 >> 3 */
add r6,r3,r5
add r4,r4,r5
beq 2f
andi. r0,r6,3
mtctr r7
bne 5f
1: lwz r7,-4(r4)
lwzu r8,-8(r4)
stw r7,-4(r6)
stwu r8,-8(r6)
bdnz 1b
andi. r5,r5,7
2: cmplwi 0,r5,4
blt 3f
lwzu r0,-4(r4)
subi r5,r5,4
stwu r0,-4(r6)
3: cmpwi 0,r5,0
beqlr
mtctr r5
4: lbzu r0,-1(r4)
stbu r0,-1(r6)
bdnz 4b
blr
5: mtctr r0
6: lbzu r7,-1(r4)
stbu r7,-1(r6)
bdnz 6b
subf r5,r0,r5
rlwinm. r7,r5,32-3,3,31
beq 2b
mtctr r7
b 1b
.globl memcmp
memcmp:
cmpwi 0,r5,0
blelr
mtctr r5
addi r6,r3,-1
addi r4,r4,-1
1: lbzu r3,1(r6)
lbzu r0,1(r4)
subf. r3,r0,r3
bdnzt 2,1b
blr
......@@ -9,6 +9,10 @@
#include "nonstdio.h"
#include "rs6000.h"
#include "zlib.h"
#include <asm/bootinfo.h>
#include <asm/processor.h>
#define __KERNEL__
#include <asm/page.h>
extern void *finddevice(const char *);
extern int getprop(void *, const char *, void *, int);
......@@ -106,6 +110,31 @@ coffboot(int a1, int a2, void *prom)
#if 0
pause();
#endif
{
struct bi_record *rec;
rec = (struct bi_record *)PAGE_ALIGN((unsigned long)dst+len);
rec->tag = BI_FIRST;
rec->size = sizeof(struct bi_record);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
rec->tag = BI_BOOTLOADER_ID;
sprintf( (char *)rec->data, "coffboot");
rec->size = sizeof(struct bi_record) + strlen("coffboot") + 1;
rec = (struct bi_record *)((unsigned long)rec + rec->size);
rec->tag = BI_MACHTYPE;
rec->data[0] = _MACH_Pmac;
rec->data[1] = 1;
rec->size = sizeof(struct bi_record) + sizeof(unsigned long);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
rec->tag = BI_LAST;
rec->size = sizeof(struct bi_record);
rec = (struct bi_record *)((unsigned long)rec + rec->size);
}
(*(void (*)())sa)(a1, a2, prom);
printf("returned?\n");
......@@ -165,7 +194,6 @@ void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp)
printf("gunzip: ran out of data in header\n");
exit();
}
printf("done 1\n");
s.zalloc = zalloc;
s.zfree = zfree;
r = inflateInit2(&s, -MAX_WBITS);
......@@ -177,14 +205,11 @@ printf("done 1\n");
s.avail_in = *lenp - i;
s.next_out = dst;
s.avail_out = dstlen;
printf("doing inflate\n");
r = inflate(&s, Z_FINISH);
printf("done inflate\n");
if (r != Z_OK && r != Z_STREAM_END) {
printf("inflate returned %d\n", r);
exit();
}
*lenp = s.next_out - (unsigned char *) dst;
printf("doing end\n");
inflateEnd(&s);
}
......@@ -12,35 +12,49 @@ endmenu
mainmenu_option next_comment
comment 'Platform support'
define_bool CONFIG_PPC y
choice 'Processor type' \
"6xx/7xx CONFIG_6xx \
630/Power3(64-Bit) CONFIG_PPC64 \
82xx CONFIG_82xx \
8xx CONFIG_8xx" 6xx/7xx
choice 'Processor Type' \
"6xx/7xx CONFIG_6xx \
4xx CONFIG_4xx \
630/Power3(64-Bit) CONFIG_PPC64 \
82xx CONFIG_82xx \
8xx CONFIG_8xx" 6xx/7xx
if [ "$CONFIG_4xx" = "y" ]; then
choice 'Machine Type' \
"Oak CONFIG_OAK \
Walnut CONFIG_WALNUT" Oak
fi
if [ "$CONFIG_8xx" = "y" ]; then
choice 'Processor Model' \
"821 CONFIG_MPC821 \
823 CONFIG_MPC823 \
850 CONFIG_MPC850 \
855 CONFIG_MPC855 \
860 CONFIG_MPC860 \
860T CONFIG_MPC860T" 860
define_bool CONFIG_SERIAL_CONSOLE y
choice 'Machine Type' \
"RPX-Lite CONFIG_RPXLITE \
RPX-Classic CONFIG_RPXCLASSIC \
BSE-IP CONFIG_BSEIP \
MBX CONFIG_MBX \
WinCept CONFIG_WINCEPT" RPX-Lite
else
choice 'Machine Type' \
"PowerMac CONFIG_PMAC \
PReP/MTX CONFIG_PREP \
CHRP CONFIG_CHRP \
PowerMac/PReP/CHRP CONFIG_ALL_PPC \
Gemini CONFIG_GEMINI \
APUS CONFIG_APUS" PowerMac
choice 'Processor Model' \
"821 CONFIG_MPC821 \
823 CONFIG_MPC823 \
850 CONFIG_MPC850 \
855 CONFIG_MPC855 \
860 CONFIG_MPC860 \
860T CONFIG_MPC860T" 860
choice 'Machine Type' \
"RPX-Lite CONFIG_RPXLITE \
RPX-Classic CONFIG_RPXCLASSIC \
BSE-IP CONFIG_BSEIP \
MBX CONFIG_MBX \
WinCept CONFIG_WINCEPT" RPX-Lite
fi
if [ "$CONFIG_6xx" = "y" ]; then
choice 'Machine Type' \
"PowerMac CONFIG_PMAC \
PReP/MTX CONFIG_PREP \
CHRP CONFIG_CHRP \
PowerMac/PReP/CHRP CONFIG_ALL_PPC \
Gemini CONFIG_GEMINI \
APUS CONFIG_APUS" PowerMac
fi
if [ "$CONFIG_PPC64" = "y" ]; then
define_bool CONFIG_ALL_PPC y
fi
bool 'Symmetric multi-processing support' CONFIG_SMP
......@@ -52,12 +66,8 @@ if [ "$CONFIG_ALL_PPC" != "y" ];then
define_bool CONFIG_MACH_SPECIFIC y
fi
if [ "$CONFIG_8xx" = "y" ]; then
if [ "$CONFIG_4xx" = "y" ] || [ "$CONFIG_8xx" = "y" ]; then
bool 'Math emulation' CONFIG_MATH_EMULATION
else
if [ "$CONFIG_PPC64" != "y" ];then
define_bool CONFIG_6xx y
fi
fi
endmenu
......@@ -75,12 +85,12 @@ comment 'General setup'
if [ "$CONFIG_APUS" = "y" ]; then
define_bool CONFIG_PCI n
else
if [ "$CONFIG_8xx" = "y" ]; then
else if [ "$CONFIG_OAK" = "y" ]; then
define_bool CONFIG_PCI n
else if [ "$CONFIG_8xx" = "y" ]; then
bool 'QSpan PCI' CONFIG_PCI
else
else
define_bool CONFIG_PCI y
fi
fi
bool 'Networking support' CONFIG_NET
......
......@@ -12,6 +12,7 @@ CONFIG_EXPERIMENTAL=y
#
CONFIG_PPC=y
CONFIG_6xx=y
# CONFIG_4xx is not set
# CONFIG_PPC64 is not set
# CONFIG_82xx is not set
# CONFIG_8xx is not set
......@@ -22,7 +23,7 @@ CONFIG_ALL_PPC=y
# CONFIG_GEMINI is not set
# CONFIG_APUS is not set
# CONFIG_SMP is not set
CONFIG_6xx=y
# CONFIG_ALTIVEC is not set
#
# Loadable module support
......@@ -34,11 +35,13 @@ CONFIG_KMOD=y
#
# General setup
#
# CONFIG_PCI is not set
CONFIG_PCI=y
CONFIG_NET=y
CONFIG_SYSCTL=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
......@@ -273,7 +276,6 @@ CONFIG_BMAC=y
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_RTL8139 is not set
# CONFIG_SIS900 is not set
# CONFIG_DM9102 is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
......@@ -292,6 +294,7 @@ CONFIG_DE4X5=y
# CONFIG_LNE390 is not set
# CONFIG_NE3210 is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_SIS900 is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_ES3210 is not set
......@@ -356,6 +359,7 @@ CONFIG_PPP=y
#
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
# CONFIG_FB_RIVA is not set
# CONFIG_FB_CLGEN is not set
# CONFIG_FB_PM2 is not set
CONFIG_FB_OF=y
......@@ -367,13 +371,13 @@ CONFIG_FB_CT65550=y
# CONFIG_FB_S3TRIO is not set
# CONFIG_FB_VGA16 is not set
CONFIG_FB_MATROX=y
# CONFIG_FB_MATROX_MILLENIUM is not set
CONFIG_FB_MATROX_MILLENIUM=y
CONFIG_FB_MATROX_MYSTIQUE=y
CONFIG_FB_MATROX_G100=y
# CONFIG_FB_MATROX_MULTIHEAD is not set
CONFIG_FB_ATY=y
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_3DFX is not set
CONFIG_FB_ATY128=y
CONFIG_FB_3DFX=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FBCON_ADVANCED is not set
CONFIG_FBCON_CFB8=y
......@@ -414,6 +418,10 @@ CONFIG_PSMOUSE=y
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
CONFIG_NVRAM=y
# CONFIG_RTC is not set
......@@ -438,9 +446,40 @@ CONFIG_NVRAM=y
# CONFIG_DRM is not set
#
# USB drivers - not for the faint of heart
# Support for USB
#
CONFIG_USB=y
#
# USB Controllers
#
# CONFIG_USB is not set
# CONFIG_USB_UHCI is not set
CONFIG_USB_OHCI=y
CONFIG_USB_OHCI_DEBUG=y
# CONFIG_USB_OHCI_HCD is not set
#
# Miscellaneous USB options
#
CONFIG_USB_DEBUG_ISOC=y
CONFIG_USB_PROC=y
# CONFIG_USB_EZUSB is not set
#
# USB Devices
#
CONFIG_USB_HUB=y
CONFIG_USB_MOUSE=y
CONFIG_USB_HP_SCANNER=m
CONFIG_USB_KBD=y
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
# CONFIG_USB_SERIAL is not set
# CONFIG_USB_CPIA is not set
# CONFIG_USB_DC2XX is not set
CONFIG_USB_SCSI=m
CONFIG_USB_SCSI_DEBUG=y
#
# Filesystems
......@@ -449,11 +488,9 @@ CONFIG_NVRAM=y
CONFIG_AUTOFS_FS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
CONFIG_HFS_FS=y
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=y
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_FAT_FS is not set
# CONFIG_EFS_FS is not set
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
......@@ -466,7 +503,6 @@ CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_BFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
......@@ -493,39 +529,7 @@ CONFIG_MSDOS_PARTITION=y
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
CONFIG_NLS=y
#
# Native Language Support
#
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS is not set
#
# Sound
......
......@@ -2,25 +2,20 @@
# Automatically generated make config: don't edit
#
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
#
# Platform support
#
CONFIG_PPC=y
CONFIG_6xx=y
# CONFIG_4xx is not set
# CONFIG_PPC64 is not set
# CONFIG_82xx is not set
# CONFIG_8xx is not set
# CONFIG_MPC821 is not set
# CONFIG_MPC823 is not set
# CONFIG_MPC850 is not set
# CONFIG_MPC855 is not set
# CONFIG_MPC860 is not set
# CONFIG_MPC860T is not set
# CONFIG_RPXLITE is not set
# CONFIG_RPXCLASSIC is not set
# CONFIG_BSEIP is not set
# CONFIG_MBX is not set
# CONFIG_WINCEPT is not set
# CONFIG_PMAC is not set
# CONFIG_PREP is not set
# CONFIG_CHRP is not set
......@@ -28,24 +23,34 @@ CONFIG_6xx=y
CONFIG_GEMINI=y
# CONFIG_APUS is not set
# CONFIG_SMP is not set
# CONFIG_ALTIVEC is not set
CONFIG_MACH_SPECIFIC=y
CONFIG_6xx=y
#
# General setup
# Loadable module support
#
CONFIG_EXPERIMENTAL=y
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y
#
# General setup
#
# CONFIG_PCI is not set
CONFIG_PCI=y
CONFIG_NET=y
CONFIG_SYSCTL=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
#
# PCMCIA/CardBus support
#
# CONFIG_PCMCIA is not set
# CONFIG_PARPORT is not set
# CONFIG_VGA_CONSOLE is not set
# CONFIG_FB is not set
......@@ -83,6 +88,7 @@ CONFIG_KERNEL_ELF=y
# CONFIG_BLK_DEV_MD is not set
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_DEV_DAC960 is not set
CONFIG_PARIDE_PARPORT=y
# CONFIG_PARIDE is not set
# CONFIG_BLK_DEV_IDE_MODES is not set
......@@ -181,12 +187,11 @@ CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_GENERIC_NCR5380 is not set
# CONFIG_SCSI_G_NCR5380_PORT is not set
# CONFIG_SCSI_G_NCR5380_MEM is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_NCR53C406A is not set
# CONFIG_SCSI_SYM53C416 is not set
# CONFIG_SCSI_SIM710 is not set
# CONFIG_SCSI_NCR53C7xx is not set
# CONFIG_SCSI_NCR53C8XX is not set
CONFIG_SCSI_SYM53C8XX=y
......@@ -238,10 +243,11 @@ CONFIG_NCR885E=y
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_RTL8139 is not set
# CONFIG_SIS900 is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_ACENIC is not set
# CONFIG_RTL8139 is not set
# CONFIG_DM9102 is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not set
# CONFIG_NET_EISA is not set
# CONFIG_NET_POCKET is not set
......@@ -249,10 +255,14 @@ CONFIG_NCR885E=y
# CONFIG_HIPPI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
#
# Token ring devices
# Token Ring driver support
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
......@@ -262,10 +272,7 @@ CONFIG_NCR885E=y
#
# Wan interfaces
#
# CONFIG_HOSTESS_SV11 is not set
# CONFIG_COSA is not set
# CONFIG_SEALEVEL_4021 is not set
# CONFIG_DLCI is not set
# CONFIG_WAN is not set
#
# Amateur Radio support
......@@ -286,11 +293,15 @@ CONFIG_NCR885E=y
# Console drivers
#
#
# Frame-buffer support
#
# CONFIG_FB is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
# CONFIG_VT is not set
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
......@@ -301,15 +312,13 @@ CONFIG_UNIX98_PTY_COUNT=256
#
# Mice
#
CONFIG_BUSMOUSE=y
# CONFIG_ATIXL_BUSMOUSE is not set
# CONFIG_LOGIBUSMOUSE is not set
# CONFIG_MS_BUSMOUSE is not set
CONFIG_MOUSE=y
CONFIG_PSMOUSE=y
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
......@@ -331,18 +340,10 @@ CONFIG_PSMOUSE=y
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_FT_NORMAL_DEBUG is not set
# CONFIG_FT_FULL_DEBUG is not set
# CONFIG_FT_NO_TRACE is not set
# CONFIG_FT_NO_TRACE_AT_ALL is not set
# CONFIG_FT_STD_FDC is not set
# CONFIG_FT_MACH2 is not set
# CONFIG_FT_PROBE_FC10 is not set
# CONFIG_FT_ALT_FDC is not set
# CONFIG_DRM is not set
#
# USB drivers - not for the faint of heart
# Support for USB
#
# CONFIG_USB is not set
......@@ -354,6 +355,7 @@ CONFIG_PSMOUSE=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_FAT_FS is not set
# CONFIG_EFS_FS is not set
CONFIG_ISO9660_FS=y
......
#
# Default configuration for the IBM PowerPC 403 "Oak" evaluation boards.
#
#
# Platform support
#
CONFIG_PPC=y
CONFIG_4xx=y
# CONFIG_6xx is not set
# CONFIG_PPC64 is not set
# CONFIG_82xx is not set
# CONFIG_8xx is not set
CONFIG_403=y
# CONFIG_405 is not set
CONFIG_OAK=y
# CONFIG_SMP is not set
CONFIG_MACH_SPECIFIC=y
# CONFIG_MATH_EMULATION is not set
#
# General setup
#
# CONFIG_EXPERIMENTAL is not set
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y
# CONFIG_PCI is not set
CONFIG_NET=y
CONFIG_SYSCTL=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_BINFMT_MISC=y
#
# PCMCIA/CardBus support
#
# CONFIG_PCMCIA is not set
# CONFIG_PARPORT is not set
# CONFIG_VGA_CONSOLE is not set
# CONFIG_FB is not set
# CONFIG_PMAC_PBOOK is not set
# CONFIG_MAC_FLOPPY is not set
# CONFIG_MAC_SERIAL is not set
# CONFIG_ADB is not set
# CONFIG_PROC_DEVICETREE is not set
# CONFIG_TOTALMP is not set
# CONFIG_BOOTX_TEXT is not set
# CONFIG_MOTOROLA_HOTSWAP is not set
#
# Plug and Play configuration
#
# CONFIG_PNP is not set
# CONFIG_ISAPNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_IDE is not set
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_ONLY is not set
# CONFIG_BLK_CPQ_DA is not set
#
# Additional Block Devices
#
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_INITRD=y
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_DEV_DAC960 is not set
CONFIG_PARIDE_PARPORT=y
# CONFIG_PARIDE is not set
# CONFIG_BLK_DEV_IDE_MODES is not set
# CONFIG_BLK_DEV_HD is not set
#
# Networking options
#
# CONFIG_PACKET is not set
# CONFIG_NETLINK is not set
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_PNP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
CONFIG_IP_ALIAS=y
CONFIG_SYN_COOKIES=y
#
# (it is safe to leave these untouched)
#
# CONFIG_SKB_LARGE is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
#
# SCSI support
#
# CONFIG_SCSI is not set
#
# Network device support
#
CONFIG_NETDEVICES=y
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_EQUALIZER is not set
# CONFIG_NET_SB1000 is not set
#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_MACE is not set
# CONFIG_BMAC is not set
# CONFIG_NCR885E is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not set
# CONFIG_NET_EISA is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
#
# Token Ring driver support
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Console drivers
#
#
# Frame-buffer support
#
# CONFIG_FB is not set
#
# Character devices
#
# CONFIG_VT is not set
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_UNIX98_PTYS is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
#
# Video For Linux
#
# CONFIG_VIDEO_DEV is not set
#
# Joystick support
#
# CONFIG_JOYSTICK is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
#
# USB drivers - not for the faint of heart
#
# CONFIG_USB is not set
#
# Filesystems
#
# CONFIG_QUOTA is not set
CONFIG_AUTOFS_FS=y
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_ISO9660_FS is not set
# CONFIG_JOLIET is not set
# CONFIG_UDF_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
CONFIG_ROMFS_FS=y
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Network File Systems
#
# CONFIG_CODA_FS is not set
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y
# CONFIG_NFSD is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_NLS is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# Kernel hacking
#
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_KGDB is not set
# CONFIG_XMON is not set
#
# Default configuration for the IBM PowerPC 405GP "Walnut" evaluation board.
#
#
# Platform support
#
CONFIG_PPC=y
CONFIG_4xx=y
# CONFIG_6xx is not set
# CONFIG_PPC64 is not set
# CONFIG_82xx is not set
# CONFIG_8xx is not set
CONFIG_403=y
# CONFIG_405 is not set
CONFIG_OAK=y
# CONFIG_SMP is not set
CONFIG_MACH_SPECIFIC=y
# CONFIG_MATH_EMULATION is not set
#
# General setup
#
# CONFIG_EXPERIMENTAL is not set
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y
CONFIG_PCI=y
CONFIG_NET=y
CONFIG_SYSCTL=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_BINFMT_MISC=y
#
# PCMCIA/CardBus support
#
# CONFIG_PCMCIA is not set
# CONFIG_PARPORT is not set
# CONFIG_VGA_CONSOLE is not set
# CONFIG_FB is not set
# CONFIG_PMAC_PBOOK is not set
# CONFIG_MAC_FLOPPY is not set
# CONFIG_MAC_SERIAL is not set
# CONFIG_ADB is not set
# CONFIG_PROC_DEVICETREE is not set
# CONFIG_TOTALMP is not set
# CONFIG_BOOTX_TEXT is not set
# CONFIG_MOTOROLA_HOTSWAP is not set
#
# Plug and Play configuration
#
# CONFIG_PNP is not set
# CONFIG_ISAPNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_IDE is not set
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_ONLY is not set
# CONFIG_BLK_CPQ_DA is not set
#
# Additional Block Devices
#
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_INITRD=y
# CONFIG_BLK_DEV_XD is not set
# CONFIG_BLK_DEV_DAC960 is not set
CONFIG_PARIDE_PARPORT=y
# CONFIG_PARIDE is not set
# CONFIG_BLK_DEV_IDE_MODES is not set
# CONFIG_BLK_DEV_HD is not set
#
# Networking options
#
# CONFIG_PACKET is not set
# CONFIG_NETLINK is not set
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
# CONFIG_IP_ADVANCED_ROUTER is not set
CONFIG_IP_PNP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
CONFIG_IP_ALIAS=y
CONFIG_SYN_COOKIES=y
#
# (it is safe to leave these untouched)
#
# CONFIG_SKB_LARGE is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
#
# SCSI support
#
# CONFIG_SCSI is not set
#
# Network device support
#
CONFIG_NETDEVICES=y
#
# ARCnet devices
#
# CONFIG_ARCNET is not set
# CONFIG_DUMMY is not set
# CONFIG_EQUALIZER is not set
# CONFIG_NET_SB1000 is not set
#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_MACE is not set
# CONFIG_BMAC is not set
# CONFIG_NCR885E is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not set
# CONFIG_NET_EISA is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
#
# Token Ring driver support
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Console drivers
#
#
# Frame-buffer support
#
# CONFIG_FB is not set
#
# Character devices
#
# CONFIG_VT is not set
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_UNIX98_PTYS is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_WATCHDOG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
#
# Video For Linux
#
# CONFIG_VIDEO_DEV is not set
#
# Joystick support
#
# CONFIG_JOYSTICK is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
#
# USB drivers - not for the faint of heart
#
# CONFIG_USB is not set
#
# Filesystems
#
# CONFIG_QUOTA is not set
CONFIG_AUTOFS_FS=y
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_ISO9660_FS is not set
# CONFIG_JOLIET is not set
# CONFIG_UDF_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
CONFIG_ROMFS_FS=y
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
#
# Network File Systems
#
# CONFIG_CODA_FS is not set
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y
# CONFIG_NFSD is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_NLS is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# Kernel hacking
#
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_KGDB is not set
# CONFIG_XMON is not set
......@@ -12,6 +12,7 @@ CONFIG_EXPERIMENTAL=y
#
CONFIG_PPC=y
CONFIG_6xx=y
# CONFIG_4xx is not set
# CONFIG_PPC64 is not set
# CONFIG_82xx is not set
# CONFIG_8xx is not set
......@@ -22,7 +23,7 @@ CONFIG_ALL_PPC=y
# CONFIG_GEMINI is not set
# CONFIG_APUS is not set
# CONFIG_SMP is not set
CONFIG_6xx=y
# CONFIG_ALTIVEC is not set
#
# Loadable module support
......@@ -34,11 +35,13 @@ CONFIG_KMOD=y
#
# General setup
#
# CONFIG_PCI is not set
CONFIG_PCI=y
CONFIG_NET=y
CONFIG_SYSCTL=y
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
......@@ -273,7 +276,6 @@ CONFIG_BMAC=y
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_RTL8139 is not set
# CONFIG_SIS900 is not set
# CONFIG_DM9102 is not set
# CONFIG_AT1700 is not set
# CONFIG_DEPCA is not set
......@@ -292,6 +294,7 @@ CONFIG_DE4X5=y
# CONFIG_LNE390 is not set
# CONFIG_NE3210 is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_SIS900 is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_ES3210 is not set
......@@ -356,6 +359,7 @@ CONFIG_PPP=y
#
CONFIG_FB=y
CONFIG_DUMMY_CONSOLE=y
# CONFIG_FB_RIVA is not set
# CONFIG_FB_CLGEN is not set
# CONFIG_FB_PM2 is not set
CONFIG_FB_OF=y
......@@ -367,13 +371,13 @@ CONFIG_FB_CT65550=y
# CONFIG_FB_S3TRIO is not set
# CONFIG_FB_VGA16 is not set
CONFIG_FB_MATROX=y
# CONFIG_FB_MATROX_MILLENIUM is not set
CONFIG_FB_MATROX_MILLENIUM=y
CONFIG_FB_MATROX_MYSTIQUE=y
CONFIG_FB_MATROX_G100=y
# CONFIG_FB_MATROX_MULTIHEAD is not set
CONFIG_FB_ATY=y
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_3DFX is not set
CONFIG_FB_ATY128=y
CONFIG_FB_3DFX=y
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FBCON_ADVANCED is not set
CONFIG_FBCON_CFB8=y
......@@ -414,6 +418,10 @@ CONFIG_PSMOUSE=y
# CONFIG_82C710_MOUSE is not set
# CONFIG_PC110_PAD is not set
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
CONFIG_NVRAM=y
# CONFIG_RTC is not set
......@@ -438,9 +446,40 @@ CONFIG_NVRAM=y
# CONFIG_DRM is not set
#
# USB drivers - not for the faint of heart
# Support for USB
#
CONFIG_USB=y
#
# USB Controllers
#
# CONFIG_USB is not set
# CONFIG_USB_UHCI is not set
CONFIG_USB_OHCI=y
CONFIG_USB_OHCI_DEBUG=y
# CONFIG_USB_OHCI_HCD is not set
#
# Miscellaneous USB options
#
CONFIG_USB_DEBUG_ISOC=y
CONFIG_USB_PROC=y
# CONFIG_USB_EZUSB is not set
#
# USB Devices
#
CONFIG_USB_HUB=y
CONFIG_USB_MOUSE=y
CONFIG_USB_HP_SCANNER=m
CONFIG_USB_KBD=y
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
# CONFIG_USB_SERIAL is not set
# CONFIG_USB_CPIA is not set
# CONFIG_USB_DC2XX is not set
CONFIG_USB_SCSI=m
CONFIG_USB_SCSI_DEBUG=y
#
# Filesystems
......@@ -449,11 +488,9 @@ CONFIG_NVRAM=y
CONFIG_AUTOFS_FS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
CONFIG_HFS_FS=y
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=y
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_FAT_FS is not set
# CONFIG_EFS_FS is not set
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
......@@ -466,7 +503,6 @@ CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_BFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
......@@ -493,39 +529,7 @@ CONFIG_MSDOS_PARTITION=y
# CONFIG_UNIXWARE_DISKLABEL is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
CONFIG_NLS=y
#
# Native Language Support
#
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS is not set
#
# Sound
......
......@@ -12,7 +12,17 @@
O_TARGET := kernel.o
OX_OBJS := ppc_ksyms.o setup.o
KHEAD := head.o
ifeq ($(CONFIG_4xx),y)
KHEAD := head_4xx.o
else
ifeq ($(CONFIG_8xx),y)
KHEAD := head_8xx.o
else
KHEAD := head.o
endif
endif
ifdef CONFIG_ALL_PPC
CONFIG_PMAC=y
......@@ -47,48 +57,50 @@ ifdef CONFIG_SMP
O_OBJS += smp.o
endif
ifeq ($(CONFIG_8xx),y)
KHEAD := head_8xx.o
O_OBJS += m8xx_setup.o ppc8xx_pic.o
ifndef CONFIG_MATH_EMULATION
O_OBJS += softemu8xx.o
endif
ifdef CONFIG_PCI
O_OBJS += qspan_pci.c
ifeq ($(CONFIG_OAK),y)
O_OBJS += oak_setup.o
endif
ifdef CONFIG_MBX
O_OBJS += i8259.o
ifeq ($(CONFIG_8xx),y)
O_OBJS += m8xx_setup.o ppc8xx_pic.o
ifndef CONFIG_MATH_EMULATION
O_OBJS += softemu8xx.o
endif
ifdef CONFIG_PCI
O_OBJS += qspan_pci.c
endif
ifdef CONFIG_MBX
O_OBJS += i8259.o
endif
endif
else
O_OBJS += chrp_setup.o chrp_pci.o chrp_time.o \
pmac_time.o pmac_pci.o pmac_setup.o \
prom.o open_pic.o feature.o \
i8259.o pmac_pic.o indirect_pci.o \
gemini_pci.o gemini_prom.o gemini_setup.o
ifeq ($(CONFIG_NVRAM),y)
O_OBJS += pmac_support.o
O_OBJS += pmac_nvram.o
endif
ifeq ($(CONFIG_PREP), y)
O_OBJS += prep_pci.o prep_setup.o prep_nvram.o prep_time.o residual.o
ifeq ($(CONFIG_6xx),y)
O_OBJS += open_pic.o indirect_pci.o
endif
ifeq ($(CONFIG_PMAC), y)
ifeq ($(CONFIG_APUS),y)
O_OBJS += apus_setup.o
endif
ifeq ($(CONFIG_PMAC), y)
ifeq ($(CONFIG_PMAC),y)
O_OBJS += pmac_pic.o pmac_setup.o pmac_time.o feature.o pmac_pci.o prom.o
endif
ifdef CONFIG_APUS
O_OBJS += apus_setup.o
ifeq ($(CONFIG_CHRP),y)
O_OBJS += chrp_pci.o pmac_pci.o chrp_setup.o i8259.o \
chrp_time.o pmac_time.o prom.o
endif
ifeq ($(CONFIG_PREP),y)
O_OBJS += prep_pci.o i8259.o prep_setup.o prep_nvram.o prep_time.o residual.o
endif
ifeq ($(CONFIG_GEMINI),y)
O_OBJS += gemini_prom.o gemini_pci.o gemini_setup.o
endif
all: $(KHEAD) kernel.o
head.o: head.S ppc_defs.h
head_4xx.o: head_4xx.S ppc_defs.h
head_8xx.o: head_8xx.S ppc_defs.h
ppc_defs.h: mk_defs.c ppc_defs.head \
......@@ -98,7 +110,7 @@ ppc_defs.h: mk_defs.c ppc_defs.head \
$(TOPDIR)/include/asm/ptrace.h
$(CC) $(CFLAGS) -S mk_defs.c
cp ppc_defs.head ppc_defs.h
grep '^#define' mk_defs.s >>ppc_defs.h
grep '^#define' mk_defs.s >> ppc_defs.h
rm mk_defs.s
find_name : find_name.c
......
/*
* align.c - handle alignment exceptions for the Power PC.
*
* Paul Mackerras August 1996.
* Copyright (C) 1996 Paul Mackerras (paulus@cs.anu.edu.au).
* Copyright (c) 1996 Paul Mackerras <paulus@cs.anu.edu.au>
* Copyright (c) 1998-1999 TiVo, Inc.
* PowerPC 403GCX modifications.
* Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
* PowerPC 403GCX/405GP modifications.
*/
#include <linux/kernel.h>
#include <linux/mm.h>
......@@ -16,6 +19,13 @@ struct aligninfo {
unsigned char flags;
};
#if defined(CONFIG_4xx)
#define OPCD(inst) (((inst) & 0xFC000000) >> 26)
#define RS(inst) (((inst) & 0x03E00000) >> 21)
#define RA(inst) (((inst) & 0x001F0000) >> 16)
#define IS_DFORM(code) ((code) >= 32 && (code) <= 47)
#endif
#define INVALID { 0, 0 }
#define LD 1 /* load */
......@@ -170,6 +180,9 @@ int
fix_alignment(struct pt_regs *regs)
{
int instr, nb, flags;
#if defined(CONFIG_4xx)
int opcode, f1, f2, f3;
#endif
int i, t;
int reg, areg;
unsigned char *addr;
......@@ -180,13 +193,42 @@ fix_alignment(struct pt_regs *regs)
unsigned char v[8];
} data;
#if defined(CONFIG_4xx)
/* The 4xx-family processors have no DSISR register,
* so we emulate it.
*/
instr = *((unsigned int *)regs->nip);
opcode = OPCD(instr);
reg = RS(instr);
areg = RA(instr);
if (IS_DFORM(opcode)) {
f1 = 0;
f2 = (instr & 0x04000000) >> 26;
f3 = (instr & 0x78000000) >> 27;
} else {
f1 = (instr & 0x00000006) >> 1;
f2 = (instr & 0x00000040) >> 6;
f3 = (instr & 0x00000780) >> 7;
}
instr = ((f1 << 5) | (f2 << 4) | f3);
#else
reg = (regs->dsisr >> 5) & 0x1f; /* source/dest register */
areg = regs->dsisr & 0x1f; /* register to update */
instr = (regs->dsisr >> 10) & 0x7f;
#endif
nb = aligninfo[instr].len;
if (nb == 0)
return 0; /* too hard or invalid instruction bits */
flags = aligninfo[instr].flags;
addr = (unsigned char *) regs->dar;
reg = (regs->dsisr >> 5) & 0x1f; /* source/dest register */
/* For the 4xx-family processors, the 'dar' field of the
* pt_regs structure is overloaded and is really from the DEAR.
*/
addr = (unsigned char *)regs->dar;
/* Verify the address of the operand */
if (user_mode(regs)) {
......@@ -280,7 +322,6 @@ fix_alignment(struct pt_regs *regs)
}
if (flags & U) {
areg = regs->dsisr & 0x1f; /* register to update */
regs->gpr[areg] = regs->dar;
}
......
......@@ -386,13 +386,13 @@ _GLOBAL(fake_interrupt)
mtlr r0
blr
#ifndef CONFIG_8xx
/*
* PROM code for specific machines follows. Put it
* here so it's easy to add arch-specific sections later.
* -- Cort
*/
#if defined(CONFIG_CHRP) || defined(CONFIG_ALL_PPC)
/*
* On CHRP, the Run-Time Abstraction Services (RTAS) have to be
* called with the MMU off.
......@@ -432,4 +432,4 @@ enter_rtas:
mtspr SRR0,r8
mtspr SRR1,r9
rfi /* return to caller */
#endif /* CONFIG_8xx */
#endif /* defined(CONFIG_CHRP) || defined(CONFIG_ALL_PPC) */
......@@ -23,6 +23,7 @@
*
*/
_GLOBAL(prom_init)
_GLOBAL(gemini_prom_init)
#ifdef __SMP__
/* Since the MMU's on, get stuff in rom space that we'll need */
......
......@@ -36,7 +36,6 @@
void gemini_setup_pci_ptrs(void);
static int l2_printed = 0;
static unsigned char gemini_switch_map = 0;
static char *gemini_board_families[] = {
"VGM", "VSS", "KGM", "VGR", "KSS"
......@@ -178,10 +177,8 @@ void __init gemini_setup_arch(void)
/* take special pains to map the MPIC, since it isn't mapped yet */
gemini_openpic_init();
/* start the L2 */
gemini_init_l2();
}
......@@ -219,7 +216,6 @@ gemini_get_clock_speed(void)
return clock;
}
#define L2CR_PIPE_LATEWR (0x01800000) /* late-write SRAM */
#define L2CR_L2CTL (0x00100000) /* RAM control */
#define L2CR_INST_DISABLE (0x00400000) /* disable for insn's */
......@@ -259,18 +255,17 @@ void __init gemini_init_l2(void)
probably always going to be late-write". --Dan */
if (reg & 0xc0) {
if (!l2_printed) {
printk("Enabling 750 L2 cache: %dKb\n",
(128 << ((reg & 0xc0)>>6)));
l2_printed=1;
}
printk("Enabling 750 L2 cache: %dKb\n",
(128 << ((reg & 0xc0)>>6)));
/* take the size given */
cache = (((reg>>6) & 0x3)<<28);
}
else
{
printk("Enabling 750 L2 cache: 1M\n");
/* default of 1Mb */
cache = 0x3<<28;
}
reg &= 0x3;
......@@ -278,6 +273,7 @@ void __init gemini_init_l2(void)
things. If found, tune it down to 1:1.5. -- Dan */
if (!reg) {
printk("3\n");
speed = gemini_get_clock_speed();
if (speed >= 300) {
......@@ -297,7 +293,10 @@ void __init gemini_init_l2(void)
write-through. This is fixed in IBM's 3.1 rev (I'm told), but
for now, always make 2.x versions use L2 write-through. --Dan */
if (((_get_PVR()>>8) & 0xf) <= 2)
{
cache |= L2CR_L2WT;
printk("L2 cache: Enabling Write-Through due to 750 Errata.\n");
}
#endif
cache |= L2CR_PIPE_LATEWR|L2CR_L2CTL|L2CR_INST_DISABLE;
_set_L2CR(0);
......@@ -480,6 +479,39 @@ void __init gemini_calibrate_decr(void)
count_period_den = freq / 1000000;
}
int gemini_get_irq( struct pt_regs *regs )
{
int irq;
irq = openpic_irq( smp_processor_id() );
if (irq == OPENPIC_VEC_SPURIOUS)
/*
* Spurious interrupts should never be
* acknowledged
*/
irq = -1;
/*
* I would like to openpic_eoi here but there seem to be timing problems
* between the openpic ack and the openpic eoi.
* -- Cort
*/
return irq;
}
void gemini_post_irq(int irq)
{
/*
* If it's an i8259 irq then we've already done the
* openpic irq. So we just check to make sure the controller
* is an openpic and if it is then eoi
*
* We do it this way since our irq_desc[irq].ctl can change
* with RTL and no longer be open_pic -- Cort
*/
if ( irq >= open_pic.irq_offset)
openpic_eoi( smp_processor_id() );
}
void __init gemini_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
......@@ -506,8 +538,8 @@ void __init gemini_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.get_cpuinfo = gemini_get_cpuinfo;
ppc_md.irq_cannonicalize = NULL;
ppc_md.init_IRQ = gemini_init_IRQ;
ppc_md.get_irq = chrp_get_irq;
ppc_md.post_irq = chrp_post_irq;
ppc_md.get_irq = gemini_get_irq;
ppc_md.post_irq = gemini_post_irq;
ppc_md.init = NULL;
ppc_md.restart = gemini_restart;
......
......@@ -137,7 +137,7 @@ __start:
#endif
/*
* We have to do any OF calls before we map ourselves to KERNELBASE,
* because OF may have I/O devices mapped in in that area
* because OF may have I/O devices mapped into that area
* (particularly on CHRP).
*/
mr r31,r3 /* save parameters */
......@@ -444,7 +444,9 @@ SystemCall:
STD_EXCEPTION(0xd00, SingleStep, SingleStepException)
STD_EXCEPTION(0xe00, Trap_0e, UnknownException)
#ifdef CONFIG_ALTIVEC
STD_EXCEPTION(0xf20, AltiVec, AltiVecUnavailable)
#endif /* CONFIG_ALTIVEC */
/*
* Handle TLB miss for instruction on 603/603e.
......@@ -1166,7 +1168,6 @@ __secondary_start:
mtspr SRR0,r3
mtspr SRR1,r4
rfi
#endif /* CONFIG_SMP */
/*
......@@ -1384,35 +1385,37 @@ cmd_line:
* -- Cort
*/
clear_bats:
mfmsr r20
andi. r19,r20,MSR_DR
beqlr
#if !defined(CONFIG_GEMINI)
li r20,0
mfspr r9,PVR
rlwinm r9,r9,16,16,31 /* r9 = 1 for 601, 4 for 604 */
cmpwi r9, 1
beq 1f
mtspr DBAT0U,r20
mtspr DBAT0L,r20
mtspr IBAT0U,r20
mtspr IBAT0L,r20
sync
isync
mtspr DBAT0L,r20
mtspr DBAT1U,r20
mtspr DBAT1L,r20
mtspr DBAT2U,r20
mtspr DBAT2L,r20
mtspr DBAT3U,r20
mtspr DBAT3L,r20
1:
mtspr IBAT0U,r20
mtspr IBAT0L,r20
mtspr IBAT1U,r20
mtspr IBAT1L,r20
sync
isync
mtspr DBAT2U,r20
mtspr DBAT2L,r20
mtspr IBAT2U,r20
mtspr IBAT2L,r20
mtspr DBAT3U,r20
mtspr DBAT3L,r20
mtspr IBAT3U,r20
mtspr IBAT3L,r20
#endif /* !defined(CONFIG_GEMINI) */
blr
flush_tlbs:
lis r20, 0x1000
1: addic. r20, r20, -0x1000
tlbie r20
blt 1b
sync
blr
This diff is collapsed.
......@@ -103,8 +103,7 @@ _GLOBAL(__no_use_sti)
* We were about to enable interrupts but we have to simulate
* some interrupts that were lost by enable_irq first.
*/
.globl do_lost_interrupts
do_lost_interrupts:
_GLOBAL(do_lost_interrupts)
stwu r1,-16(r1)
mflr r0
stw r0,20(r1)
......@@ -758,8 +757,19 @@ _GLOBAL(_set_L2CR)
* We restore and save the fpscr so the task gets the same result
* and exceptions as if the cpu had performed the load or store.
*/
#if defined(CONFIG_4xx)
_GLOBAL(cvt_fd)
lfs 0,0(r3)
stfd 0,0(r4)
blr
_GLOBAL(cvt_df)
lfd 0,0(r3)
stfs 0,0(r4)
blr
#else
_GLOBAL(cvt_fd)
cvt_fd:
lfd 0,-4(r5) /* load up fpscr value */
mtfsf 0xff,0
lfs 0,0(r3)
......@@ -769,7 +779,6 @@ cvt_fd:
blr
_GLOBAL(cvt_df)
cvt_df:
lfd 0,-4(r5) /* load up fpscr value */
mtfsf 0xff,0
lfd 0,0(r3)
......@@ -777,9 +786,9 @@ cvt_df:
mffs 0 /* save new fpscr value */
stfd 0,-4(r5)
blr
#endif
.globl __clear_msr_me
__clear_msr_me:
_GLOBAL(__clear_msr_me)
mfmsr r0 /* Get current interrupt state */
lis r3,0
ori r3,r3,MSR_ME
......@@ -843,8 +852,7 @@ SYSCALL(read)
/* Why isn't this a) automatic, b) written in 'C'? */
.data
.align 4
.globl sys_call_table
sys_call_table:
_GLOBAL(sys_call_table)
.long sys_ni_syscall /* 0 - old "setup()" system call */
.long sys_exit
.long sys_fork
......
......@@ -88,7 +88,9 @@ main(void)
DEFINE(GPR29, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[29]));
DEFINE(GPR30, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[30]));
DEFINE(GPR31, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, gpr[31]));
/* Note: these symbols include _ because they overlap with special register names */
/* Note: these symbols include _ because they overlap with special
* register names
*/
DEFINE(_NIP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, nip));
DEFINE(_MSR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, msr));
DEFINE(_CTR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, ctr));
......@@ -97,6 +99,12 @@ main(void)
DEFINE(_XER, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, xer));
DEFINE(_DAR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dar));
DEFINE(_DSISR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr));
/* The PowerPC 400-class processors have neither the DAR nor the DSISR
* SPRs. Hence, we overload them to hold the similar DEAR and ESR SPRs
* for such processors.
*/
DEFINE(_DEAR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dar));
DEFINE(_ESR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr));
DEFINE(ORIG_GPR3, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, orig_gpr3));
DEFINE(RESULT, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, result));
DEFINE(TRAP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, trap));
......
/*
*
* Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
*
* Module name: oak_setup.c
*
* Description:
* Architecture- / platform-specific boot-time initialization code for
* the IBM PowerPC 403GCX "Oak" evaluation board. Adapted from original
* code by Gary Thomas, Cort Dougan <cort@cs.nmt.edu>, and Dan Malek
* <dmalek@jlc.net>.
*
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/string.h>
#include <asm/machdep.h>
#include <asm/page.h>
#include "oak_setup.h"
void __init
oak_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{
#if 0
#if defined(CONFIG_BLK_DEV_INITRD)
/*
* If the init RAM disk has been configured in, and there's a valid
* starting address for it, set it up.
*/
if (r4) {
initrd_start = r4 + KERNELBASE;
initrd_end = r5 + KERNELBASE;
}
#endif /* CONFIG_BLK_DEV_INITRD */
/* Copy the kernel command line arguments to a safe place. */
if (r6) {
*(char *)(r7 + KERNELBASE) = 0;
strcpy(cmd_line, (char *)(r6 + KERNELBASE));
}
#endif /* 0 */
ppc_md.setup_arch = oak_setup_arch;
ppc_md.setup_residual = NULL;
ppc_md.get_cpuinfo = NULL;
ppc_md.irq_cannonicalize = NULL;
ppc_md.init_IRQ = NULL;
ppc_md.get_irq = NULL;
ppc_md.init = NULL;
ppc_md.restart = NULL;
ppc_md.power_off = NULL;
ppc_md.halt = NULL;
ppc_md.time_init = NULL;
ppc_md.set_rtc_time = NULL;
ppc_md.get_rtc_time = NULL;
ppc_md.calibrate_decr = NULL;
ppc_md.kbd_setkeycode = NULL;
ppc_md.kbd_getkeycode = NULL;
ppc_md.kbd_translate = NULL;
ppc_md.kbd_unexpected_up = NULL;
ppc_md.kbd_leds = NULL;
ppc_md.kbd_init_hw = NULL;
#if defined(CONFIG_MAGIC_SYSRQ)
ppc_md.kbd_sysrq_xlate = NULL;
#endif
return;
}
void __init
oak_setup_arch(void)
{
}
/*
*
* Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
*
* Module name: oak_setup.c
*
* Description:
* Architecture- / platform-specific boot-time initialization code for
* the IBM PowerPC 403GCX "Oak" evaluation board. Adapted from original
* code by Gary Thomas, Cort Dougan <cort@cs.nmt.edu>, and Dan Malek
* <dmalek@jlc.net>.
*
*/
#ifndef __OAK_SETUP_H__
#define __OAK_SETUP_H__
#ifdef __cplusplus
extern "C" {
#endif
extern void oak_init(unsigned long r3,
unsigned long ird_start, unsigned long ird_end,
unsigned long cline_start, unsigned long cline_end);
extern void oak_setup_arch(void);
#ifdef __cplusplus
}
#endif
#endif /* __OAK_SETUP_H__ */
......@@ -4,5 +4,6 @@
extern struct hw_interrupt_type open_pic;
void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs);
void openpic_enable_IPI(u_int ipi);
#endif /* _PPC_KERNEL_OPEN_PIC_H */
......@@ -77,6 +77,21 @@ void __init pcibios_init(void)
ppc_md.pcibios_fixup();
}
void __init
pcibios_fixup_pbus_ranges(struct pci_bus * bus, struct pbus_set_ranges_data * ranges)
{
ranges->io_start -= bus->resource[0]->start;
ranges->io_end -= bus->resource[0]->start;
ranges->mem_start -= bus->resource[1]->start;
ranges->mem_end -= bus->resource[1]->start;
}
unsigned long resource_fixup(struct pci_dev * dev, struct resource * res,
unsigned long start, unsigned long size)
{
return start;
}
static void __init pcibios_claim_resources(struct pci_bus *bus)
{
struct pci_dev *dev;
......@@ -117,31 +132,6 @@ char __init *pcibios_setup(char *str)
return str;
}
#ifndef CONFIG_8xx
/* Recursively searches any node that is of type PCI-PCI bridge. Without
* this, the old code would miss children of P2P bridges and hence not
* fix IRQ's for cards located behind P2P bridges.
* - Ranjit Deshpande, 01/20/99
*/
void __init fix_intr(struct device_node *node, struct pci_dev *dev)
{
unsigned int *reg, *class_code;
for (; node != 0;node = node->sibling) {
class_code = (unsigned int *) get_property(node, "class-code", 0);
if((*class_code >> 8) == PCI_CLASS_BRIDGE_PCI)
fix_intr(node->child, dev);
reg = (unsigned int *) get_property(node, "reg", 0);
if (reg == 0 || ((reg[0] >> 8) & 0xff) != dev->devfn)
continue;
/* this is the node, see if it has interrupts */
if (node->n_intrs > 0)
dev->irq = node->intrs[0].line;
break;
}
}
#endif
int pcibios_assign_resource(struct pci_dev *pdev, int resource)
{
return 0;
......
......@@ -26,7 +26,6 @@ static int nvram_mult;
#define NVRAM_SIZE 0x2000 /* 8kB of non-volatile RAM */
__init
void pmac_nvram_init(void)
{
......@@ -56,6 +55,7 @@ void pmac_nvram_init(void)
}
}
__openfirmware
unsigned char nvram_read_byte(int addr)
{
struct adb_request req;
......@@ -80,6 +80,7 @@ unsigned char nvram_read_byte(int addr)
return 0;
}
__openfirmware
void nvram_write_byte(unsigned char val, int addr)
{
struct adb_request req;
......
......@@ -442,6 +442,30 @@ static void __init add_bridges(struct device_node *dev)
}
}
/* Recursively searches any node that is of type PCI-PCI bridge. Without
* this, the old code would miss children of P2P bridges and hence not
* fix IRQ's for cards located behind P2P bridges.
* - Ranjit Deshpande, 01/20/99
*/
void __init
fix_intr(struct device_node *node, struct pci_dev *dev)
{
unsigned int *reg, *class_code;
for (; node != 0;node = node->sibling) {
class_code = (unsigned int *) get_property(node, "class-code", 0);
if((*class_code >> 8) == PCI_CLASS_BRIDGE_PCI)
fix_intr(node->child, dev);
reg = (unsigned int *) get_property(node, "reg", 0);
if (reg == 0 || ((reg[0] >> 8) & 0xff) != dev->devfn)
continue;
/* this is the node, see if it has interrupts */
if (node->n_intrs > 0)
dev->irq = node->intrs[0].line;
break;
}
}
void __init
pmac_pcibios_fixup(void)
{
......
......@@ -10,6 +10,9 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/config.h>
#include "ppc_asm.tmpl"
#include "ppc_defs.h"
......@@ -45,14 +48,20 @@
sync; \
isync
/* This instruction is not implemented on the PPC 603 or 601 */
#define tlbia \
li r4,128; \
mtctr r4; \
lis r4,KERNELBASE@h; \
0: tlbie r4; \
addi r4,r4,0x1000; \
/*
* This instruction is not implemented on the PPC 603 or 601; however, on
* the 403GCX and 405GP tlbia IS defined and tlbie is not.
*/
#if !defined(CONFIG_4xx)
#define tlbia \
li r4,128; \
mtctr r4; \
lis r4,KERNELBASE@h; \
0: tlbie r4; \
addi r4,r4,0x1000; \
bdnz 0b
#endif
/*
* On APUS (Amiga PowerPC cpu upgrade board), we don't know the
......
/* Register names */
/* Condition Register Bit Fields */
#define cr0 0
#define cr1 1
#define cr2 2
#define cr3 3
#define cr4 4
#define cr5 5
#define cr6 6
#define cr7 7
/* General Purpose Registers (GPRs) */
#define r0 0
#define r1 1
#define r2 2
......@@ -32,6 +45,9 @@
#define r30 30
#define r31 31
/* Floating Point Registers (FPRs) */
#define fr0 0
#define fr1 1
#define fr2 2
......
......@@ -76,7 +76,7 @@ EXPORT_SYMBOL(ppc_local_bh_count);
EXPORT_SYMBOL(kernel_flag);
#endif /* __SMP__ */
#ifndef CONFIG_8xx
#if !defined(CONFIG_4xx) && !defined(CONFIG_8xx)
EXPORT_SYMBOL(isa_io_base);
EXPORT_SYMBOL(isa_mem_base);
EXPORT_SYMBOL(pci_dram_offset);
......@@ -219,8 +219,7 @@ EXPORT_SYMBOL(pmu_register_sleep_notifier);
EXPORT_SYMBOL(pmu_unregister_sleep_notifier);
EXPORT_SYMBOL(pmu_enable_irled);
#endif CONFIG_PMAC_PBOOK
EXPORT_SYMBOL(abort);
#ifndef CONFIG_8xx
#if defined(CONFIG_PMAC) || defined(CONFIG_ALL_PPC)
EXPORT_SYMBOL(find_devices);
EXPORT_SYMBOL(find_type_devices);
EXPORT_SYMBOL(find_compatible_devices);
......@@ -232,8 +231,9 @@ EXPORT_SYMBOL(pci_device_loc);
EXPORT_SYMBOL(feature_set);
EXPORT_SYMBOL(feature_clear);
EXPORT_SYMBOL(feature_test);
#endif
#ifdef CONFIG_SCSI
EXPORT_SYMBOL(device_is_compatible);
#endif /* defined(CONFIG_PMAC) || defined(CONFIG_ALL_PPC) */
#if defined(CONFIG_SCSI) && (defined(CONFIG_PMAC) || defined(CONFIG_ALL_PPC))
EXPORT_SYMBOL(note_scsi_host);
#endif
EXPORT_SYMBOL(kd_mksound);
......@@ -251,17 +251,16 @@ EXPORT_SYMBOL_NOVERS(memscan);
EXPORT_SYMBOL_NOVERS(memcmp);
EXPORT_SYMBOL(abs);
#ifndef CONFIG_8xx
EXPORT_SYMBOL(device_is_compatible);
#endif
#ifdef CONFIG_VT
EXPORT_SYMBOL(screen_info);
#endif
EXPORT_SYMBOL(int_control);
#if !defined(CONFIG_4xx)
EXPORT_SYMBOL(timer_interrupt_intercept);
EXPORT_SYMBOL(timer_interrupt);
#endif
extern unsigned long do_IRQ_intercept;
EXPORT_SYMBOL(do_IRQ_intercept);
EXPORT_SYMBOL(irq_desc);
......
......@@ -760,22 +760,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
prep_setup_pci_ptrs();
#ifdef CONFIG_BLK_DEV_INITRD
/* take care of initrd if we have one */
if ( r4 )
{
initrd_start = r4 + KERNELBASE;
initrd_end = r5 + KERNELBASE;
}
#endif /* CONFIG_BLK_DEV_INITRD */
/* take care of cmd line */
if ( r6 && (((char *) r6) != '\0'))
{
*(char *)(r7+KERNELBASE) = 0;
strcpy(cmd_line, (char *)(r6+KERNELBASE));
}
ppc_md.setup_arch = prep_setup_arch;
ppc_md.setup_residual = prep_setup_residual;
ppc_md.get_cpuinfo = prep_get_cpuinfo;
......
......@@ -204,9 +204,15 @@ _switch_to(struct task_struct *prev, struct task_struct *new,
if ( (prev->thread.regs && (prev->thread.regs->msr & MSR_VEC)) &&
prev->thread.vrsave )
giveup_altivec(prev);
if ( (new->last_processor != NO_PROC_ID) &&
/*
* The 750 doesn't broadcast invalidates with tlbie's
* so flush every processor switch.
* -- Cort
*/
if ( ((_get_PVR()>>16) == 8) &&
(new->last_processor != NO_PROC_ID) &&
(new->last_processor != new->processor) && new->mm )
flush_tlb_mm(new->mm);
flush_tlb_mm(new->mm);
prev->last_processor = prev->processor;
current_set[smp_processor_id()] = new;
#endif /* __SMP__ */
......
......@@ -283,11 +283,6 @@ prom_init(int r3, int r4, prom_entry pp)
int l;
char *p, *d;
#ifdef CONFIG_GEMINI
gemini_prom_init();
return;
#endif /* CONFIG_GEMINI */
/* check if we're apus, return if we are */
if ( r3 == 0x61707573 )
return;
......
......@@ -30,6 +30,8 @@
#include <asm/bootx.h>
#include <asm/machdep.h>
#include "oak_setup.h"
extern void pmac_init(unsigned long r3,
unsigned long r4,
unsigned long r5,
......@@ -67,11 +69,11 @@ extern void gemini_init(unsigned long r3,
unsigned long r7);
extern boot_infos_t *boot_infos;
extern char cmd_line[512];
char saved_command_line[256];
unsigned char aux_device_present;
struct int_control_struct int_control;
struct ide_machdep_calls ppc_ide_md;
int parse_bootinfo(void);
unsigned long ISA_DMA_THRESHOLD;
unsigned long DMA_MODE_READ, DMA_MODE_WRITE;
......@@ -84,14 +86,9 @@ int have_of = 0;
#ifdef CONFIG_MAGIC_SYSRQ
unsigned long SYSRQ_KEY;
#endif /* CONFIG_MAGIC_SYSRQ */
/* For MTX/MVME boards.. with Raven/Falcon Chipset
Real close to CHRP, but boot like PReP (via PPCbug)
There's probably a nicer way to do this.. --Troy */
int is_powerplus = 0;
struct machdep_calls ppc_md;
/* copy of the residual data */
#ifndef CONFIG_8xx
extern unsigned char __res[sizeof(RESIDUAL)];
......@@ -196,6 +193,7 @@ int get_cpuinfo(char *buffer)
unsigned long len = 0;
unsigned long bogosum = 0;
unsigned long i;
unsigned short maj, min;
#ifdef __SMP__
#define CPU_PRESENT(x) (cpu_callin_map[(x)])
......@@ -215,8 +213,8 @@ int get_cpuinfo(char *buffer)
if ( i )
len += sprintf(len+buffer,"\n");
len += sprintf(len+buffer,"processor\t: %lu\n",i);
len += sprintf(len+buffer,"cpu\t\t: ");
len += sprintf(len+buffer,"cpu\t\t: ");
switch (GET_PVR >> 16)
{
case 1:
......@@ -254,7 +252,7 @@ int get_cpuinfo(char *buffer)
len += sprintf(len+buffer, "860\n");
break;
default:
len += sprintf(len+buffer, "unknown (%lu)\n",
len += sprintf(len+buffer, "unknown (%lx)\n",
GET_PVR>>16);
break;
}
......@@ -294,8 +292,7 @@ int get_cpuinfo(char *buffer)
len += ppc_md.setup_residual(buffer + len);
}
len += sprintf(len+buffer, "revision\t: %ld.%ld\n",
(GET_PVR & 0xff00) >> 8, GET_PVR & 0xff);
len += sprintf(len+buffer, "revision\t: %hd.%hd\n", maj, min);
len += sprintf(buffer+len, "bogomips\t: %lu.%02lu\n",
(CD(loops_per_sec)+2500)/500000,
......@@ -341,49 +338,58 @@ unsigned long __init
identify_machine(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{
int_control.int_sti = __no_use_sti;
int_control.int_cli = __no_use_cli;
int_control.int_save_flags = __no_use_save_flags;
int_control.int_restore_flags = __no_use_restore_flags;
#ifndef CONFIG_8xx
if ( ppc_md.progress ) ppc_md.progress("id mach(): start", 0x100);
parse_bootinfo();
if ( ppc_md.progress ) ppc_md.progress("id mach(): start", 0x100);
#if !defined(CONFIG_4xx) && !defined(CONFIG_8xx)
#ifndef CONFIG_MACH_SPECIFIC
/* boot loader will tell us if we're APUS */
if ( r3 == 0x61707573 )
{
_machine = _MACH_apus;
r3 = 0;
}
/* prep boot loader tells us if we're prep or not */
else if ( *(unsigned long *)(KERNELBASE) == (0xdeadc0de) )
/* if we didn't get any bootinfo telling us what we are... */
if ( _machine == 0 )
{
_machine = _MACH_prep;
} else
{
char *model;
struct device_node *root;
have_of = 1;
/* prom_init has already been called from __start */
if (boot_infos)
relocate_nodes();
/* ask the OF info if we're a chrp or pmac */
/* we need to set _machine before calling finish_device_tree */
root = find_path_device("/");
if (root != 0) {
/* assume pmac unless proven to be chrp -- Cort */
_machine = _MACH_Pmac;
model = get_property(root, "device_type", NULL);
if (model && !strncmp("chrp", model, 4))
_machine = _MACH_chrp;
else {
model = get_property(root, "model", NULL);
if (model && !strncmp(model, "IBM", 3))
/* boot loader will tell us if we're APUS */
if ( r3 == 0x61707573 )
{
_machine = _MACH_apus;
r3 = 0;
}
/* prep boot loader tells us if we're prep or not */
else if ( *(unsigned long *)(KERNELBASE) == (0xdeadc0de) )
{
_machine = _MACH_prep;
} else
{
char *model;
struct device_node *root;
have_of = 1;
/* prom_init has already been called from __start */
if (boot_infos)
relocate_nodes();
/* ask the OF info if we're a chrp or pmac */
/* we need to set _machine before calling finish_device_tree */
root = find_path_device("/");
if (root != 0) {
/* assume pmac unless proven to be chrp -- Cort */
_machine = _MACH_Pmac;
model = get_property(root, "device_type", NULL);
if (model && !strncmp("chrp", model, 4))
_machine = _MACH_chrp;
else {
model = get_property(root, "model", NULL);
if (model && !strncmp(model, "IBM", 3))
_machine = _MACH_chrp;
}
}
finish_device_tree();
}
finish_device_tree();
}
#endif /* CONFIG_MACH_SPECIFIC */
......@@ -444,11 +450,6 @@ identify_machine(unsigned long r3, unsigned long r4, unsigned long r5,
cmd_line[sizeof(cmd_line) - 1] = 0;
}
int_control.int_sti = __no_use_sti;
int_control.int_cli = __no_use_cli;
int_control.int_save_flags = __no_use_save_flags;
int_control.int_restore_flags = __no_use_restore_flags;
switch (_machine)
{
case _MACH_Pmac:
......@@ -469,7 +470,7 @@ identify_machine(unsigned long r3, unsigned long r4, unsigned long r5,
case _MACH_gemini:
gemini_init(r3, r4, r5, r6, r7);
break;
#endif
#endif
default:
printk("Unknown machine type in identify_machine!\n");
}
......@@ -478,14 +479,15 @@ identify_machine(unsigned long r3, unsigned long r4, unsigned long r5,
extern int __map_without_bats;
__map_without_bats = 1;
}
#else /* CONFIG_8xx */
int_control.int_sti = __no_use_sti;
int_control.int_cli = __no_use_cli;
int_control.int_save_flags = __no_use_save_flags;
int_control.int_restore_flags = __no_use_restore_flags;
#else
#if defined(CONFIG_4xx)
oak_init(r3, r4, r5, r6, r7);
#elif defined(CONFIG_8xx)
m8xx_init(r3, r4, r5, r6, r7);
#endif
#else
#error "No board type has been defined for identify_machine()!"
#endif /* CONFIG_4xx */
#endif /* !CONFIG_4xx && !CONFIG_8xx */
/* Look for mem= option on command line */
if (strstr(cmd_line, "mem=")) {
......@@ -513,6 +515,53 @@ identify_machine(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.ppc_machine = _machine;
if ( ppc_md.progress ) ppc_md.progress("id mach(): done", 0x200);
return 0;
}
int parse_bootinfo(void)
{
struct bi_record *rec;
extern char _end[];
rec = (struct bi_record *)PAGE_ALIGN((ulong)_end);
if ( rec->tag != BI_FIRST )
{
/*
* This 0x10000 offset is a terrible hack but it will go away when
* we have the bootloader handle all the relocation and
* prom calls -- Cort
*/
rec = (struct bi_record *)PAGE_ALIGN((ulong)_end+0x10000);
if ( rec->tag != BI_FIRST )
return -1;
}
for ( ; rec->tag != BI_LAST ;
rec = (struct bi_record *)((ulong)rec + rec->size) )
{
ulong *data = rec->data;
switch (rec->tag)
{
case BI_CMD_LINE:
memcpy(cmd_line, (void *)data, rec->size);
break;
#ifdef CONFIG_BLK_DEV_INITRD
case BI_INITRD:
initrd_start = data[0];
initrd_end = data[0] + rec->size;
break;
#endif /* CONFIG_BLK_DEV_INITRD */
#ifndef CONFIG_MACH_SPECIFIC
case BI_MACHTYPE:
_machine = data[0];
have_of = data[1];
break;
#endif /* CONFIG_MACH_SPECIFIC */
}
}
return 0;
}
......
......@@ -39,6 +39,7 @@
#include <asm/gemini.h>
#include "time.h"
#include "open_pic.h"
int smp_threads_ready = 0;
volatile int smp_commenced = 0;
int smp_num_cpus = 1;
......@@ -309,6 +310,7 @@ void __init smp_boot_cpus(void)
openpic_enable_IPI(i);
cpu_nr = (readb(GEMINI_CPUSTAT) & GEMINI_CPU_COUNT_MASK)>>2;
cpu_nr = (cpu_nr == 0) ? 4 : cpu_nr;
cpu_nr = 2;
break;
}
......
......@@ -128,6 +128,7 @@ MachineCheckException(struct pt_regs *regs)
_exception(SIGSEGV, regs);
}
#if defined(CONFIG_ALTIVEC)
void
AltiVecUnavailable(struct pt_regs *regs)
{
......@@ -163,6 +164,7 @@ AltiVecUnavailable(struct pt_regs *regs)
/* enable altivec for the task on return */
regs->msr |= MSR_VEC;
}
#endif /* CONFIG_ALTIVEC */
void
UnknownException(struct pt_regs *regs)
......@@ -191,6 +193,20 @@ RunModeException(struct pt_regs *regs)
void
ProgramCheckException(struct pt_regs *regs)
{
#if defined(CONFIG_4xx)
unsigned int instr;
unsigned int esr = mfspr(SPRN_ESR);
if (esr & ESR_PTR) {
#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
if (debugger_bpt(regs))
return;
#endif
_exception(SIGTRAP, regs);
} else {
_exception(SIGILL, regs);
}
#else
if (regs->msr & 0x100000) {
/* IEEE FP exception */
_exception(SIGFPE, regs);
......@@ -204,6 +220,7 @@ ProgramCheckException(struct pt_regs *regs)
} else {
_exception(SIGILL, regs);
}
#endif
}
void
......
......@@ -8,6 +8,10 @@
# Note 2! The CFLAGS definition is now in the main makefile...
O_TARGET := mm.o
O_OBJS = fault.o init.o extable.o
O_OBJS = fault.o init.o mem_pieces.o extable.o
ifeq ($(CONFIG_4xx),y)
O_OBJS += 4xx_tlb.o
endif
include $(TOPDIR)/Rules.make
......@@ -52,36 +52,36 @@ void bad_page_fault(struct pt_regs *, unsigned long);
void do_page_fault(struct pt_regs *, unsigned long, unsigned long);
/*
* The error_code parameter is DSISR for a data fault, SRR1 for
* an instruction fault.
* For 600- and 800-family processors, the error_code parameter is DSISR
* for a data fault, SRR1 for an instruction fault. For 400-family processors
* the error_code parameter is ESR for a data fault, 0 for an instruction
* fault.
*/
void do_page_fault(struct pt_regs *regs, unsigned long address,
unsigned long error_code)
{
struct vm_area_struct * vma;
struct mm_struct *mm = current->mm;
#if defined(CONFIG_4xx)
int is_write = error_code & ESR_DST;
#else
int is_write = error_code & 0x02000000;
#endif /* CONFIG_4xx */
/*printk("address: %08lx nip:%08lx code: %08lx %s%s%s%s%s%s\n",
address,regs->nip,error_code,
(error_code&0x40000000)?"604 tlb&htab miss ":"",
(error_code&0x20000000)?"603 tlbmiss ":"",
(error_code&0x02000000)?"write ":"",
(error_code&0x08000000)?"prot ":"",
(error_code&0x80000000)?"I/O ":"",
(regs->trap == 0x400)?"instr":"data"
);*/
#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
if (debugger_fault_handler && regs->trap == 0x300) {
debugger_fault_handler(regs);
return;
}
#if !defined(CONFIG_4xx)
if (error_code & 0x00400000) {
/* DABR match */
if (debugger_dabr_match(regs))
return;
}
#endif
#endif /* !CONFIG_4xx */
#endif /* CONFIG_XMON || CONFIG_KGDB */
if (in_interrupt()) {
static int complained;
if (complained < 20) {
......@@ -107,12 +107,12 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
goto bad_area;
good_area:
#ifdef CONFIG_6xx
#if defined(CONFIG_6xx)
if (error_code & 0x95700000)
/* an error such as lwarx to I/O controller space,
address matching DABR, eciwx, etc. */
#endif /* CONFIG_6xx */
#ifdef CONFIG_8xx
#if defined(CONFIG_8xx)
/* The MPC8xx seems to always set 0x80000000, which is
* "undefined". Of those that can be set, this is the only
* one which seems bad.
......@@ -124,7 +124,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
/* a write */
if (error_code & 0x02000000) {
if (is_write) {
if (!(vma->vm_flags & VM_WRITE))
goto bad_area;
/* a read */
......@@ -135,7 +135,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
goto bad_area;
}
if (!handle_mm_fault(current, vma, address, error_code & 0x02000000))
if (!handle_mm_fault(current, vma, address, is_write))
goto bad_area;
up(&mm->mmap_sem);
/*
......
This diff is collapsed.
/*
* Copyright (c) 1996 Paul Mackerras <paulus@cs.anu.edu.au>
* Changes to accomodate Power Macintoshes.
* Cort Dougan <cort@cs.nmt.edu>
* Rewrites.
* Grant Erickson <grant@lcse.umn.edu>
* General rework and split from mm/init.c.
*
* Module name: mem_pieces.c
*
* Description:
* Routines and data structures for manipulating and representing
* phyiscal memory extents (i.e. address/length pairs).
*
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/blk.h>
#include <asm/page.h>
#include <asm/prom.h>
#include "mem_pieces.h"
extern char _start[], _end[];
extern char _stext[], etext[];
char *klimit = _end;
struct mem_pieces phys_avail;
static void mem_pieces_print(struct mem_pieces *);
/*
* Scan a region for a piece of a given size with the required alignment.
*/
void __init *
mem_pieces_find(unsigned int size, unsigned int align)
{
int i;
unsigned a, e;
struct mem_pieces *mp = &phys_avail;
for (i = 0; i < mp->n_regions; ++i) {
a = mp->regions[i].address;
e = a + mp->regions[i].size;
a = (a + align - 1) & -align;
if (a + size <= e) {
mem_pieces_remove(mp, a, size, 1);
return __va(a);
}
}
panic("Couldn't find %u bytes at %u alignment\n", size, align);
return NULL;
}
/*
* Remove some memory from an array of pieces
*/
void __init
mem_pieces_remove(struct mem_pieces *mp, unsigned int start, unsigned int size,
int must_exist)
{
int i, j;
unsigned int end, rs, re;
struct reg_property *rp;
end = start + size;
for (i = 0, rp = mp->regions; i < mp->n_regions; ++i, ++rp) {
if (end > rp->address && start < rp->address + rp->size)
break;
}
if (i >= mp->n_regions) {
if (must_exist)
printk("mem_pieces_remove: [%x,%x) not in any region\n",
start, end);
return;
}
for (; i < mp->n_regions && end > rp->address; ++i, ++rp) {
rs = rp->address;
re = rs + rp->size;
if (must_exist && (start < rs || end > re)) {
printk("mem_pieces_remove: bad overlap [%x,%x) with",
start, end);
mem_pieces_print(mp);
must_exist = 0;
}
if (start > rs) {
rp->size = start - rs;
if (end < re) {
/* need to split this entry */
if (mp->n_regions >= MEM_PIECES_MAX)
panic("eek... mem_pieces overflow");
for (j = mp->n_regions; j > i + 1; --j)
mp->regions[j] = mp->regions[j-1];
++mp->n_regions;
rp[1].address = end;
rp[1].size = re - end;
}
} else {
if (end < re) {
rp->address = end;
rp->size = re - end;
} else {
/* need to delete this entry */
for (j = i; j < mp->n_regions - 1; ++j)
mp->regions[j] = mp->regions[j+1];
--mp->n_regions;
--i;
--rp;
}
}
}
}
static void __init
mem_pieces_print(struct mem_pieces *mp)
{
int i;
for (i = 0; i < mp->n_regions; ++i)
printk(" [%x, %x)", mp->regions[i].address,
mp->regions[i].address + mp->regions[i].size);
printk("\n");
}
#if defined(CONFIG_PREP) || defined(CONFIG_APUS) || defined(CONFIG_ALL_PPC)
/*
* Add some memory to an array of pieces
*/
void __init
mem_pieces_append(struct mem_pieces *mp, unsigned int start, unsigned int size)
{
struct reg_property *rp;
if (mp->n_regions >= MEM_PIECES_MAX)
return;
rp = &mp->regions[mp->n_regions++];
rp->address = start;
rp->size = size;
}
#endif
void __init
mem_pieces_sort(struct mem_pieces *mp)
{
unsigned long a, s;
int i, j;
for (i = 1; i < mp->n_regions; ++i) {
a = mp->regions[i].address;
s = mp->regions[i].size;
for (j = i - 1; j >= 0; --j) {
if (a >= mp->regions[j].address)
break;
mp->regions[j+1] = mp->regions[j];
}
mp->regions[j+1].address = a;
mp->regions[j+1].size = s;
}
}
void __init
mem_pieces_coalesce(struct mem_pieces *mp)
{
unsigned long a, s, ns;
int i, j, d;
d = 0;
for (i = 0; i < mp->n_regions; i = j) {
a = mp->regions[i].address;
s = mp->regions[i].size;
for (j = i + 1; j < mp->n_regions
&& mp->regions[j].address - a <= s; ++j) {
ns = mp->regions[j].address + mp->regions[j].size - a;
if (ns > s)
s = ns;
}
mp->regions[d].address = a;
mp->regions[d].size = s;
++d;
}
mp->n_regions = d;
}
/*
* Set phys_avail to phys_mem less the kernel text/data/bss.
*/
void __init
set_phys_avail(struct mem_pieces *mp)
{
unsigned long kstart, ksize;
/*
* Initially, available phyiscal memory is equivalent to all
* physical memory.
*/
phys_avail = *mp;
/*
* Map out the kernel text/data/bss from the available physical
* memory.
*/
kstart = __pa(_stext); /* should be 0 */
ksize = PAGE_ALIGN(klimit - _stext);
printk("kstart = 0x%08lx, ksize = 0x%08lx\n", kstart, ksize);
mem_pieces_remove(&phys_avail, kstart, ksize, 0);
mem_pieces_remove(&phys_avail, 0, 0x4000, 0);
#if defined(CONFIG_BLK_DEV_INITRD)
/* Remove the init RAM disk from the available memory. */
if (initrd_start) {
mem_pieces_remove(&phys_avail, __pa(initrd_start),
initrd_end - initrd_start, 1);
}
#endif /* CONFIG_BLK_DEV_INITRD */
}
/*
* Copyright (c) 1996 Paul Mackerras <paulus@cs.anu.edu.au>
* Changes to accomodate Power Macintoshes.
* Cort Dougan <cort@cs.nmt.edu>
* Rewrites.
* Grant Erickson <grant@lcse.umn.edu>
* General rework and split from mm/init.c.
*
* Module name: mem_pieces.h
*
* Description:
* Routines and data structures for manipulating and representing
* phyiscal memory extents (i.e. address/length pairs).
*
*/
#ifndef __MEM_PIECES_H__
#define __MEM_PIECES_H__
#include <linux/config.h>
#include <linux/init.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Type Definitions */
#define MEM_PIECES_MAX 32
struct mem_pieces {
int n_regions;
struct reg_property regions[MEM_PIECES_MAX];
};
/* Global Variables */
extern char *klimit;
extern struct mem_pieces phys_avail;
/* Function Prototypes */
extern void *mem_pieces_find(unsigned int size, unsigned int align);
extern void mem_pieces_remove(struct mem_pieces *mp, unsigned int start,
unsigned int size, int must_exist);
extern void mem_pieces_append(struct mem_pieces *mp, unsigned int start,
unsigned int size);
extern void mem_pieces_coalesce(struct mem_pieces *mp);
extern void mem_pieces_sort(struct mem_pieces *mp);
extern void set_phys_avail(struct mem_pieces *mp);
#ifdef __cplusplus
}
#endif
#endif /* __MEM_PIECES_H__ */
#
# Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
#
# Module name: Makefile
#
# Description:
# Makefile for the IBM "tree" evaluation board Linux kernel
# boot loaders.
#
HOSTCFLAGS = -O -I$(TOPDIR)/include
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
GZIP = gzip -vf9
RM = rm -f
MKEVIMG = mkevimg -l
MKIRIMG = mkirimg
CFLAGS = -O -fno-builtin -I$(TOPDIR)/include
LD_ARGS = -e _start -T ld.script -Ttext 80200000 -Bstatic
OBJS = crt0.o main.o misc.o string.o zlib.o irSect.o
LIBS =
treeboot: $(OBJS) ld.script
$(LD) -o $@ $(LD_ARGS) $(OBJS) $(LIBS)
zImage: vmlinux.img
zImage.initrd: vmlinux.initrd.img
treeboot.image: treeboot vmlinux.gz
$(OBJCOPY) --add-section=image=vmlinux.gz treeboot $@
treeboot.initrd: treeboot.image ramdisk.image.gz
$(OBJCOPY) --add-section=initrd=ramdisk.image.gz treeboot.image $@
vmlinux.img: treeboot.image
$(OBJDUMP) --syms treeboot.image | grep irSectStart > irSectStart.txt
$(MKIRIMG) treeboot.image treeboot.image.out irSectStart.txt
$(MKEVIMG) treeboot.image.out $@
$(RM) treeboot.image treeboot.image.out irSectStart.txt
vmlinux.initrd.img: treeboot.initrd
$(OBJDUMP) --all-headers treeboot.initrd | grep irSectStart > irSectStart.txt
$(MKIRIMG) treeboot.initrd treeboot.initrd.out irSectStart.txt
$(MKEVIMG) treeboot.initrd.out $@
$(RM) treeboot.initrd treeboot.initrd.out irSectStart.txt
vmlinux.gz: $(TOPDIR)/vmlinux
$(OBJCOPY) -S -O binary $(TOPDIR)/vmlinux vmlinux
$(GZIP) vmlinux
clean:
rm -f treeboot treeboot.image treeboot.initrd irSectStart.txt vmlinux.* *.o
fastdep:
/*
* Copyright (c) 1997 Paul Mackerras <paulus@cs.anu.edu.au>
* Initial Power Macintosh COFF version.
* Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
* Modifications for IBM PowerPC 400-class processor evaluation
* boards.
*
* Module name: crt0.S
*
* Description:
* Boot loader execution entry point. Clears out .bss section as per
* ANSI C requirements. Invalidates and flushes the caches over the
* range covered by the boot loader's .text section. Sets up a stack
* below the .text section entry point.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
*/
#include "../kernel/ppc_asm.h"
.text
.globl _start
_start:
## Clear out the BSS as per ANSI C requirements
lis r7,_end@ha #
addi r7,r7,_end@l # r7 = &_end
lis r8,__bss_start@ha #
addi r8,r8,__bss_start@l # r8 = &_bss_start
## Determine how large an area, in number of words, to clear
subf r7,r8,r7 # r7 = &_end - &_bss_start + 1
addi r7,r7,3 # r7 += 3
srwi. r7,r7,2 # r7 = size in words.
beq 2f # If the size is zero, do not bother
addi r8,r8,-4 # r8 -= 4
mtctr r7 # SPRN_CTR = number of words to clear
li r0,0 # r0 = 0
1: stwu r0,4(r8) # Clear out a word
bdnz 1b # If we are not done yet, keep clearing
## Flush and invalidate the caches for the range in memory covering
## the .text section of the boot loader
2: lis r9,_start@h # r9 = &_start
lis r8,_etext@ha #
addi r8,r8,_etext@l # r8 = &_etext
3: dcbf r0,r9 # Flush the data cache
icbi r0,r9 # Invalidate the instruction cache
addi r9,r9,0x10 # Increment by one cache line
cmplwi cr0,r9,r8 # Are we at the end yet?
blt 3b # No, keep flushing and invalidating
## Set up the stack
lis r9,_start@h # r9 = &_start (text section entry)
addi r9,r9,_start@l
subi r1,r9,64 # Start the stack 64 bytes below _start
clrrwi r1,r1,4 # Make sure it is aligned on 16 bytes.
li r0,0
stwu r0,-16(r1)
mtlr r9
b start # All done, start the real work.
#
# ELF header field numbers
#
$e_ident = 0; # Identification bytes / magic number
$e_type = 1; # ELF file type
$e_machine = 2; # Target machine type
$e_version = 3; # File version
$e_entry = 4; # Start address
$e_phoff = 5; # Program header file offset
$e_shoff = 6; # Section header file offset
$e_flags = 7; # File flags
$e_ehsize = 8; # Size of ELF header
$e_phentsize = 9; # Size of program header
$e_phnum = 10; # Number of program header entries
$e_shentsize = 11; # Size of section header
$e_shnum = 12; # Number of section header entries
$e_shstrndx = 13; # Section header table string index
#
# Section header field numbers
#
$sh_name = 0; # Section name
$sh_type = 1; # Section header type
$sh_flags = 2; # Section header flags
$sh_addr = 3; # Virtual address
$sh_offset = 4; # File offset
$sh_size = 5; # Section size
$sh_link = 6; # Miscellaneous info
$sh_info = 7; # More miscellaneous info
$sh_addralign = 8; # Memory alignment
$sh_entsize = 9; # Entry size if this is a table
/*
*
* Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
*
* Module name: irSect.c
*
* Description:
* Defines variables to hold the absolute starting address and size
* of the Linux kernel "image" and the initial RAM disk "initrd"
* sections within the boot loader.
*
*/
#include "irSect.h"
/*
* The order of globals below must not change. If more globals are added,
* you must change the script 'mkirimg' accordingly.
*
*/
/*
* irSectStart must be at beginning of file
*/
unsigned int irSectStart = 0xdeadbeaf;
unsigned int imageSect_start = 0;
unsigned int imageSect_size = 0;
unsigned int initrdSect_start = 0;
unsigned int initrdSect_size = 0;
/*
* irSectEnd must be at end of file
*/
unsigned int irSectEnd = 0xdeadbeaf;
/*
*
* Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
*
* Module name: irSect.h
*
* Description:
* Defines variables to hold the absolute starting address and size
* of the Linux kernel "image" and the initial RAM disk "initrd"
* sections within the boot loader.
*
*/
#ifndef __IRSECT_H__
#define __IRSECT_H__
#ifdef __cplusplus
extern "C" {
#endif
extern unsigned int imageSect_start;
extern unsigned int imageSect_size;
extern unsigned int initrdSect_start;
extern unsigned int initrdSect_size;
#ifdef __cplusplus
}
#endif
#endif /* __IRSECT_H__ */
OUTPUT_ARCH(powerpc)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/powerpc-any-elf/lib);
/* Do we need any of these for elf?
__DYNAMIC = 0; */
SECTIONS
{
/* Read-only sections, merged into text segment: */
. = + SIZEOF_HEADERS;
.interp : { *(.interp) }
.hash : { *(.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
.rel.text : { *(.rel.text) }
.rela.text : { *(.rela.text) }
.rel.data : { *(.rel.data) }
.rela.data : { *(.rela.data) }
.rel.rodata : { *(.rel.rodata) }
.rela.rodata : { *(.rela.rodata) }
.rel.got : { *(.rel.got) }
.rela.got : { *(.rela.got) }
.rel.ctors : { *(.rel.ctors) }
.rela.ctors : { *(.rela.ctors) }
.rel.dtors : { *(.rel.dtors) }
.rela.dtors : { *(.rela.dtors) }
.rel.bss : { *(.rel.bss) }
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }
.init : { *(.init) } =0
.plt : { *(.plt) }
.text :
{
*(.text)
*(.rodata)
*(.rodata1)
*(.got1)
}
.fini : { *(.fini) } =0
.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
_etext = .;
PROVIDE (etext = .);
/* Read-write section, merged into data segment: */
. = (. + 0x0FFF) & 0xFFFFF000;
.data :
{
*(.data)
*(.data1)
*(.sdata)
*(.sdata2)
*(.got.plt) *(.got)
*(.dynamic)
CONSTRUCTORS
}
_edata = .;
PROVIDE (edata = .);
__bss_start = .;
.bss :
{
*(.sbss) *(.scommon)
*(.dynbss)
*(.bss)
*(COMMON)
}
_end = . ;
PROVIDE (end = .);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -533,8 +533,7 @@ extract_bdp (insn, invalid)
/* Check for legal values of a BO field. */
static int
valid_bo (value)
long value;
valid_bo (long value)
{
/* Certain encodings have bits that are required to be zero. These
are (z must be zero, y may be anything):
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment