Commit 61fbe25f authored by Linus Torvalds's avatar Linus Torvalds

Import 1.3.0

parent 72835ece
......@@ -217,7 +217,7 @@ S: 47807 Krefeld
S: Germany
N: Drew Eckhardt
E: drew@Colorado.EDU
E: drew@PoohSticks.ORG
D: SCSI code
D: Assorted snippets elsewhere
D: Boot sector "..." printing
......
VERSION = 1
PATCHLEVEL = 2
SUBLEVEL = 10
PATCHLEVEL = 3
SUBLEVEL = 0
ARCH = i386
......@@ -100,6 +100,10 @@ ifdef CONFIG_SOUND
DRIVERS := $(DRIVERS) drivers/sound/sound.a
endif
ifdef CONFIG_PCI
DRIVERS := $(DRIVERS) drivers/pci/pci.a
endif
include arch/$(ARCH)/Makefile
.c.s:
......@@ -224,7 +228,7 @@ modules_install:
clean: archclean
rm -f kernel/ksyms.lst
rm -f core `find . -name '*.[oas]' -print`
rm -f core `find . -name 'core' -print`
rm -f core `find . -type f -name 'core' -print`
rm -f vmlinux System.map
rm -f .tmp* drivers/sound/configure
rm -fr modules/*
......
......@@ -179,6 +179,8 @@ void start_kernel(void)
{
long i;
long dev;
int nbytes;
char envval[256];
printk("Linux/AXP bootloader for Linux " UTS_RELEASE "\n");
if (hwrpb.pagesize != 8192) {
......@@ -199,6 +201,14 @@ void start_kernel(void)
printk("Failed (%lx)\n", i);
return;
}
nbytes = dispatch(CCB_GET_ENV, ENV_BOOTED_OSFLAGS,
envval, sizeof(envval));
if (nbytes > 0) {
envval[nbytes] = '\0';
strcpy((char*)ZERO_PGE, envval);
}
printk(" Ok\nNow booting the kernel\n");
runkernel();
for (i = 0 ; i < 0x100000000 ; i++)
......
......@@ -6,19 +6,35 @@
comment 'General setup'
bool 'Normal floppy disk support' CONFIG_BLK_DEV_FD y
bool 'Normal harddisk support' CONFIG_BLK_DEV_HD n
bool 'Normal (MFM/RLL) disk and IDE disk/cdrom support' CONFIG_ST506 n
if [ "$CONFIG_ST506" = "y" ]; then
comment 'Please see drivers/block/README.ide for help/info on IDE drives'
bool ' Use old (reliable) disk-only driver for primary i/f' CONFIG_BLK_DEV_HD n
if [ "$CONFIG_BLK_DEV_HD" = "y" ]; then
bool ' Include new IDE driver for secondary i/f support' CONFIG_BLK_DEV_IDE n
else
bool ' Use new IDE driver for primary/secondary i/f' CONFIG_BLK_DEV_IDE y
fi
if [ "$CONFIG_BLK_DEV_IDE" = "y" ]; then
bool ' Include support for IDE/ATAPI CDROMs' CONFIG_BLK_DEV_IDECD n
fi
fi
bool 'XT harddisk support' CONFIG_BLK_DEV_XD n
bool 'Networking support' CONFIG_NET n
bool 'Networking support' CONFIG_NET y
bool 'PCI alpha motherboard' CONFIG_PCI n
bool 'System V IPC' CONFIG_SYSVIPC n
bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF y
comment 'Loadable module support'
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS n
if [ "$CONFIG_NET" = "y" ]; then
comment 'Networking options'
bool 'TCP/IP networking' CONFIG_INET n
if [ "$CONFIG_INET" "=" "y" ]; then
bool 'TCP/IP networking' CONFIG_INET y
if [ "$CONFIG_INET" = "y" ]; then
bool 'IP forwarding/gatewaying' CONFIG_IP_FORWARD n
bool 'IP multicasting (ALPHA)' CONFIG_IP_MULTICAST n
bool 'IP multicasting' CONFIG_IP_MULTICAST n
bool 'IP firewalling' CONFIG_IP_FIREWALL n
bool 'IP accounting' CONFIG_IP_ACCT n
comment '(it is safe to leave these untouched)'
......@@ -28,12 +44,13 @@ bool 'Assume subnets are local' CONFIG_INET_SNARL y
bool 'Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF n
fi
bool 'The IPX protocol' CONFIG_IPX n
#bool 'Appletalk DDP' CONFIG_ATALK n
#bool 'Amateur Radio AX.25 Level 2' CONFIG_AX25 n
fi
comment 'SCSI support'
bool 'SCSI support?' CONFIG_SCSI n
bool 'SCSI support?' CONFIG_SCSI y
if [ "$CONFIG_SCSI" = "n" ]; then
......@@ -45,7 +62,7 @@ comment 'SCSI support type (disk, tape, CDrom)'
bool 'SCSI disk support' CONFIG_BLK_DEV_SD y
bool 'SCSI tape support' CONFIG_CHR_DEV_ST n
bool 'SCSI CDROM support' CONFIG_BLK_DEV_SR n
bool 'SCSI CDROM support' CONFIG_BLK_DEV_SR y
bool 'SCSI generic support' CONFIG_CHR_DEV_SG n
comment 'SCSI low-level drivers'
......@@ -55,6 +72,7 @@ bool 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 n
bool 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 y
bool 'Adaptec AHA274X/284X support' CONFIG_SCSI_AHA274X n
bool 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC n
bool 'EATA-DMA (DPT,NEC&ATT for ISA,EISA,PCI) support' CONFIG_SCSI_EATA_DMA n
bool 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F n
bool 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN n
bool 'Generic NCR5380 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 n
......@@ -68,7 +86,7 @@ bool 'Seagate ST-02 and Future Domain TMC-8xx SCSI support' CONFIG_SCSI_SEAGATE
bool 'Trantor T128/T128F/T228 SCSI support' CONFIG_SCSI_T128 n
bool 'UltraStor SCSI support' CONFIG_SCSI_ULTRASTOR n
bool '7000FASST SCSI support' CONFIG_SCSI_7000FASST n
bool 'EATA ISA/EISA (DPT PM2011/021/012/022/122/322) support' CONFIG_SCSI_EATA n
#bool 'EATA ISA/EISA (DPT PM2011/021/012/022/122/322) support' CONFIG_SCSI_EATA n
#bool 'SCSI debugging host adapter' CONFIG_SCSI_DEBUG n
fi
......@@ -86,13 +104,12 @@ else
bool 'Dummy net driver support' CONFIG_DUMMY n
bool 'SLIP (serial line) support' CONFIG_SLIP n
if [ "$CONFIG_SLIP" = "y" ]; then
bool ' CSLIP compressed headers' SL_COMPRESSED y
bool ' CSLIP compressed headers' CONFIG_SLIP_COMPRESSED y
bool ' 16 channels instead of 4' SL_SLIP_LOTS n
# bool ' SLIP debugging on' SL_DUMP y
fi
bool 'PPP (point-to-point) support' CONFIG_PPP n
bool 'PLIP (parallel port) support' CONFIG_PLIP n
bool 'Load balancing support (experimental)' CONFIG_SLAVE_BALANCING n
bool 'Do you want to be offered ALPHA test drivers' CONFIG_NET_ALPHA n
bool 'Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC n
if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then
......@@ -116,12 +133,13 @@ if [ "$CONFIG_NET_ISA" = "y" ]; then
bool 'DEPCA support' CONFIG_DEPCA y
bool 'EtherWorks 3 support' CONFIG_EWRK3 n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
# bool 'Arcnet support' CONFIG_ARCNET n
bool 'Arcnet support' CONFIG_ARCNET n
bool 'AT1700 support' CONFIG_AT1700 n
# bool 'EtherExpressPro support' CONFIG_EEXPRESS_PRO n
bool 'EtherExpress support' CONFIG_EEXPRESS n
bool 'NI5210 support' CONFIG_NI52 n
bool 'NI6510 support' CONFIG_NI65 n
bool 'WaveLAN support' CONFIG_WAVELAN n
fi
bool 'HP PCLAN+ (27247B and 27252A) support' CONFIG_HPLAN_PLUS n
bool 'HP PCLAN (27245 and other 27xxx series) support' CONFIG_HPLAN n
......@@ -134,6 +152,7 @@ if [ "$CONFIG_NET_EISA" = "y" ]; then
bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
fi
bool 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
bool 'DE425, DE434, DE435 support' CONFIG_DE4X5 n
# bool 'DEC 21040 PCI support' CONFIG_DEC_ELCP n
# bool 'LPL T100V 100Mbs support' CONFIG_LPL_T100 n
# bool 'PCnet32 (32 bit VLB and PCI LANCE) support' CONFIG_PCNET32 n
......@@ -151,10 +170,10 @@ fi
fi
fi
comment 'CD-ROM drivers'
comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
bool 'Sony CDU31A/CDU33A CDROM driver support' CONFIG_CDU31A n
bool 'Mitsumi CDROM driver support' CONFIG_MCD n
bool 'Mitsumi (not IDE/ATAPI) CDROM driver support' CONFIG_MCD n
bool 'Matsushita/Panasonic CDROM driver support' CONFIG_SBPCD n
if [ "$CONFIG_SBPCD" = "y" ]; then
bool 'Matsushita/Panasonic second CDROM controller support' CONFIG_SBPCD2 n
......@@ -165,6 +184,8 @@ if [ "$CONFIG_SBPCD" = "y" ]; then
fi
fi
fi
bool 'Aztech/Orchid/Okano/Wearnes (non IDE) CDROM support' CONFIG_AZTCD n
bool 'Sony CDU535 CDROM driver support' CONFIG_CDU535 n
comment 'Filesystems'
......@@ -180,7 +201,7 @@ bool '/proc filesystem support' CONFIG_PROC_FS y
if [ "$CONFIG_INET" = "y" ]; then
bool 'NFS filesystem support' CONFIG_NFS_FS y
fi
if [ "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_CDU31A" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_BLK_DEV_IDECD" = "y" ]; then
if [ "$CONFIG_BLK_DEV_SR" = "y" -o "$CONFIG_CDU31A" = "y" -o "$CONFIG_MCD" = "y" -o "$CONFIG_SBPCD" = "y" -o "$CONFIG_BLK_DEV_IDECD" = "y" -o "$CONFIG_AZTCD" = "y" -o "$CONFIG_CDU535" = "y" ]; then
bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS y
else
bool 'ISO9660 cdrom filesystem support' CONFIG_ISO9660_FS n
......
......@@ -18,7 +18,8 @@
.S.o:
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
OBJS = entry.o traps.o process.o irq.o signal.o setup.o
OBJS = entry.o traps.o process.o osf_sys.o irq.o signal.o setup.o \
lca.o bios32.o
all: kernel.o head.o
......
This diff is collapsed.
This diff is collapsed.
......@@ -27,7 +27,7 @@ __start:
halt
.end __start
.align 5
.align 3
.globl wrent
.ent wrent
wrent:
......@@ -35,7 +35,7 @@ wrent:
ret ($26)
.end wrent
.align 5
.align 3
.globl wrkgp
.ent wrkgp
wrkgp:
......@@ -43,7 +43,7 @@ wrkgp:
ret ($26)
.end wrkgp
.align 5
.align 3
.globl wrusp
.ent wrusp
wrusp:
......@@ -51,7 +51,7 @@ wrusp:
ret ($26)
.end wrusp
.align 5
.align 3
.globl rdusp
.ent rdusp
rdusp:
......@@ -59,6 +59,38 @@ rdusp:
ret ($26)
.end rdusp
.align 3
.globl tbi
.ent tbi
tbi:
.long PAL_tbi
ret ($26)
.end tbi
.align 3
.globl imb
.ent imb
imb:
.long PAL_imb
ret ($26)
.end imb
.align 3
.globl rdmces
.ent rdmces
rdmces:
call_pal PAL_rdmces
ret ($26)
.end rdmces
.align 3
.globl wrmces
.ent wrmces
wrmces:
call_pal PAL_wrmces
ret ($26)
.end wrmces
.align 9
.globl floppy_track_buffer
floppy_track_buffer:
......
......@@ -250,9 +250,9 @@ static void local_device_interrupt(unsigned long vector, struct pt_regs * regs)
handle_irq(1, regs);
return;
/* mouse: map to irq 12 */
/* mouse: map to irq 9 */
case 0x990:
handle_irq(12, regs);
handle_irq(9, regs);
return;
default:
printk("Unknown local interrupt %lx\n", vector);
......
/*
* Code common to all LCA chips.
*
* Written by David Mosberger (davidm@cs.arizona.edu) with some code
* taken from Dave Rusling's (david.rusling@reo.mts.dec.com) 32-bit
* bios code.
*/
#include <linux/kernel.h>
#include <linux/config.h>
#include <linux/types.h>
#include <linux/bios32.h>
#include <linux/pci.h>
#include <asm/system.h>
#include <asm/lca.h>
#include <asm/io.h>
/*
* BIOS32-style PCI interface:
*/
/*
* PCI BIOS32 interface:
*/
#define MAJOR_REV 0
#define MINOR_REV 0
#ifdef CONFIG_PCI
#define mtpr_mces(v) \
({ \
register unsigned long v0 asm ("0"); \
register unsigned long a0 asm ("16"); \
a0 = (v); \
asm volatile ("call_pal %1 # %0 %2" : "r="(v0) \
: "i"(PAL_mtpr_mces), "r"(a0) \
: "memory", "0", "1", "16", "22", "23", "24", "25"); \
v0; \
})
#define draina() asm volatile ("call_pal %0" :: "i"(PAL_draina))
#define vulp volatile unsigned long *
/*
* Given a bus, device, and function number, compute resulting
......@@ -42,10 +28,43 @@
* accordingly. It is therefore not safe to have concurrent
* invocations to configuration space access routines, but there
* really shouldn't be any need for this.
*
* Type 0:
*
* 3 3|3 3 2 2|2 2 2 2|2 2 2 2|1 1 1 1|1 1 1 1|1 1
* 3 2|1 0 9 8|7 6 5 4|3 2 1 0|9 8 7 6|5 4 3 2|1 0 9 8|7 6 5 4|3 2 1 0
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | | | | | | | | | | | | | | | | | | | | | | | |F|F|F|R|R|R|R|R|R|0|0|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* 31:11 Device select bit.
* 10:8 Function number
* 7:2 Register number
*
* Type 1:
*
* 3 3|3 3 2 2|2 2 2 2|2 2 2 2|1 1 1 1|1 1 1 1|1 1
* 3 2|1 0 9 8|7 6 5 4|3 2 1 0|9 8 7 6|5 4 3 2|1 0 9 8|7 6 5 4|3 2 1 0
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* | | | | | | | | | | |B|B|B|B|B|B|B|B|D|D|D|D|D|F|F|F|R|R|R|R|R|R|0|1|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* 31:24 reserved
* 23:16 bus number (8 bits = 128 possible buses)
* 15:11 Device number (5 bits)
* 10:8 function number
* 7:2 register number
*
* Notes:
* The function number selects which function of a multi-function device
* (e.g., scsi and ethernet).
*
* The register selects a DWORD (32 bit) register offset. Hence it
* doesn't get shifted by 2 bits as we want to "drop" the bottom two
* bits.
*/
static int
mk_conf_addr(unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned long *pci_addr)
static int mk_conf_addr(unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned long *pci_addr)
{
unsigned long addr;
......@@ -72,8 +91,7 @@ mk_conf_addr(unsigned char bus, unsigned char device_fn,
}
static unsigned int
conf_read(unsigned long addr)
static unsigned int conf_read(unsigned long addr)
{
unsigned long old_ipl, code, stat0;
unsigned int value;
......@@ -101,7 +119,7 @@ conf_read(unsigned long addr)
/* reset error status: */
*((volatile unsigned long*)LCA_IOC_STAT0) = stat0;
mb();
mtpr_mces(0x7); /* reset machine check */
wrmces(0x7); /* reset machine check */
value = 0xffffffff;
}
......@@ -111,73 +129,41 @@ conf_read(unsigned long addr)
}
static void
conf_write(unsigned long addr, unsigned int value)
{
}
int
pcibios_present (void)
static void conf_write(unsigned long addr, unsigned int value)
{
return 1; /* present if configured */
}
unsigned long old_ipl, code, stat0;
int
pcibios_find_class (unsigned long class_code, unsigned short index,
unsigned char *bus, unsigned char *device_fn)
{
pci_resource_t *dev;
unsigned long w;
for (dev = pci_device_list; dev; dev = dev->next) {
pcibios_read_config_dword(dev->bus, dev->dev_fn,
PCI_CLASS_REVISION, &w);
if ((w >> 8) == class_code) {
if (index == 0) {
*bus = dev->bus;
*device_fn = dev->dev_fn;
return PCIBIOS_SUCCESSFUL;
}
--index;
}
}
return PCIBIOS_DEVICE_NOT_FOUND;
}
old_ipl = swpipl(7); /* avoid getting hit by machine check */
/* reset status register to avoid loosing errors: */
stat0 = *((volatile unsigned long*)LCA_IOC_STAT0);
*((volatile unsigned long*)LCA_IOC_STAT0) = stat0;
mb();
int
pcibios_find_device (unsigned short vendor, unsigned short device_id,
unsigned short index, unsigned char *bus,
unsigned char *device_fn)
{
unsigned long w, desired = (device_id << 16) | vendor;
pci_resource_t *dev;
/* access configuration space: */
if (vendor == 0xffff) {
return PCIBIOS_BAD_VENDOR_ID;
}
*((volatile unsigned int*)addr) = value;
draina();
for (dev = pci_device_list; dev; dev = dev->next) {
pcibios_read_config_dword(dev->bus, dev->dev_fn,
PCI_VENDOR_ID, &w);
if (w == desired) {
if (index == 0) {
*bus = dev->bus;
*device_fn = dev->dev_fn;
return PCIBIOS_SUCCESSFUL;
}
--index;
stat0 = *((unsigned long*)LCA_IOC_STAT0);
if (stat0 & LCA_IOC_STAT0_ERR) {
code = ((stat0 >> LCA_IOC_STAT0_CODE_SHIFT)
& LCA_IOC_STAT0_CODE_MASK);
if (code != 1) {
printk("lca.c:conf_write: got stat0=%lx\n", stat0);
}
/* reset error status: */
*((volatile unsigned long*)LCA_IOC_STAT0) = stat0;
mb();
wrmces(0x7); /* reset machine check */
}
return PCIBIOS_DEVICE_NOT_FOUND;
swpipl(old_ipl);
}
int
pcibios_read_config_byte (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned char *value)
int pcibios_read_config_byte (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned char *value)
{
unsigned long addr = LCA_CONF;
unsigned long pci_addr;
......@@ -196,9 +182,8 @@ pcibios_read_config_byte (unsigned char bus, unsigned char device_fn,
}
int
pcibios_read_config_word (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned short *value)
int pcibios_read_config_word (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned short *value)
{
unsigned long addr = LCA_CONF;
unsigned long pci_addr;
......@@ -220,9 +205,8 @@ pcibios_read_config_word (unsigned char bus, unsigned char device_fn,
}
int
pcibios_read_config_dword (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned long *value)
int pcibios_read_config_dword (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned int *value)
{
unsigned long addr = LCA_CONF;
unsigned long pci_addr;
......@@ -245,56 +229,76 @@ pcibios_read_config_dword (unsigned char bus, unsigned char device_fn,
}
int
pcibios_write_config_byte (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned char value)
int pcibios_write_config_byte (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned char value)
{
panic("pcibios_write_config_byte");
unsigned long addr = LCA_CONF;
unsigned long pci_addr;
if (mk_conf_addr(bus, device_fn, where, &pci_addr) < 0) {
return PCIBIOS_SUCCESSFUL;
} /* if */
addr |= (pci_addr << 5) + 0x00;
conf_write(addr, value << ((where & 3) * 8));
return PCIBIOS_SUCCESSFUL;
}
int
pcibios_write_config_word (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned short value)
int pcibios_write_config_word (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned short value)
{
panic("pcibios_write_config_word");
unsigned long addr = LCA_CONF;
unsigned long pci_addr;
if (mk_conf_addr(bus, device_fn, where, &pci_addr) < 0) {
return PCIBIOS_SUCCESSFUL;
} /* if */
addr |= (pci_addr << 5) + 0x08;
conf_write(addr, value << ((where & 3) * 8));
return PCIBIOS_SUCCESSFUL;
}
int
pcibios_write_config_dword (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned long value)
int pcibios_write_config_dword (unsigned char bus, unsigned char device_fn,
unsigned char where, unsigned int value)
{
panic("pcibios_write_config_dword");
}
unsigned long addr = LCA_CONF;
unsigned long pci_addr;
#endif /* CONFIG_PCI */
if (mk_conf_addr(bus, device_fn, where, &pci_addr) < 0) {
return PCIBIOS_SUCCESSFUL;
} /* if */
addr |= (pci_addr << 5) + 0x18;
unsigned long
bios32_init(unsigned long memory_start, unsigned long memory_end)
{
#ifdef CONFIG_PCI
printk("LCA PCI BIOS32 revision %x.%02x\n", MAJOR_REV, MINOR_REV);
conf_write(addr, value << ((where & 3) * 8));
probe_pci();
return PCIBIOS_SUCCESSFUL;
}
#if 0
{
char buf[4096];
get_pci_list(buf);
printk("%s", buf);
}
#endif
unsigned long lca_init(unsigned long mem_start, unsigned long mem_end)
{
/*
* Set up the PCI->physical memory translation windows.
* For now, window 1 is disabled. In the future, we may
* want to use it to do scatter/gather DMA. Window 0
* goes at 1 GB and is 1 GB large.
*/
*(vulp)LCA_IOC_W_BASE1 = 0UL<<33;
*(vulp)LCA_IOC_W_BASE0 = 1UL<<33 | LCA_DMA_WIN_BASE;
*(vulp)LCA_IOC_W_MASK0 = LCA_DMA_WIN_SIZE - 1;
*(vulp)LCA_IOC_T_BASE0 = 0;
return mem_start;
}
#if 0
{
extern void NCR53c810_test(void);
NCR53c810_test();
}
#endif
#endif /* CONFIG_PCI */
return memory_start;
} /* bios32_init */
/*** end of lca.c ***/
This diff is collapsed.
......@@ -19,11 +19,24 @@
#include <linux/ldt.h>
#include <linux/user.h>
#include <linux/a.out.h>
#include <linux/utsname.h>
#include <linux/time.h>
#include <linux/major.h>
#include <linux/stat.h>
#include <linux/mman.h>
#include <asm/segment.h>
#include <asm/system.h>
#include <asm/io.h>
asmlinkage int sys_sethae(unsigned long hae, unsigned long a1, unsigned long a2,
unsigned long a3, unsigned long a4, unsigned long a5,
struct pt_regs regs)
{
(&regs)->hae = hae;
return 0;
}
asmlinkage int sys_idle(void)
{
if (current->pid != 0)
......@@ -44,7 +57,19 @@ void hard_reset_now(void)
void show_regs(struct pt_regs * regs)
{
printk("\nps: %04lx pc: %016lx\n", regs->ps, regs->pc);
printk("rp: %04lx sp: %p\n", regs->r26, regs+1);
printk("rp: %016lx sp: %p\n", regs->r26, regs+1);
printk(" r0: %016lx r1: %016lx r2: %016lx r3: %016lx\n",
regs->r0, regs->r1, regs->r2, regs->r3);
printk(" r4: %016lx r5: %016lx r6: %016lx r7: %016lx\n",
regs->r4, regs->r5, regs->r6, regs->r7);
printk(" r8: %016lx r16: %016lx r17: %016lx r18: %016lx\n",
regs->r8, regs->r16, regs->r17, regs->r18);
printk("r19: %016lx r20: %016lx r21: %016lx r22: %016lx\n",
regs->r19, regs->r20, regs->r21, regs->r22);
printk("r23: %016lx r24: %016lx r25: %016lx r26: %016lx\n",
regs->r23, regs->r24, regs->r25, regs->r26);
printk("r27: %016lx r28: %016lx r29: %016lx hae: %016lx\n",
regs->r27, regs->r28, regs->gp, regs->hae);
}
/*
......@@ -58,82 +83,55 @@ void flush_thread(void)
{
}
struct alpha_switch_stack {
unsigned long r9;
unsigned long r10;
unsigned long r11;
unsigned long r12;
unsigned long r13;
unsigned long r14;
unsigned long r15;
unsigned long r26;
};
/*
* "alpha_switch_to()".. Done completely in assembly, due to the
* fact that we obviously don't returns to the caller directly.
* Also, we have to save the regs that the C compiler expects to be
* saved across a function call.. (9-15)
*
* NOTE! The stack switches from under us when we do the swpctx call:
* this *looks* like it restores the same registers that it just saved,
* but it actually restores the new context regs and return address.
*/
__asm__(".align 3\n\t"
".globl alpha_switch_to\n\t"
".ent alpha_switch_to\n"
"alpha_switch_to:\n\t"
"subq $30,64,$30\n\t"
"stq $9,0($30)\n\t"
"stq $10,8($30)\n\t"
"stq $11,16($30)\n\t"
"stq $12,24($30)\n\t"
"stq $13,32($30)\n\t"
"stq $14,40($30)\n\t"
"stq $15,48($30)\n\t"
"stq $26,56($30)\n\t"
"call_pal 48\n\t"
"ldq $9,0($30)\n\t"
"ldq $10,8($30)\n\t"
"ldq $11,16($30)\n\t"
"ldq $12,24($30)\n\t"
"ldq $13,32($30)\n\t"
"ldq $14,40($30)\n\t"
"ldq $15,48($30)\n\t"
"ldq $26,56($30)\n\t"
"addq $30,64,$30\n\t"
"ret $31,($26),1\n\t"
".end alpha_switch_to");
/*
* "alpha_fork()".. By the time we get here, the
* non-volatile registers have also been saved on the
* stack. We do some ugly pointer stuff here.. (see
* also copy_thread)
*/
int alpha_fork(struct alpha_switch_stack * swstack)
int alpha_fork(struct switch_stack * swstack)
{
return do_fork(COPYVM | SIGCHLD, 0, (struct pt_regs *) (swstack+1));
return do_fork(COPYVM | SIGCHLD,
rdusp(),
(struct pt_regs *) (swstack+1));
}
extern void ret_from_sys_call(void);
/*
* Copy an alpha thread..
*
* Note the "stack_offset" stuff: when returning to kernel mode, we need
* to have some extra stack-space for the kernel stack that still exists
* after the "ret_from_sys_call". When returning to user mode, we only
* want the space needed by the syscall stack frame (ie "struct pt_regs").
* Use the passed "regs" pointer to determine how much space we need
* for a kernel fork().
*/
void copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
struct task_struct * p, struct pt_regs * regs)
{
struct pt_regs * childregs;
struct alpha_switch_stack * childstack, *stack;
childregs = ((struct pt_regs *) (p->kernel_stack_page + PAGE_SIZE)) - 1;
struct switch_stack * childstack, *stack;
unsigned long stack_offset;
stack_offset = PAGE_SIZE - sizeof(struct pt_regs);
if (!(regs->ps & 8))
stack_offset = (PAGE_SIZE-1) & (unsigned long) regs;
childregs = (struct pt_regs *) (p->kernel_stack_page + stack_offset);
*childregs = *regs;
childregs->r0 = 0;
childregs->r19 = 0;
childregs->r20 = 1; /* OSF/1 has some strange fork() semantics.. */
regs->r0 = p->pid;
stack = ((struct alpha_switch_stack *) regs) - 1;
childstack = ((struct alpha_switch_stack *) childregs) - 1;
regs->r20 = 0;
stack = ((struct switch_stack *) regs) - 1;
childstack = ((struct switch_stack *) childregs) - 1;
*childstack = *stack;
childstack->r26 = (unsigned long) ret_from_sys_call;
p->tss.usp = usp;
p->tss.ksp = (unsigned long) childstack;
p->tss.flags = 1;
}
/*
......
......@@ -20,14 +20,35 @@
#include <linux/user.h>
#include <linux/a.out.h>
#include <linux/tty.h>
#include <linux/delay.h>
#include <asm/segment.h>
#include <asm/system.h>
#include <asm/hwrpb.h>
#include <asm/dma.h>
#include <asm/io.h>
struct hae hae = {
0,
(unsigned long*) HAE_ADDRESS
};
struct hwrpb_struct *hwrpb;
unsigned char aux_device_present;
/*
* This is setup by the secondary bootstrap loader. Because
* the zero page is zeroed out as soon as the vm system is
* initialized, we need to copy things out into a more permanent
* place.
*/
#define PARAM ZERO_PGE
#define COMMAND_LINE ((char*)(PARAM + 0x0000))
#define COMMAND_LINE_SIZE 256
static char command_line[COMMAND_LINE_SIZE] = { 0, };
/*
* The format of "screen_info" is strange, and due to early
* i386-setup code. This is just enough to make the console
......@@ -35,7 +56,7 @@ unsigned char aux_device_present;
*/
struct screen_info screen_info = {
0, 0, /* orig-x, orig-y */
0, 0, /* unused */
{ 0, 0 }, /* unused */
0, /* orig-video-page */
0, /* orig-video-mode */
80, /* orig-video-cols */
......@@ -43,11 +64,6 @@ struct screen_info screen_info = {
25 /* orig-video-lines */
};
unsigned long bios32_init(unsigned long memory_start, unsigned long memory_end)
{
return memory_start;
}
static unsigned long find_end_memory(void)
{
int i;
......@@ -71,17 +87,86 @@ static unsigned long find_end_memory(void)
void setup_arch(char **cmdline_p,
unsigned long * memory_start_p, unsigned long * memory_end_p)
{
static char cmdline[] = "";
extern int _end;
ROOT_DEV = 0x0200; /* fd0 */
hwrpb = (struct hwrpb_struct*)(IDENT_ADDR + INIT_HWRPB->phys_addr);
set_hae(hae.cache); /* sync HAE register w/hae_cache */
ROOT_DEV = 0x0802; /* sda2 */
#ifndef CONFIG_PCI
aux_device_present = 0xaa;
*cmdline_p = cmdline;
#else
aux_device_present = 0x00;
#endif
command_line[COMMAND_LINE_SIZE - 1] = '\0';
strcpy(command_line, COMMAND_LINE);
*cmdline_p = command_line;
*memory_start_p = (unsigned long) &_end;
*memory_end_p = find_end_memory();
#ifdef CONFIG_PCI
*memory_start_p = lca_init(*memory_start_p, *memory_end_p);
#endif
}
asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on)
{
return -EIO;
}
/*
* BUFFER is PAGE_SIZE bytes long.
*/
int get_cpuinfo(char *buffer)
{
const char *cpu_name[] = {
"EV3", "EV4", "Unknown 1", "LCA4", "EV5", "EV45"
};
const char *systype_name[] = {
"ADU", "Cobra", "Ruby", "Flamingo", "Unknown 1", "Jensen",
"Pelican", "Unknown 2", "Sable", "AXPvme", "Noname",
"Turbolaser", "Avanti", "Mustang", "Alcor", "Unknown 3",
"Mikasa", "Unknown3", "EB66", "EB64+"
};
struct percpu_struct *cpu;
unsigned int cpu_index, system_index;
# define N(a) (sizeof(a)/sizeof(a[0]))
cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset);
cpu_index = (unsigned) (cpu->type - 1);
system_index = (unsigned) (hwrpb->sys_type - 1);
return sprintf(buffer,
"cpu\t\t\t: Alpha\n"
"cpu model\t\t: %s\n"
"cpu variation\t\t: %ld\n"
"cpu revision\t\t: %ld\n"
"cpu serial number\t: %s\n"
"system type\t\t: %s\n"
"system variation\t: %ld\n"
"system revision\t\t: %ld\n"
"system serial number\t: %s\n"
"cycle frequency [Hz]\t: %lu\n"
"timer frequency [Hz]\t: %lu.%02lu\n"
"page size [bytes]\t: %ld\n"
"phys. address bits\t: %ld\n"
"max. addr. space #\t: %ld\n"
"BogoMIPS\t\t: %lu.%02lu\n",
(cpu_index < N(cpu_name) ? cpu_name[cpu_index] : "Unknown"),
cpu->variation, cpu->revision, (char*)cpu->serial_no,
(system_index < N(systype_name) ? systype_name[system_index] : "Unknown"),
hwrpb->sys_variation, hwrpb->sys_revision,
(char*)hwrpb->ssn,
hwrpb->cycle_freq,
hwrpb->intr_freq / 4096,
(100 * hwrpb->intr_freq / 4096) % 100,
hwrpb->pagesize,
hwrpb->pa_bits,
hwrpb->max_asn,
loops_per_sec / 500000, (loops_per_sec / 5000) % 100);
# undef N
}
......@@ -11,50 +11,183 @@
#include <linux/wait.h>
#include <linux/ptrace.h>
#include <linux/unistd.h>
#include <linux/mm.h>
#include <asm/bitops.h>
#include <asm/segment.h>
#define _S(nr) (1<<((nr)-1))
#define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
asmlinkage int sys_waitpid(pid_t pid,unsigned long * stat_addr, int options);
asmlinkage void ret_from_sys_call(void);
asmlinkage int do_signal(unsigned long, struct pt_regs *, struct switch_stack *,
unsigned long, unsigned long);
asmlinkage void imb(void);
/*
* atomically swap in the new signal mask, and wait for a signal.
* The OSF/1 sigprocmask calling sequence is different from the
* C sigprocmask() sequence..
*/
asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, unsigned long set)
asmlinkage unsigned long osf_sigprocmask(int how, unsigned long newmask)
{
unsigned long mask;
struct pt_regs * regs = (struct pt_regs *) &restart;
unsigned long oldmask = current->blocked;
newmask &= _BLOCKABLE;
switch (how) {
case SIG_BLOCK:
current->blocked |= newmask;
return oldmask;
case SIG_UNBLOCK:
current->blocked &= ~newmask;
return oldmask;
case SIG_SETMASK:
current->blocked = newmask;
return oldmask;
}
return -EINVAL;
}
halt();
mask = current->blocked;
current->blocked = set & _BLOCKABLE;
/*
* atomically swap in the new signal mask, and wait for a signal.
*/
asmlinkage int do_sigsuspend(unsigned long mask, struct pt_regs * regs, struct switch_stack * sw)
{
unsigned long oldmask = current->blocked;
current->blocked = mask & _BLOCKABLE;
while (1) {
current->state = TASK_INTERRUPTIBLE;
schedule();
if (do_signal(mask,regs))
if (do_signal(oldmask,regs, sw, 0, 0))
return -EINTR;
}
}
/*
* this should do a signal return with the info on the stack..
* Do a signal return; undo the signal stack.
*/
asmlinkage int sys_sigreturn(unsigned long __unused)
asmlinkage void do_sigreturn(struct sigcontext_struct * sc,
struct pt_regs * regs, struct switch_stack * sw)
{
halt();
return 0;
unsigned long mask;
int i;
/* verify that it's a good sigcontext before using it */
if (verify_area(VERIFY_READ, sc, sizeof(*sc)))
do_exit(SIGSEGV);
if (get_fs_quad(&sc->sc_ps) != 8)
do_exit(SIGSEGV);
mask = get_fs_quad(&sc->sc_mask);
if (mask & ~_BLOCKABLE)
do_exit(SIGSEGV);
/* ok, looks fine, start restoring */
wrusp(get_fs_quad(sc->sc_regs+30));
regs->pc = get_fs_quad(&sc->sc_pc);
sw->r26 = (unsigned long) ret_from_sys_call;
current->blocked = mask;
regs->r0 = get_fs_quad(sc->sc_regs+0);
regs->r1 = get_fs_quad(sc->sc_regs+1);
regs->r2 = get_fs_quad(sc->sc_regs+2);
regs->r3 = get_fs_quad(sc->sc_regs+3);
regs->r4 = get_fs_quad(sc->sc_regs+4);
regs->r5 = get_fs_quad(sc->sc_regs+5);
regs->r6 = get_fs_quad(sc->sc_regs+6);
regs->r7 = get_fs_quad(sc->sc_regs+7);
regs->r8 = get_fs_quad(sc->sc_regs+8);
sw->r9 = get_fs_quad(sc->sc_regs+9);
sw->r10 = get_fs_quad(sc->sc_regs+10);
sw->r11 = get_fs_quad(sc->sc_regs+11);
sw->r12 = get_fs_quad(sc->sc_regs+12);
sw->r13 = get_fs_quad(sc->sc_regs+13);
sw->r14 = get_fs_quad(sc->sc_regs+14);
sw->r15 = get_fs_quad(sc->sc_regs+15);
regs->r16 = get_fs_quad(sc->sc_regs+16);
regs->r17 = get_fs_quad(sc->sc_regs+17);
regs->r18 = get_fs_quad(sc->sc_regs+18);
regs->r19 = get_fs_quad(sc->sc_regs+19);
regs->r20 = get_fs_quad(sc->sc_regs+20);
regs->r21 = get_fs_quad(sc->sc_regs+21);
regs->r22 = get_fs_quad(sc->sc_regs+22);
regs->r23 = get_fs_quad(sc->sc_regs+23);
regs->r24 = get_fs_quad(sc->sc_regs+24);
regs->r25 = get_fs_quad(sc->sc_regs+25);
regs->r26 = get_fs_quad(sc->sc_regs+26);
regs->r27 = get_fs_quad(sc->sc_regs+27);
regs->r28 = get_fs_quad(sc->sc_regs+28);
regs->gp = get_fs_quad(sc->sc_regs+29);
for (i = 0; i < 31; i++)
sw->fp[i] = get_fs_quad(sc->sc_fpregs+i);
}
/*
* Set up a signal frame... I don't know what it should look like yet.
* Set up a signal frame...
*/
void setup_frame(struct sigaction * sa, unsigned long ** fp, unsigned long pc,
struct pt_regs * regs, int signr, unsigned long oldmask)
static void setup_frame(struct sigaction * sa, struct sigcontext_struct ** fp, unsigned long pc,
struct pt_regs * regs, struct switch_stack * sw, int signr, unsigned long oldmask)
{
halt();
int i;
struct sigcontext_struct * sc;
sc = *fp;
/* check here if we would need to switch stacks.. */
sc--;
if (verify_area(VERIFY_WRITE, sc, sizeof(*sc)))
do_exit(SIGSEGV);
put_fs_quad(oldmask, &sc->sc_mask);
put_fs_quad(8, &sc->sc_ps);
put_fs_quad(pc, &sc->sc_pc);
put_fs_quad((unsigned long)*fp, sc->sc_regs+30);
put_fs_quad(regs->r0 , sc->sc_regs+0);
put_fs_quad(regs->r1 , sc->sc_regs+1);
put_fs_quad(regs->r2 , sc->sc_regs+2);
put_fs_quad(regs->r3 , sc->sc_regs+3);
put_fs_quad(regs->r4 , sc->sc_regs+4);
put_fs_quad(regs->r5 , sc->sc_regs+5);
put_fs_quad(regs->r6 , sc->sc_regs+6);
put_fs_quad(regs->r7 , sc->sc_regs+7);
put_fs_quad(regs->r8 , sc->sc_regs+8);
put_fs_quad(sw->r9 , sc->sc_regs+9);
put_fs_quad(sw->r10 , sc->sc_regs+10);
put_fs_quad(sw->r11 , sc->sc_regs+11);
put_fs_quad(sw->r12 , sc->sc_regs+12);
put_fs_quad(sw->r13 , sc->sc_regs+13);
put_fs_quad(sw->r14 , sc->sc_regs+14);
put_fs_quad(sw->r15 , sc->sc_regs+15);
put_fs_quad(regs->r16, sc->sc_regs+16);
put_fs_quad(regs->r17, sc->sc_regs+17);
put_fs_quad(regs->r18, sc->sc_regs+18);
put_fs_quad(regs->r19, sc->sc_regs+19);
put_fs_quad(regs->r20, sc->sc_regs+20);
put_fs_quad(regs->r21, sc->sc_regs+21);
put_fs_quad(regs->r22, sc->sc_regs+22);
put_fs_quad(regs->r23, sc->sc_regs+23);
put_fs_quad(regs->r24, sc->sc_regs+24);
put_fs_quad(regs->r25, sc->sc_regs+25);
put_fs_quad(regs->r26, sc->sc_regs+26);
put_fs_quad(regs->r27, sc->sc_regs+27);
put_fs_quad(regs->r28, sc->sc_regs+28);
put_fs_quad(regs->gp , sc->sc_regs+29);
for (i = 0; i < 31; i++)
put_fs_quad(sw->fp[i], sc->sc_fpregs+i);
/*
* The following is:
*
* bis $30,$30,$16
* addq $31,0x67,$0
* call_pal callsys
*
* ie, "sigreturn(stack-pointer)"
*/
put_fs_quad(0x43ecf40047de0410, sc->sc_retcode+0);
put_fs_quad(0x0000000000000083, sc->sc_retcode+1);
regs->r26 = (unsigned long) sc->sc_retcode;
regs->r16 = signr;
*fp = sc;
}
/*
......@@ -66,10 +199,121 @@ void setup_frame(struct sigaction * sa, unsigned long ** fp, unsigned long pc,
* the kernel can handle, and then we build all the user-level signal handling
* stack-frames in one go after that.
*
* Not that any of this is actually implemented yet ;-)
* "r0" and "r19" are the registers we need to restore for system call
* restart. "r0" is also used as an indicator whether we can restart at
* all (if we get here from anything but a syscall return, it will be 0)
*/
asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs)
asmlinkage int do_signal(unsigned long oldmask,
struct pt_regs * regs,
struct switch_stack * sw,
unsigned long r0, unsigned long r19)
{
halt();
unsigned long mask = ~current->blocked;
unsigned long handler_signal = 0;
struct sigcontext_struct *frame = NULL;
unsigned long pc = 0;
unsigned long signr;
struct sigaction * sa;
while ((signr = current->signal & mask) != 0) {
signr = ffz(~signr);
clear_bit(signr, &current->signal);
sa = current->sigaction + signr;
signr++;
if ((current->flags & PF_PTRACED) && signr != SIGKILL) {
current->exit_code = signr;
current->state = TASK_STOPPED;
notify_parent(current);
schedule();
if (!(signr = current->exit_code))
continue;
current->exit_code = 0;
if (signr == SIGSTOP)
continue;
if (_S(signr) & current->blocked) {
current->signal |= _S(signr);
continue;
}
sa = current->sigaction + signr - 1;
}
if (sa->sa_handler == SIG_IGN) {
if (signr != SIGCHLD)
continue;
/* check for SIGCHLD: it's special */
while (sys_waitpid(-1,NULL,WNOHANG) > 0)
/* nothing */;
continue;
}
if (sa->sa_handler == SIG_DFL) {
if (current->pid == 1)
continue;
switch (signr) {
case SIGCONT: case SIGCHLD: case SIGWINCH:
continue;
case SIGSTOP: case SIGTSTP: case SIGTTIN: case SIGTTOU:
if (current->flags & PF_PTRACED)
continue;
current->state = TASK_STOPPED;
current->exit_code = signr;
if (!(current->p_pptr->sigaction[SIGCHLD-1].sa_flags &
SA_NOCLDSTOP))
notify_parent(current);
schedule();
continue;
case SIGQUIT: case SIGILL: case SIGTRAP:
case SIGABRT: case SIGFPE: case SIGSEGV:
if (current->binfmt && current->binfmt->core_dump) {
if (current->binfmt->core_dump(signr, regs))
signr |= 0x80;
}
/* fall through */
default:
current->signal |= _S(signr & 0x7f);
do_exit(signr);
}
}
/*
* OK, we're invoking a handler
*/
if (r0) {
if (regs->r0 == ERESTARTNOHAND ||
(regs->r0 == ERESTARTSYS && !(sa->sa_flags & SA_RESTART)))
regs->r0 = EINTR;
}
handler_signal |= 1 << (signr-1);
mask &= ~sa->sa_mask;
}
if (r0 &&
(regs->r0 == ERESTARTNOHAND ||
regs->r0 == ERESTARTSYS ||
regs->r0 == ERESTARTNOINTR)) {
regs->r0 = r0;
regs->r19 = r19;
regs->pc -= 4;
}
if (!handler_signal) /* no handler will be called - return 0 */
return 0;
pc = regs->pc;
frame = (struct sigcontext_struct *) rdusp();
signr = 1;
sa = current->sigaction;
for (mask = 1 ; mask ; sa++,signr++,mask += mask) {
if (mask > handler_signal)
break;
if (!(mask & handler_signal))
continue;
setup_frame(sa,&frame,pc,regs,sw,signr,oldmask);
pc = (unsigned long) sa->sa_handler;
regs->r27 = pc;
if (sa->sa_flags & SA_ONESHOT)
sa->sa_handler = NULL;
current->blocked |= sa->sa_mask;
oldmask |= sa->sa_mask;
}
imb();
wrusp((unsigned long) frame);
regs->pc = pc; /* "return" to the first handler */
return 1;
}
......@@ -9,14 +9,40 @@
*/
#include <linux/sched.h>
#include <linux/tty.h>
#include <asm/unaligned.h>
void die_if_kernel(char * str, struct pt_regs * regs, long err)
{
unsigned long i;
long i;
unsigned long sp;
unsigned int * pc;
printk("%s %ld\n", str, err);
printk("pc = %016lx ps = %04lx\n", regs->pc, regs->ps);
printk("rp = %016lx sp = %p\n", regs->r26, regs+1);
printk("%s(%d): %s %ld\n", current->comm, current->pid, str, err);
sp = (unsigned long) (regs+1);
if (regs->ps & 8)
sp = rdusp();
printk("pc = %lx ps = %04lx\n", regs->pc, regs->ps);
printk("rp = %lx sp = %lx\n", regs->r26, sp);
printk("r0=%lx r1=%lx r2=%lx r3=%lx\n",
regs->r0, regs->r1, regs->r2, regs->r3);
printk("r8=%lx\n", regs->r8);
printk("r16=%lx r17=%lx r18=%lx r19=%lx\n",
regs->r16, regs->r17, regs->r18, regs->r19);
printk("r20=%lx r21=%lx r22=%lx r23=%lx\n",
regs->r20, regs->r21, regs->r22, regs->r23);
printk("r24=%lx r25=%lx r26=%lx r27=%lx\n",
regs->r24, regs->r25, regs->r26, regs->r27);
printk("r28=%lx r29=%lx r30=%lx\n",
regs->r28, regs->gp, sp);
if (regs->ps & 8)
return;
printk("Code:");
pc = (unsigned int *) regs->pc;
for (i = -3; i < 6; i++)
printk("%c%08x%c",i?' ':'<',pc[i],i?' ':'>');
printk("\n");
for (i = 0 ; i < 5000000000 ; i++)
/* pause */;
halt();
......@@ -37,12 +63,56 @@ asmlinkage void do_entIF(unsigned long type, unsigned long a1, unsigned long a2,
die_if_kernel("Instruction fault", &regs, type);
}
asmlinkage void do_entUna(unsigned long va, unsigned long opcode, unsigned long reg,
/*
* entUna has a different register layout to be reasonably simple. It
* needs access to all the integer registers (the kernel doesn't use
* fp-regs), and it needs to have them in order for simpler access.
*
* Due to the non-standard register layout (and because we don't want
* to handle floating-point regs), we disallow user-mode unaligned
* accesses (we'd need to do "verify_area()" checking, as well as
* do a full "ret_from_sys_call" return).
*
* Oh, btw, we don't handle the "gp" register correctly, but if we fault
* on a gp-register unaligned load/store, something is _very_ wrong
* in the kernel anyway..
*/
struct allregs {
unsigned long regs[32];
unsigned long ps, pc, gp, a0, a1, a2;
};
asmlinkage void do_entUna(void * va, unsigned long opcode, unsigned long reg,
unsigned long a3, unsigned long a4, unsigned long a5,
struct pt_regs regs)
struct allregs regs)
{
printk("Unaligned trap: %016lx %ld %ld\n", va, opcode, reg);
die_if_kernel("Unaligned", &regs, 0);
static int cnt = 0;
if (regs.ps & 8)
do_exit(SIGSEGV);
if (++cnt < 5)
printk("Unaligned trap at %016lx: %p %lx %ld\n",
regs.pc, va, opcode, reg);
/* $16-$18 are PAL-saved, and are offset by 19 entries */
if (reg >= 16 && reg <= 18)
reg += 19;
switch (opcode) {
case 0x28: /* ldl */
*(reg+regs.regs) = (int) ldl_u(va);
return;
case 0x29: /* ldq */
*(reg+regs.regs) = ldq_u(va);
return;
case 0x2c: /* stl */
stl_u(*(reg+regs.regs), va);
return;
case 0x2d: /* stq */
stq_u(*(reg+regs.regs), va);
return;
}
printk("Bad unaligned kernel access at %016lx: %p %lx %ld\n",
regs.pc, va, opcode, reg);
do_exit(SIGSEGV);
}
/*
......@@ -56,11 +126,11 @@ asmlinkage void do_entUna(unsigned long va, unsigned long opcode, unsigned long
* are a thinko. DEC palcode is strange. The PAL-code designers probably
* got terminally tainted by VMS at some point.
*/
asmlinkage void do_entSys(unsigned long a0, unsigned long a1, unsigned long a2,
asmlinkage long do_entSys(unsigned long a0, unsigned long a1, unsigned long a2,
unsigned long a3, unsigned long a4, unsigned long a5, struct pt_regs regs)
{
printk("System call %ld(%ld,%ld)\n", regs.r0, a0, a1);
die_if_kernel("Syscall", &regs, 0);
printk("<sc %ld(%lx,%lx,%lx)>", regs.r0, a0, a1, a2);
return -1;
}
extern asmlinkage void entMM(void);
......
......@@ -9,7 +9,7 @@
.c.o:
$(CC) $(CFLAGS) -c $<
OBJS = __divqu.o __remqu.o __divlu.o __remlu.o memset.o
OBJS = __divqu.o __remqu.o __divlu.o __remlu.o memset.o memcpy.o io.o
lib.a: $(OBJS)
$(AR) rcs lib.a $(OBJS)
......
......@@ -58,10 +58,12 @@
#define func(x) __div##x
#define modulus $2
#define quotient $27
#define GETSIGN(x) xor $24,$25,x
#else
#define func(x) __rem##x
#define modulus $27
#define quotient $2
#define GETSIGN(x) bis $24,$24,x
#endif
/*
......@@ -122,9 +124,14 @@ ufunction:
.end ufunction
/*
* The "signed" version just does a halt if either of the value is
* signed: the kernel shouldn't mess with signed divides anyway (who
* knows what way they'll round..)
* Uhh.. Ugly signed division. I'd rather not have it at all, but
* it's needed in some circumstances. There are different ways to
* handle this, really. This does:
* -a / b = a / -b = -(a / b)
* -a % b = -(a % b)
* a % -b = a % b
* which is probably not the best solution, but at least should
* have the property that (x/y)*y + (x%y) = x.
*/
.globl sfunction
.ent sfunction
......@@ -132,5 +139,22 @@ sfunction:
bis $24,$25,$28
SLONGIFY($28)
bge $28,ufunction
halt
subq $30,32,$30
stq $23,0($30)
stq $24,8($30)
stq $25,16($30)
subq $31,$24,$28
cmovlt $24,$28,$24 /* abs($24) */
subq $31,$25,$28
cmovlt $25,$28,$25 /* abs($25) */
bsr $23,ufunction
ldq $23,0($30)
ldq $24,8($30)
ldq $25,16($30)
addq $30,32,$30
GETSIGN($28)
SLONGIFY($28)
bge $28,1f
subq $31,$27,$27
1: ret $31,($23),1
.end sfunction
/*
* Alpha IO and memory functions.. Just expand the inlines in the header
* files..
*/
#include <asm/io.h>
/*
* Jensen has a separate "local" and "bus" IO space for
* byte-wide IO.
*/
#ifdef __is_local
#undef __bus_inb
unsigned int __bus_inb(unsigned long addr)
{
return ___bus_inb(addr);
}
#undef __bus_outb
void __bus_outb(unsigned char b, unsigned long addr)
{
___bus_outb(b, addr);
}
#endif
#undef inb
unsigned int inb(unsigned long addr)
{
return __inb(addr);
}
#undef inw
unsigned int inw(unsigned long addr)
{
return __inw(addr);
}
#undef inl
unsigned int inl(unsigned long addr)
{
return __inl(addr);
}
#undef outb
void outb(unsigned char b, unsigned long addr)
{
__outb(b, addr);
}
#undef outw
void outw(unsigned short b, unsigned long addr)
{
__outw(b, addr);
}
#undef outl
void outl(unsigned int b, unsigned long addr)
{
__outl(b, addr);
}
#undef readb
unsigned long readb(unsigned long addr)
{
return __readb(addr);
}
#undef readw
unsigned long readw(unsigned long addr)
{
return __readw(addr);
}
#undef readl
unsigned long readl(unsigned long addr)
{
return __readl(addr);
}
#undef writeb
void writeb(unsigned short b, unsigned long addr)
{
__writeb(b, addr);
}
#undef writew
void writew(unsigned short b, unsigned long addr)
{
__writew(b, addr);
}
#undef writel
void writel(unsigned int b, unsigned long addr)
{
__writel(b, addr);
}
/*
* linux/arch/alpha/lib/memcpy.c
*
* Copyright (C) 1995 Linus Torvalds
*/
/*
* This is reasonably optimized for the quad-word-aligned case, which
* happens with page/buffer copies. It's horribly bad for the unaligned
* case: it could be made much better, but that would require lots of
* assembly (unaligned 8-byte load + shift + aligned 4-byte store, for
* example).
*/
#include <linux/types.h>
static inline void __memcpy_b(unsigned long d, unsigned long s, long n)
{
while (--n >= 0)
*(char *) (d++) = *(char *) (s++);
}
static inline void __memcpy_q(unsigned long d, unsigned long s, long n)
{
/* this first part could be done in one go with ldq_u*2/mask/stq_u */
while (d & 7) {
if (--n < 0)
return;
*(char *) d = *(char *) s;
d++;
s++;
}
while ((n -= 8) >= 0) {
*(unsigned long *) d = *(unsigned long *) s;
d += 8;
s += 8;
}
/* as could this.. */
__memcpy_b(d,s,n+8);
}
static inline void __memcpy_l(unsigned long d, unsigned long s, long n)
{
while (d & 3) {
if (--n < 0)
return;
*(char *) d = *(char *) s;
d++;
s++;
}
while ((n -= 4) >= 0) {
*(unsigned int *) d = *(unsigned int *) s;
d += 4;
s += 4;
}
__memcpy_b(d,s,n+4);
}
void * __memcpy(void * dest, const void *src, size_t n)
{
unsigned long differ;
differ = ((unsigned long) dest ^ (unsigned long) src) & 7;
if (!differ) {
__memcpy_q((unsigned long) dest, (unsigned long) src, n);
return dest;
}
if (differ == 4) {
__memcpy_l((unsigned long) dest, (unsigned long) src, n);
return dest;
}
__memcpy_b((unsigned long) dest, (unsigned long) src, n);
return dest;
}
......@@ -21,6 +21,10 @@
#include <asm/pgtable.h>
extern void die_if_kernel(char *,struct pt_regs *,long);
extern void tbi(unsigned long type, unsigned long arg);
#define tbisi(x) tbi(1,(x))
#define tbisd(x) tbi(2,(x))
#define tbis(x) tbi(3,(x))
/*
* This routine handles page faults. It determines the address,
......@@ -64,13 +68,14 @@ asmlinkage void do_page_fault(unsigned long address, unsigned long mmcsr, long c
if (!(vma->vm_flags & VM_EXEC))
goto bad_area;
} else if (!cause) {
if (!(vma->vm_flags & VM_READ))
/* Allow reads even for write-only mappings */
if (!(vma->vm_flags & (VM_READ | VM_WRITE)))
goto bad_area;
} else {
if (!(vma->vm_flags & VM_WRITE))
goto bad_area;
}
tbis(address);
handle_mm_fault(vma, address, cause > 0);
return;
......@@ -80,6 +85,8 @@ asmlinkage void do_page_fault(unsigned long address, unsigned long mmcsr, long c
*/
bad_area:
if (user_mode(&regs)) {
printk("memory violation at pc=%08lx (%08lx)\n", regs.pc, address);
die_if_kernel("oops", &regs, cause);
send_sig(SIGSEGV, current, 1);
return;
}
......
......@@ -62,10 +62,10 @@ void show_mem(void)
int i,free = 0,total = 0,reserved = 0;
int shared = 0;
printk("Mem-info:\n");
printk("\nMem-info:\n");
show_free_areas();
printk("Free swap: %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
i = high_memory >> PAGE_SHIFT;
i = MAP_NR(high_memory);
while (i-- > 0) {
total++;
if (mem_map[i] & MAP_PAGE_RESERVED)
......@@ -92,7 +92,7 @@ static void load_PCB(struct thread_struct * pcb)
__asm__ __volatile__(
"stq $30,0(%0)\n\t"
"bis %0,%0,$16\n\t"
".long %1"
"call_pal %1"
: /* no outputs */
: "r" (pcb), "i" (PAL_swpctx)
: "$0", "$1", "$16", "$22", "$23", "$24", "$25");
......@@ -137,6 +137,8 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
newptbr = ((unsigned long) swapper_pg_dir - PAGE_OFFSET) >> PAGE_SHIFT;
pgd_val(swapper_pg_dir[1023]) = (newptbr << 32) | pgprot_val(PAGE_KERNEL);
init_task.tss.ptbr = newptbr;
init_task.tss.flags = 1;
init_task.kernel_stack_page = INIT_STACK;
load_PCB(&init_task.tss);
invalidate_all();
......@@ -183,7 +185,7 @@ void si_meminfo(struct sysinfo *val)
{
int i;
i = high_memory >> PAGE_SHIFT;
i = MAP_NR(high_memory);
val->totalram = 0;
val->sharedram = 0;
val->freeram = nr_free_pages << PAGE_SHIFT;
......
......@@ -24,9 +24,9 @@ fi
bool 'XT harddisk support' CONFIG_BLK_DEV_XD n
bool 'Networking support' CONFIG_NET y
bool 'Limit memory to low 16MB' CONFIG_MAX_16M n
bool 'PCI bios support' CONFIG_PCI n
bool 'PCI bios support' CONFIG_PCI y
if [ "$CONFIG_PCI" = "y" ]; then
bool ' PCI bridge optimisation (experimental)' CONFIG_PCI_OPTIMIZE n
bool ' PCI bridge optimisation (experimental)' CONFIG_PCI_OPTIMIZE y
fi
bool 'System V IPC' CONFIG_SYSVIPC y
bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF y
......@@ -42,24 +42,33 @@ if [ "$CONFIG_NET" = "y" ]; then
comment 'Networking options'
bool 'TCP/IP networking' CONFIG_INET y
if [ "$CONFIG_INET" = "y" ]; then
bool 'IP forwarding/gatewaying' CONFIG_IP_FORWARD n
bool 'IP multicasting' CONFIG_IP_MULTICAST n
bool 'IP firewalling' CONFIG_IP_FIREWALL n
bool 'IP accounting' CONFIG_IP_ACCT n
bool 'IP: forwarding/gatewaying' CONFIG_IP_FORWARD n
bool 'IP: multicasting' CONFIG_IP_MULTICAST n
bool 'IP: firewalling' CONFIG_IP_FIREWALL n
bool 'IP: accounting' CONFIG_IP_ACCT n
bool 'IP: tunneling' CONFIG_NET_IPIP n
if [ "$CONFIG_IP_FORWARD" = "y" -a "$CONFIG_IP_FIREWALL" = "y" ]; then
bool 'IP: firewall packet logging' CONFIG_IP_FIREWALL_VERBOSE y
bool 'IP: masquerading (ALPHA)' CONFIG_IP_MASQUERADE n
fi
comment '(it is safe to leave these untouched)'
bool 'PC/TCP compatibility mode' CONFIG_INET_PCTCP n
bool 'Reverse ARP' CONFIG_INET_RARP n
bool 'Assume subnets are local' CONFIG_INET_SNARL y
bool 'Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF n
bool 'IP: PC/TCP compatibility mode' CONFIG_INET_PCTCP n
bool 'IP: Reverse ARP' CONFIG_INET_RARP n
bool 'IP: Assume subnets are local' CONFIG_INET_SNARL y
bool 'IP: Disable NAGLE algorithm (normally enabled)' CONFIG_TCP_NAGLE_OFF n
bool 'IP: Drop source routed frames' CONFIG_IP_NOSR y
fi
bool 'The IPX protocol' CONFIG_IPX n
#bool 'Appletalk DDP' CONFIG_ATALK n
#bool 'Amateur Radio AX.25 Level 2' CONFIG_AX25 n
bool 'Appletalk DDP' CONFIG_ATALK n
bool 'Amateur Radio AX.25 Level 2' CONFIG_AX25 n
if [ "$CONFIG_AX25" = "y" ]; then
bool 'Amateur Radio NET/ROM' CONFIG_NETROM n
fi
fi
comment 'SCSI support'
bool 'SCSI support?' CONFIG_SCSI n
bool 'SCSI support?' CONFIG_SCSI y
if [ "$CONFIG_SCSI" = "n" ]; then
......@@ -71,7 +80,7 @@ comment 'SCSI support type (disk, tape, CDrom)'
bool 'SCSI disk support' CONFIG_BLK_DEV_SD y
bool 'SCSI tape support' CONFIG_CHR_DEV_ST n
bool 'SCSI CDROM support' CONFIG_BLK_DEV_SR n
bool 'SCSI CDROM support' CONFIG_BLK_DEV_SR y
bool 'SCSI generic support' CONFIG_CHR_DEV_SG n
comment 'Some SCSI devices (e.g. CD jukebox) support multiple LUNs'
......@@ -80,9 +89,9 @@ bool 'Probe all LUNs on each SCSI device' CONFIG_SCSI_MULTI_LUN n
comment 'SCSI low-level drivers'
bool 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X n
bool 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 y
bool 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 n
bool 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X y
bool 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 n
bool 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 y
bool 'Adaptec AHA274X/284X support' CONFIG_SCSI_AHA274X n
bool 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC n
bool 'EATA-DMA (DPT,NEC&ATT for ISA,EISA,PCI) support' CONFIG_SCSI_EATA_DMA n
......@@ -119,10 +128,16 @@ bool 'SLIP (serial line) support' CONFIG_SLIP n
if [ "$CONFIG_SLIP" = "y" ]; then
bool ' CSLIP compressed headers' CONFIG_SLIP_COMPRESSED y
bool ' 16 channels instead of 4' SL_SLIP_LOTS n
# bool ' SLIP debugging on' SL_DUMP y
fi
bool 'PPP (point-to-point) support' CONFIG_PPP n
if [ "$CONFIG_PPP" = "y" ]; then
bool ' 16 channels instead of 4' CONFIG_PPP_LOTS n
fi
if [ "$CONFIG_AX25" = "y" ]; then
bool 'Z8530 SCC kiss emulation driver for AX.25' CONFIG_SCC y
fi
bool 'PLIP (parallel port) support' CONFIG_PLIP n
bool 'EQL (serial line load balancing) support' CONFIG_EQUALIZER n
bool 'Do you want to be offered ALPHA test drivers' CONFIG_NET_ALPHA n
bool 'Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC n
if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then
......@@ -142,11 +157,11 @@ if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then
fi
bool 'Other ISA cards' CONFIG_NET_ISA n
if [ "$CONFIG_NET_ISA" = "y" ]; then
bool 'Arcnet support' CONFIG_ARCNET n
bool 'Cabletron E21xx support' CONFIG_E2100 n
bool 'DEPCA support' CONFIG_DEPCA n
bool 'EtherWorks 3 support' CONFIG_EWRK3 n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
bool 'Arcnet support' CONFIG_ARCNET n
bool 'AT1700 support' CONFIG_AT1700 n
# bool 'EtherExpressPro support' CONFIG_EEXPRESS_PRO n
bool 'EtherExpress support' CONFIG_EEXPRESS n
......@@ -157,6 +172,9 @@ if [ "$CONFIG_NET_ISA" = "y" ]; then
bool 'HP PCLAN+ (27247B and 27252A) support' CONFIG_HPLAN_PLUS n
bool 'HP PCLAN (27245 and other 27xxx series) support' CONFIG_HPLAN n
bool 'NE2000/NE1000 support' CONFIG_NE2000 y
if [ "$CONFIG_AX25" = "y" ]; then
bool 'Ottawa PI and PI/2 support' CONFIG_PI y
fi
bool 'SK_G16 support' CONFIG_SK_G16 n
fi
bool 'EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA n
......@@ -180,6 +198,10 @@ if [ "$CONFIG_NET_POCKET" = "y" ]; then
# bool 'WaveLAN PCMCIA support' CONFIG_WaveLAN n
# bool '3 Com 3c589 PCMCIA support' CONFIG_3C589 n
fi
bool 'Token Ring driver support' CONFIG_TR n
if [ "$CONFIG_TR" = "y" ]; then
bool 'IBM Tropic chipset based adaptor support' CONFIG_IBMTR y
fi
fi
fi
......@@ -208,7 +230,8 @@ bool 'Second extended fs support' CONFIG_EXT2_FS y
bool 'xiafs filesystem support' CONFIG_XIA_FS n
bool 'msdos fs support' CONFIG_MSDOS_FS y
if [ "$CONFIG_MSDOS_FS" = "y" ]; then
bool 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n
#bool 'umsdos: Unix like fs on top of std MSDOS FAT fs' CONFIG_UMSDOS_FS n
comment 'Umsdos is not supported in 1.3.0: wait for 1.3.1'
fi
bool '/proc filesystem support' CONFIG_PROC_FS y
if [ "$CONFIG_INET" = "y" ]; then
......@@ -262,7 +285,7 @@ bool 'Sound card support' CONFIG_SOUND n
comment 'Kernel hacking'
#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC n
bool 'Kernel profiling support' CONFIG_PROFILE n
bool 'Kernel profiling support' CONFIG_PROFILE y
if [ "$CONFIG_PROFILE" = "y" ]; then
int ' Profile shift count' CONFIG_PROFILE_SHIFT 2
fi
......
This diff is collapsed.
......@@ -482,14 +482,14 @@ _sys_call_table:
.long _sys_settimeofday
.long _sys_getgroups /* 80 */
.long _sys_setgroups
.long _sys_select
.long _old_select
.long _sys_symlink
.long _sys_lstat
.long _sys_readlink /* 85 */
.long _sys_uselib
.long _sys_swapon
.long _sys_reboot
.long _sys_readdir
.long _old_readdir
.long _sys_mmap /* 90 */
.long _sys_munmap
.long _sys_truncate
......@@ -541,4 +541,7 @@ _sys_call_table:
.long _sys_setfsuid
.long _sys_setfsgid
.long _sys_llseek /* 140 */
.long _sys_getdents
.long _sys_select
.long _sys_flock
.space (NR_syscalls-140)*4
......@@ -9,7 +9,7 @@
*/
.text
.globl _idt,_gdt,
.globl _idt,_gdt,_stext,__stext
.globl _swapper_pg_dir,_pg0
.globl _empty_bad_page
.globl _empty_bad_page_table
......@@ -30,6 +30,8 @@
* swapper_pg_dir is the main page directory, address 0x00001000 (or at
* address 0x00101000 for a compressed boot).
*/
_stext:
__stext:
startup_32:
cld
movl $(KERNEL_DS),%eax
......
......@@ -39,6 +39,22 @@ void enable_hlt(void)
hlt_counter--;
}
asmlinkage int sys_pipe(unsigned long * fildes)
{
int fd[2];
int error;
error = verify_area(VERIFY_WRITE,fildes,8);
if (error)
return error;
error = do_pipe(fd);
if (error)
return error;
put_fs_long(fd[0],0+fildes);
put_fs_long(fd[1],1+fildes);
return 0;
}
/*
* The idle loop on a i386..
*/
......
......@@ -21,6 +21,7 @@
#include <linux/a.out.h>
#include <linux/tty.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <asm/segment.h>
#include <asm/system.h>
......@@ -132,3 +133,49 @@ void setup_arch(char **cmdline_p,
request_region(0xf0,0x2,"npu");
request_region(0xf8,0x8,"npu");
}
int get_cpuinfo(char * buffer)
{
char *model[2][9]={{"DX","SX","DX/2","4","SX/2","6",
"DX/2-WB","DX/4"},
{"Pentium 60/66","Pentium 90/100","3",
"4","5","6","7","8"}};
char mask[2];
mask[0] = x86_mask+'@';
mask[1] = '\0';
return sprintf(buffer,"cpu\t\t: %c86\n"
"model\t\t: %s\n"
"mask\t\t: %s\n"
"vid\t\t: %s\n"
"fdiv_bug\t: %s\n"
"math\t\t: %s\n"
"hlt\t\t: %s\n"
"wp\t\t: %s\n"
"Integrated NPU\t: %s\n"
"Enhanced VM86\t: %s\n"
"IO Breakpoints\t: %s\n"
"4MB Pages\t: %s\n"
"TS Counters\t: %s\n"
"Pentium MSR\t: %s\n"
"Mach. Ch. Exep.\t: %s\n"
"CMPXCHGB8B\t: %s\n"
"BogoMips\t: %lu.%02lu\n",
x86+'0',
x86_model ? model[x86-4][x86_model-1] : "Unknown",
x86_mask ? mask : "Unknown",
x86_vendor_id,
fdiv_bug ? "yes" : "no",
hard_math ? "yes" : "no",
hlt_works_ok ? "yes" : "no",
wp_works_ok ? "yes" : "no",
x86_capability & 1 ? "yes" : "no",
x86_capability & 2 ? "yes" : "no",
x86_capability & 4 ? "yes" : "no",
x86_capability & 8 ? "yes" : "no",
x86_capability & 16 ? "yes" : "no",
x86_capability & 32 ? "yes" : "no",
x86_capability & 128 ? "yes" : "no",
x86_capability & 256 ? "yes" : "no",
loops_per_sec/500000, (loops_per_sec/5000) % 100
);
}
......@@ -200,7 +200,7 @@ asmlinkage int do_signal(unsigned long oldmask, struct pt_regs * regs)
continue;
case SIGQUIT: case SIGILL: case SIGTRAP:
case SIGIOT: case SIGFPE: case SIGSEGV:
case SIGABRT: case SIGFPE: case SIGSEGV:
if (current->binfmt && current->binfmt->core_dump) {
if (current->binfmt->core_dump(signr, regs))
signr |= 0x80;
......
......@@ -62,18 +62,6 @@ pte_t __bad_page(void)
return pte_mkdirty(mk_pte((unsigned long) empty_bad_page, PAGE_SHARED));
}
unsigned long __zero_page(void)
{
extern char empty_zero_page[PAGE_SIZE];
__asm__ __volatile__("cld ; rep ; stosl":
:"a" (0),
"D" ((long) empty_zero_page),
"c" (PAGE_SIZE/4)
:"di","cx");
return (unsigned long) empty_zero_page;
}
void show_mem(void)
{
int i,free = 0,total = 0,reserved = 0;
......@@ -166,6 +154,9 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
end_mem &= PAGE_MASK;
high_memory = end_mem;
/* clear the zero-page */
memset(empty_zero_page, 0, PAGE_SIZE);
/* mark usable pages in the mem_map[] */
start_low_mem = PAGE_ALIGN(start_low_mem);
start_mem = PAGE_ALIGN(start_mem);
......
......@@ -18,6 +18,10 @@
SUBDIRS = block char net #streams
ifdef CONFIG_PCI
SUBDIRS := $(SUBDIRS) pci
endif
ifdef CONFIG_SCSI
SUBDIRS := $(SUBDIRS) scsi
endif
......
This diff is collapsed.
This diff is collapsed.
......@@ -74,6 +74,12 @@ ifdef M
OBJS := $(OBJS) mouse.o
SRCS := $(SRCS) mouse.c
endif
ifdef CONFIG_SCC
OBJS := $(OBJS) scc.o
SRCS := $(SRCS) scc.c
endif
all: char.a
......
This diff is collapsed.
This diff is collapsed.
......@@ -1188,7 +1188,7 @@ unsigned long kbd_init(unsigned long kmem_start)
kb_wait();
outb(0x60,0x64); /* write PS/2 Mode Register */
kb_wait();
outb(0x41,0x60); /* KCC | EKI */
outb(0x65,0x60); /* KCC | DMS | SYS | EKI */
kb_wait();
if (!send_data(0xf0) || !send_data(0x02))
printk("Scanmode 2 change failed\n");
......
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.
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.
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.
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.
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.
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.
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