Commit 97d32f33 authored by Linus Torvalds's avatar Linus Torvalds

Import 1.3.48

parent 7388b7aa
......@@ -9,11 +9,13 @@ Mount options are the same as for msdos partitions.
conv=text (Carriage return, line feed) is replaced with newline.
conv=auto Chooses, file by file, conv=binary or conv=text (by guessing)
There is one mount option unique to HPFS.
There are mount options unique to HPFS.
case=lower Convert file names to lower case. [default]
case=asis Return file names as is, in mixed case.
nocheck Proceed even if "Improperly stopped flag is set"
Case is not significant in filename matching, like real HPFS.
......
VERSION = 1
PATCHLEVEL = 3
SUBLEVEL = 47
SUBLEVEL = 48
ARCH = i386
......@@ -171,11 +171,9 @@ symlinks:
oldconfig: symlinks
$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
xconfig: symlinks scripts/kconfig.tk
wish -f scripts/kconfig.tk
scripts/kconfig.tk:
xconfig: symlinks
$(MAKE) -C scripts kconfig.tk
wish -f scripts/kconfig.tk
config: symlinks
$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
......
......@@ -229,7 +229,7 @@ void start_kernel(void)
envval, sizeof(envval));
if (nbytes > 0) {
envval[nbytes] = '\0';
strcpy((char*)ZERO_PGE, envval);
strcpy((char*)ZERO_PAGE, envval);
}
printk(" Ok\nNow booting the kernel\n");
......
......@@ -40,7 +40,7 @@ CONFIG_ST506=y
#
# CONFIG_BLK_DEV_HD is not set
CONFIG_BLK_DEV_IDE=y
# CONFIG_BLK_DEV_IDECD is not set
# CONFIG_BLK_DEV_IDEATAPI is not set
# CONFIG_BLK_DEV_TRITON is not set
# CONFIG_BLK_DEV_XD is not set
......@@ -48,6 +48,7 @@ CONFIG_BLK_DEV_IDE=y
# Networking options
#
# CONFIG_FIREWALL is not set
# CONFIG_NET_ALIAS is not set
CONFIG_INET=y
# CONFIG_IP_FORWARD is not set
# CONFIG_IP_MULTICAST is not set
......@@ -166,6 +167,7 @@ CONFIG_PSMOUSE=y
# CONFIG_MS_BUSMOUSE is not set
# CONFIG_ATIXL_BUSMOUSE is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_APM is not set
#
# Sound
......
......@@ -427,6 +427,14 @@ static inline void common_fixup(long min_idsel, long max_idsel, long irqs_per_sl
pcibios_write_config_byte(dev->bus->number, dev->devfn,
PCI_INTERRUPT_LINE, dev->irq);
#endif
/*
* if its a VGA, enable its BIOS ROM at C0000
*/
if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) {
pcibios_write_config_dword(dev->bus->number, dev->devfn,
PCI_ROM_ADDRESS,
0x000c0000 | PCI_ROM_ADDRESS_ENABLE);
}
}
if (ide_base) {
enable_ide(ide_base);
......@@ -612,6 +620,14 @@ static inline void avanti_and_noname_fixup(void)
if (pirq < 0) {
continue;
}
/*
* if its a VGA, enable its BIOS ROM at C0000
*/
if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) {
pcibios_write_config_dword(dev->bus->number, dev->devfn,
PCI_ROM_ADDRESS,
0x000c0000 | PCI_ROM_ADDRESS_ENABLE);
}
if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
continue; /* for now, displays get no IRQ */
}
......@@ -620,7 +636,6 @@ static inline void avanti_and_noname_fixup(void)
/* must set the PCI IRQs to level triggered */
/* assume they are all >= 8 */
level_bits |= (1 << (dev->irq - 8));
outb(level_bits, 0x4d1);
#if PCI_MODIFY
/* tell the device: */
......@@ -628,6 +643,10 @@ static inline void avanti_and_noname_fixup(void)
PCI_INTERRUPT_LINE, dev->irq);
#endif
}
/* now, set any level-triggered IRQs */
if (level_bits)
outb(level_bits, 0x4d1);
#if PCI_MODIFY
{
......
......@@ -24,6 +24,7 @@
#include <linux/config.h> /* CONFIG_ALPHA_LCA etc */
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <asm/system.h>
#include <asm/hwrpb.h>
#include <asm/dma.h>
......@@ -44,7 +45,7 @@ unsigned char aux_device_present = 0xaa;
* initialized, we need to copy things out into a more permanent
* place.
*/
#define PARAM ZERO_PGE
#define PARAM ZERO_PAGE
#define COMMAND_LINE ((char*)(PARAM + 0x0000))
#define COMMAND_LINE_SIZE 256
......
......@@ -20,10 +20,6 @@
#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,
......
......@@ -50,12 +50,6 @@ pte_t __bad_page(void)
return pte_mkdirty(mk_pte((unsigned long) EMPTY_PGE, PAGE_SHARED));
}
unsigned long __zero_page(void)
{
memset((void *) ZERO_PGE, 0, PAGE_SIZE);
return (unsigned long) ZERO_PGE;
}
void show_mem(void)
{
int i,free = 0,total = 0,reserved = 0;
......@@ -131,7 +125,7 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
/* unmap the console stuff: we don't need it, and we don't want it */
/* Also set up the real kernel PCB while we're at it.. */
memset((void *) ZERO_PGE, 0, PAGE_SIZE);
memset((void *) ZERO_PAGE, 0, PAGE_SIZE);
memset(swapper_pg_dir, 0, PAGE_SIZE);
newptbr = ((unsigned long) swapper_pg_dir - PAGE_OFFSET) >> PAGE_SHIFT;
pgd_val(swapper_pg_dir[1023]) = (newptbr << 32) | pgprot_val(PAGE_KERNEL);
......
......@@ -7,7 +7,7 @@
HEAD = head.o
SYSTEM = $(TOPDIR)/vmlinux
OBJECTS = $(HEAD) inflate.o unzip.o misc.o
OBJECTS = $(HEAD) misc.o
CFLAGS = -O2 -DSTDC_HEADERS
......
#
# linux/arch/i386/boot/compressed/Makefile
#
# create a compressed vmlinux image from the original vmlinux
#
OBJECTS = misc.o
CFLAGS = -g -O2 -DSTDC_HEADERS -DSTANDALONE_DEBUG -Wall
test-gzip: piggy.o $(OBJECTS)
$(CC) -g -o test-gzip $(OBJECTS) piggy.o
clean:
$(RM) inflate.o misc.o test-gzip
inflate.o: inflate.c gzip.h
misc.o: misc.c gzip.h
/* crypt.h (dummy version) -- do not perform encryption
* Hardly worth copyrighting :-)
*/
#ifdef CRYPT
# undef CRYPT /* dummy version */
#endif
#define RAND_HEAD_LEN 12 /* length of encryption random header */
#define zencode
#define zdecode
/* gzip.h -- common declarations for all gzip modules
* Copyright (C) 1992-1993 Jean-loup Gailly.
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License, see the file COPYING.
*/
#if defined(__STDC__) || defined(PROTO)
# define OF(args) args
#else
# define OF(args) ()
#endif
#ifdef __STDC__
typedef void *voidp;
#else
typedef char *voidp;
#endif
/* I don't like nested includes, but the string functions are used too often */
#if defined(HAVE_STRING_H) || defined(STDC_HEADERS)
# include <string.h>
# define memzero(s, n) memset ((s), 0, (n))
#else
# include <strings.h>
# define strchr index
# define strrchr rindex
# define memcpy(d, s, n) bcopy((s), (d), (n))
# define memcmp(s1, s2, n) bcmp((s1), (s2), (n))
# define memzero(s, n) bzero((s), (n))
#endif
#if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
# include <memory.h>
#endif
#ifndef RETSIGTYPE
# define RETSIGTYPE void
#endif
#define local static
typedef unsigned char uch;
typedef unsigned short ush;
typedef unsigned long ulg;
/* Return codes from gzip */
#define OK 0
#define ERROR 1
#define WARNING 2
/* Compression methods (see algorithm.doc) */
#define STORED 0
#define COMPRESSED 1
#define PACKED 2
/* methods 3 to 7 reserved */
#define DEFLATED 8
extern int method; /* compression method */
/* To save memory for 16 bit systems, some arrays are overlayed between
* the various modules:
* deflate: prev+head window d_buf l_buf outbuf
* unlzw: tab_prefix tab_suffix stack inbuf outbuf
* inflate: window inbuf
* unpack: window inbuf
* For compression, input is done in window[]. For decompression, output
* is done in window except for unlzw.
*/
#ifndef INBUFSIZ
# define INBUFSIZ 0x8000 /* input buffer size */
#endif
#define INBUF_EXTRA 64 /* required by unlzw() */
#ifndef OUTBUFSIZ
# define OUTBUFSIZ 16384 /* output buffer size */
#endif
#define OUTBUF_EXTRA 2048 /* required by unlzw() */
#define DIST_BUFSIZE 0x8000 /* buffer for distances, see trees.c */
#ifdef DYN_ALLOC
# define EXTERN(type, array) extern type * near array
# define DECLARE(type, array, size) type * near array
# define ALLOC(type, array, size) { \
array = (type*)fcalloc((unsigned)(((size)+1L)/2), 2*sizeof(type)); \
if (array == NULL) error("insufficient memory"); \
}
# define FREE(array) {if (array != NULL) fcfree(array), array=NULL;}
#else
# define EXTERN(type, array) extern type array[]
# define DECLARE(type, array, size) type array[size]
# define ALLOC(type, array, size)
# define FREE(array)
#endif
EXTERN(uch, inbuf); /* input buffer */
EXTERN(uch, outbuf); /* output buffer */
EXTERN(ush, d_buf); /* buffer for distances, see trees.c */
EXTERN(uch, window); /* Sliding window and suffix table (unlzw) */
#define tab_suffix window
#ifndef MAXSEG_64K
# define tab_prefix prev /* hash link (see deflate.c) */
# define head (prev+WSIZE) /* hash head (see deflate.c) */
EXTERN(ush, tab_prefix); /* prefix code (see unlzw.c) */
#else
# define tab_prefix0 prev
# define head tab_prefix1
EXTERN(ush, tab_prefix0); /* prefix for even codes */
EXTERN(ush, tab_prefix1); /* prefix for odd codes */
#endif
extern unsigned insize; /* valid bytes in inbuf */
extern unsigned inptr; /* index of next byte to be processed in inbuf */
extern unsigned outcnt; /* bytes in output buffer */
extern long bytes_in; /* number of input bytes */
extern long bytes_out; /* number of output bytes */
extern long overhead; /* number of bytes in gzip header */
#define isize bytes_in
/* for compatibility with old zip sources (to be cleaned) */
extern int ifd; /* input file descriptor */
extern int ofd; /* output file descriptor */
extern char ifname[]; /* input filename or "stdin" */
extern char ofname[]; /* output filename or "stdout" */
extern ulg time_stamp; /* original time stamp (modification time) */
extern long ifile_size; /* input file size, -1 for devices (debug only) */
extern int exit_code; /* program exit code */
typedef int file_t; /* Do not use stdio */
#define NO_FILE (-1) /* in memory compression */
#define GZIP_MAGIC "\037\213" /* Magic header for gzip files, 1F 8B */
#define OLD_GZIP_MAGIC "\037\236" /* Magic header for gzip 0.5 = freeze 1.x */
#define PKZIP_MAGIC "PK\003\004" /* Magic header for pkzip files */
#define PACK_MAGIC "\037\036" /* Magic header for packed files */
/* gzip flag byte */
#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
#define COMMENT 0x10 /* bit 4 set: file comment present */
#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
#define RESERVED 0xC0 /* bit 6,7: reserved */
/* internal file attribute */
#define UNKNOWN (-1)
#define BINARY 0
#define ASCII 1
#ifndef WSIZE
# define WSIZE 0x8000 /* window size--must be a power of two, and */
#endif /* at least 32K for zip's deflate method */
#define MIN_MATCH 3
#define MAX_MATCH 258
/* The minimum and maximum match lengths */
#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
/* Minimum amount of lookahead, except at the end of the input file.
* See deflate.c for comments about the MIN_MATCH+1.
*/
#define MAX_DIST (WSIZE-MIN_LOOKAHEAD)
/* In order to simplify the code, particularly on 16 bit machines, match
* distances are limited to MAX_DIST instead of WSIZE.
*/
extern int decrypt; /* flag to turn on decryption */
extern int save_orig_name; /* set if original name must be saved */
extern int verbose; /* be verbose (-v) */
extern int level; /* compression level */
extern int test; /* check .z file integrity */
extern int to_stdout; /* output to stdout (-c) */
#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf())
/* put_byte is used for the compressed output, put_char for the
* uncompressed output. However unlzw() uses window for its
* suffix table instead of its output buffer, so it does not use put_char.
* (to be cleaned up).
*/
#define put_byte(c) {outbuf[outcnt++]=(uch)(c); if (outcnt==OUTBUFSIZ)\
flush_outbuf();}
#define put_char(c) {window[outcnt++]=(uch)(c); if (outcnt==WSIZE)\
flush_window();}
/* Output a 16 bit value, lsb first */
#define put_short(w) \
{ if (outcnt < OUTBUFSIZ-2) { \
outbuf[outcnt++] = (uch) ((w) & 0xff); \
outbuf[outcnt++] = (uch) ((ush)(w) >> 8); \
} else { \
put_byte((uch)((w) & 0xff)); \
put_byte((uch)((ush)(w) >> 8)); \
} \
}
/* Output a 32 bit value to the bit stream, lsb first */
#define put_long(n) { \
put_short((n) & 0xffff); \
put_short(((ulg)(n)) >> 16); \
}
#define seekable() 0 /* force sequential output */
#define translate_eol 0 /* no option -a yet */
#define tolow(c) (isupper(c) ? (c)-'A'+'a' : (c)) /* force to lower case */
/* Macros for getting two-byte and four-byte header values */
#define SH(p) ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8))
#define LG(p) ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16))
/* Diagnostic functions */
#ifdef DEBUG
# define Assert(cond,msg) {if(!(cond)) error(msg);}
# define Trace(x) fprintf x
# define Tracev(x) {if (verbose) fprintf x ;}
# define Tracevv(x) {if (verbose>1) fprintf x ;}
# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
#else
# define Assert(cond,msg)
# define Trace(x)
# define Tracev(x)
# define Tracevv(x)
# define Tracec(c,x)
# define Tracecv(c,x)
#endif
/* in zip.c: */
extern void zip OF((int in, int out));
extern int file_read OF((char *buf, unsigned size));
/* in unzip.c */
extern void unzip OF((int in, int out));
extern int check_zipfile OF((int in));
/* in unpack.c */
extern void unpack OF((int in, int out));
/* in gzip.c */
RETSIGTYPE abort_gzip OF((void));
/* in deflate.c */
void lm_init OF((int pack_level, ush *flags));
ulg deflate OF((void));
/* in trees.c */
void ct_init OF((ush *attr, int *method));
int ct_tally OF((int dist, int lc));
ulg flush_block OF((char *buf, ulg stored_len, int eof));
/* in bits.c */
void bi_init OF((file_t zipfile));
void send_bits OF((int value, int length));
unsigned bi_reverse OF((unsigned value, int length));
void bi_windup OF((void));
void copy_block OF((char *buf, unsigned len, int header));
extern int (*read_buf) OF((char *buf, unsigned size));
/* in util.c: */
extern ulg updcrc OF((uch *s, unsigned n));
extern void clear_bufs OF((void));
extern int fill_inbuf OF((void));
extern void flush_outbuf OF((void));
extern void flush_window OF((void));
extern char *strlwr OF((char *s));
extern char *basename OF((char *fname));
extern char *add_envopt OF((int *argcp, char ***argvp, char *env));
extern void error OF((char *m));
extern void warn OF((char *a, char *b));
extern void read_error OF((void));
extern void write_error OF((void));
extern void display_ratio OF((long num, long den));
extern voidp xmalloc OF((unsigned int size));
/* in inflate.c */
extern int inflate OF((void));
/* lzw.h -- define the lzw functions.
* Copyright (C) 1992-1993 Jean-loup Gailly.
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License, see the file COPYING.
*/
#if !defined(OF) && defined(lint)
# include "gzip.h"
#endif
#ifndef BITS
# define BITS 16
#endif
#define INIT_BITS 9 /* Initial number of bits per code */
#define LZW_MAGIC "\037\235" /* Magic header for lzw files, 1F 9D */
#define BIT_MASK 0x1f /* Mask for 'number of compression bits' */
/* Mask 0x20 is reserved to mean a fourth header byte, and 0x40 is free.
* It's a pity that old uncompress does not check bit 0x20. That makes
* extension of the format actually undesirable because old compress
* would just crash on the new format instead of giving a meaningful
* error message. It does check the number of bits, but it's more
* helpful to say "unsupported format, get a new version" than
* "can only handle 16 bits".
*/
#define BLOCK_MODE 0x80
/* Block compression: if table is full and compression rate is dropping,
* clear the dictionary.
*/
#define LZW_RESERVED 0x60 /* reserved bits */
#define CLEAR 256 /* flush the dictionary */
#define FIRST (CLEAR+1) /* first free entry */
extern int maxbits; /* max bits per code for LZW */
extern int block_mode; /* block compress mode -C compatible with 2.0 */
extern void lzw OF((int in, int out));
extern void unlzw OF((int in, int out));
This diff is collapsed.
/* unzip.c -- decompress files in gzip or pkzip format.
* Copyright (C) 1992-1993 Jean-loup Gailly
*
* Adapted for Linux booting by Hannu Savolainen 1993
*
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License, see the file COPYING.
*
* The code in this file is derived from the file funzip.c written
* and put in the public domain by Mark Adler.
*/
/*
This version can extract files in gzip or pkzip format.
For the latter, only the first entry is extracted, and it has to be
either deflated or stored.
*/
#ifndef lint
static char rcsid[] = "$Id: unzip.c,v 0.9 1993/02/10 16:07:22 jloup Exp $";
#endif
#include "gzip.h"
#include "crypt.h"
#include <stdio.h>
/* PKZIP header definitions */
#define LOCSIG 0x04034b50L /* four-byte lead-in (lsb first) */
#define LOCFLG 6 /* offset of bit flag */
#define CRPFLG 1 /* bit for encrypted entry */
#define EXTFLG 8 /* bit for extended local header */
#define LOCHOW 8 /* offset of compression method */
#define LOCTIM 10 /* file mod time (for decryption) */
#define LOCCRC 14 /* offset of crc */
#define LOCSIZ 18 /* offset of compressed size */
#define LOCLEN 22 /* offset of uncompressed length */
#define LOCFIL 26 /* offset of file name field length */
#define LOCEXT 28 /* offset of extra field length */
#define LOCHDR 30 /* size of local header, including sig */
#define EXTHDR 16 /* size of extended local header, inc sig */
/* Globals */
int decrypt; /* flag to turn on decryption */
char *key; /* not used--needed to link crypt.c */
int pkzip = 0; /* set for a pkzip file */
int extended = 0; /* set if extended local header */
/* ===========================================================================
* Check zip file and advance inptr to the start of the compressed data.
* Get ofname from the local header if necessary.
*/
int check_zipfile(in)
int in; /* input file descriptors */
{
uch *h = inbuf + inptr; /* first local header */
/* ifd = in; */
/* Check validity of local header, and skip name and extra fields */
inptr += LOCHDR + SH(h + LOCFIL) + SH(h + LOCEXT);
if (inptr > insize || LG(h) != LOCSIG) {
error("input not a zip");
}
method = h[LOCHOW];
if (method != STORED && method != DEFLATED) {
error("first entry not deflated or stored--can't extract");
}
/* If entry encrypted, decrypt and validate encryption header */
if ((decrypt = h[LOCFLG] & CRPFLG) != 0) {
error("encrypted file\n");
exit_code = ERROR;
return -1;
}
/* Save flags for unzip() */
extended = (h[LOCFLG] & EXTFLG) != 0;
pkzip = 1;
/* Get ofname and time stamp from local header (to be done) */
return 0;
}
/* ===========================================================================
* Unzip in to out. This routine works on both gzip and pkzip files.
*
* IN assertions: the buffer inbuf contains already the beginning of
* the compressed data, from offsets inptr to insize-1 included.
* The magic header has already been checked. The output buffer is cleared.
*/
void unzip(in, out)
int in, out; /* input and output file descriptors */
{
ulg orig_crc = 0; /* original crc */
ulg orig_len = 0; /* original uncompressed length */
int n;
uch buf[EXTHDR]; /* extended local header */
/* ifd = in;
ofd = out; */
updcrc(NULL, 0); /* initialize crc */
if (pkzip && !extended) { /* crc and length at the end otherwise */
orig_crc = LG(inbuf + LOCCRC);
orig_len = LG(inbuf + LOCLEN);
}
/* Decompress */
if (method == DEFLATED) {
int res = inflate();
if (res == 3) {
error("out of memory");
} else if (res != 0) {
error("invalid compressed format");
}
} else if (pkzip && method == STORED) {
register ulg n = LG(inbuf + LOCLEN);
if (n != LG(inbuf + LOCSIZ) - (decrypt ? RAND_HEAD_LEN : 0)) {
error("length mismatch");
}
while (n--) {
uch c = (uch)get_byte();
#ifdef CRYPT
if (decrypt) zdecode(c);
#endif
if (!test) put_char(c);
}
} else {
error("internal error, invalid method");
}
/* Get the crc and original length */
if (!pkzip) {
/* crc32 (see algorithm.doc)
* uncompressed input size modulo 2^32
*/
for (n = 0; n < 8; n++) {
buf[n] = (uch)get_byte(); /* may cause an error if EOF */
}
orig_crc = LG(buf);
orig_len = LG(buf+4);
} else if (extended) { /* If extended header, check it */
/* signature - 4bytes: 0x50 0x4b 0x07 0x08
* CRC-32 value
* compressed size 4-bytes
* uncompressed size 4-bytes
*/
for (n = 0; n < EXTHDR; n++) {
buf[n] = (uch)get_byte(); /* may cause an error if EOF */
}
orig_crc = LG(buf+4);
orig_len = LG(buf+12);
}
/* Validate decompression */
if (orig_crc != updcrc(outbuf, 0)) {
error("crc error");
}
if (orig_len != bytes_out) {
error("length error");
}
/* Check if there are more entries in a pkzip file */
if (pkzip && inptr + 4 < insize && LG(inbuf+inptr) == LOCSIG) {
error("zip file has more than one entry");
}
extended = pkzip = 0; /* for next file */
}
......@@ -62,7 +62,9 @@ struct apm_bios_info apm_bios_info;
#endif
unsigned char aux_device_present;
extern int ramdisk_size;
extern int rd_doload; /* 1 = load ramdisk, 0 = don't load */
extern int rd_prompt; /* 1 = prompt for ramdisk, 0 = don't prompt */
extern int rd_image_start; /* starting block # of image */
extern int root_mountflags;
extern int _etext, _edata, _end;
......@@ -79,12 +81,16 @@ extern char empty_zero_page[PAGE_SIZE];
#define DRIVE_INFO (*(struct drive_info_struct *) (PARAM+0x80))
#define SCREEN_INFO (*(struct screen_info *) (PARAM+0))
#define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2))
#define RAMDISK_SIZE (*(unsigned short *) (PARAM+0x1F8))
#define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8))
#define ORIG_ROOT_DEV (*(unsigned short *) (PARAM+0x1FC))
#define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF))
#define COMMAND_LINE ((char *) (PARAM+2048))
#define COMMAND_LINE_SIZE 256
#define RAMDISK_IMAGE_START_MASK 0x07FF
#define RAMDISK_PROMPT_FLAG 0x8000
#define RAMDISK_LOAD_FLAG 0x4000
static char command_line[COMMAND_LINE_SIZE] = { 0, };
void setup_arch(char **cmdline_p,
......@@ -110,7 +116,9 @@ void setup_arch(char **cmdline_p,
aux_device_present = AUX_DEVICE_INFO;
memory_end = (1<<20) + (EXT_MEM_K<<10);
memory_end &= PAGE_MASK;
ramdisk_size = RAMDISK_SIZE;
rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0);
rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0);
#ifdef CONFIG_MAX_16M
if (memory_end > 16*1024*1024)
memory_end = 16*1024*1024;
......
......@@ -10,38 +10,84 @@
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1994, 1995 by Waldorf Electronics,
# written by Ralf Baechle
# Copyright (C) 1994, 1995 by Ralf Baechle
#
AS = mips-linux-as
#ASFLAGS = -mips3 -mcpu=r4000
LD = mips-linux-ld
LINKFLAGS = -Ttext 0xa0000000
ifdef CONFIG_CPU_LITTLE_ENDIAN
prefix = mipsel-
oformat = a.out-mips-little-linux
else
prefix = mips-
oformat = a.out-mips-big-linux
endif
ifdef CONFIG_EXTRA_ELF_COMPILER
prefix := $(prefix)linuxelf-
else
prefix := $(prefix)linux-
endif
AS = $(prefix)as
LD = $(prefix)ld
LINKFLAGS = -N -Ttext 0x80000000
#LINKFLAGS = -oformat=$(oformat) -N -Ttext 0x80000000
#HOSTCC = gcc
#
# KERNELBASE is quite useless, but I need it to work
# around a hardware bug in my Wreckstation board. Other people
# would burn that @#!%# thing...
#
CC = mips-linux-gcc -V 2.5.8 -D__KERNEL__ -I$(TOPDIR)/include
CC = $(prefix)gcc -D__KERNEL__ -I$(TOPDIR)/include
CPP = $(CC) -E $(CFLAGS)
AR = mips-linux-ar
RANLIB = mips-linux-ranlib
STRIP = mips-linux-strip
AR = $(prefix)ar
RANLIB = $(prefix)ranlib
OBJCOPY = $(prefix)objcopy
OBJDUMP = $(prefix)objdump
STRIP = $(prefix)strip
NM = $(prefix)nm
CFLAGS := $(CFLAGS) #-pipe
#
# The new ELF GCC uses -G0 -mabicalls -fpic as default. We don't need PIC
# code in the kernel since it only slows down the whole thing. For the
# old GCC these options are just the defaults. At some point we might
# make use of global pointer optimizations.
#
ifdef CONFIG_ELF_KERNEL
CFLAGS := $(CFLAGS) -G0 -mno-abicalls -fno-pic
LINKFLAGS += -T arch/mips/ld.script
endif
CFLAGS := $(CFLAGS) -DKERNELBASE=0xa0000000
ifdef CONFIG_REMOTE_DEBUG
CFLAGS := $(CFLAGS) -g
endif
ifdef CONFIG_R4X00
CFLAGS := $(CFLAGS) -Wa,-mips3 -mcpu=r4000 -D__R4000__
ifdef CONFIG_CPU_R3000
CFLAGS := $(CFLAGS) -mcpu=r3000 -mips1
#ASFLAGS := $(ASFLAGS) -mcpu=r3000 -mips1
endif
ifdef CONFIG_CPU_R6000
CFLAGS := $(CFLAGS) -mcpu=r6000 -mips2
#ASFLAGS := $(ASFLAGS) -mcpu=r6000 -mips2
endif
ifdef CONFIG_CPU_R4X00
CFLAGS := $(CFLAGS) -D__R4000__ -mcpu=r4400 -mips2
#ASFLAGS := $(ASFLAGS) -mcpu=r4400 -mips2
endif
ifdef CONFIG_CPU_R4600
CFLAGS := $(CFLAGS) -D__R4000__ -mcpu=r4600 -mips2
#ASFLAGS := $(ASFLAGS) -mcpu=r4600 -mips2
endif
ifdef CONFIG_CPU_R8000
CFLAGS := $(CFLAGS) -D__R4000__ -mcpu=r8000 -mips2
#ASFLAGS := $(ASFLAGS) -mcpu=r8000 -mips2
endif
ifdef CONFIG_CPU_R10000
CFLAGS := $(CFLAGS) -D__R4000__ -mcpu=r8000 -mips2
#ASFLAGS := $(ASFLAGS) -mcpu=r8000 -mips2
endif
CFLAGS := $(CFLAGS) -pipe
HEAD := arch/mips/kernel/head.o
SUBDIRS := $(SUBDIRS) arch/mips/kernel arch/mips/mm
SUBDIRS := $(SUBDIRS) arch/mips/kernel arch/mips/mm arch/mips/lib
ARCHIVES := arch/mips/kernel/kernel.o arch/mips/mm/mm.o $(ARCHIVES)
LIBS := arch/mips/lib/lib.a $(LIBS) arch/mips/lib/lib.a
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
......@@ -55,6 +101,7 @@ zdisk: vmlinux
archclean:
@$(MAKEBOOT) clean
$(MAKE) -C arch/$(ARCH)/kernel clean
archdep:
@$(MAKEBOOT) dep
......@@ -5,20 +5,62 @@
# License. See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1995 by Waldorf Electronics,
# written by Ralf Baechle
# Copyright (C) 1995 by Ralf Baechle
#
.S.s:
$(CPP) $(CFLAGS) $< -o $*.s
.S.o:
$(CC) $(CFLAGS) -c $< -o $*.o
OBJS = milo.o a.out.o
#
# Drop some uninteresting sections in the kernel.
# This is only relevant for ELF kernels but doesn't hurt a.out
#
DROP_SECTIONS = .reginfo .mdebug
#
# The new options of binutils 2.6 help to shrink object files alot.
# This is especially usefull for booting from floppy. Though we
# don't yet require everyone to have binutils 2.6 installed.
#
OBJDUMP_VERSION = $(word 4,$(shell $(OBJDUMP) --version))
ifneq ($(OBJDUMP_VERSION),2.5.2)
KEEP = kernel_entry boot_info screen_info _end
STRIP_FLAGS = $(addprefix --keep-symbol=,$(KEEP))
else
STRIP_FLAGS = --discard-all
endif
#
# Fake compressed boot
#
ifdef CONFIG_ELF_KERNEL
zImage: $(CONFIGURE) $(TOPDIR)/vmlinux
cp $(TOPDIR)/vmlinux zImage.tmp
$(STRIP) $(addprefix --remove-section=,$(DROP_SECTIONS)) \
--strip-symbol=blurb zImage.tmp
$(LD) -oformat=$(oformat) -N -e except_vec0 -Ttext=0x80000000 \
-o zImage zImage.tmp
rm -f zImage.tmp
$(STRIP) $(STRIP_FLAGS) zImage
else
zImage: $(CONFIGURE) $(TOPDIR)/vmlinux
ln -fs $(TOPDIR)/vmlinux zImage
cp $(TOPDIR)/vmlinux $@
$(STRIP) $(STRIP_FLAGS) $@
endif
zdisk: zImage
mcopy -n $(TOPDIR)/vmlinux a:vmlinux
mcopy -n zImage a:vmlinux
dep:
$(CPP) -M *.[cS] > .depend
clean:
rm -f zImage
rm -f zImage zImage.tmp
dummy:
include $(TOPDIR)/Rules.make
This diff is collapsed.
#
# Automatically generated make config: don't edit
#
#
# Machine setup
#
CONFIG_ACER_PICA_61=y
# CONFIG_DECSTATION is not set
# CONFIG_DESKSTATION_RPC44 is not set
# CONFIG_DESKSTATION_TYNE is not set
# CONFIG_MIPS_MAGNUM_3000 is not set
# CONFIG_MIPS_MAGNUM_4000 is not set
# CONFIG_OLIVETTI_M700 is not set
CONFIG_MIPS_JAZZ=y
# CONFIG_CPU_R3000 is not set
# CONFIG_CPU_R6000 is not set
CONFIG_CPU_R4X00=y
# CONFIG_CPU_R4600 is not set
# CONFIG_CPU_R8000 is not set
# CONFIG_CPU_R10000 is not set
CONFIG_TLB_SHUTDOWN=y
CONFIG_BINFMT_ELF=y
# CONFIG_ELF_KERNEL is not set
CONFIG_CPU_LITTLE_ENDIAN=y
# CONFIG_NET is not set
# CONFIG_SYSVIPC is not set
#
# Loadable module support
#
# CONFIG_MODVERSIONS is not set
#
# block devices
#
CONFIG_BLK_DEV_FD=y
# CONFIG_ST506 is not set
# CONFIG_BLK_DEV_XD is not set
#
# SCSI support
#
# CONFIG_SCSI is not set
#
# CD-ROM drivers (not for SCSI or IDE/ATAPI drives)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Filesystems
#
# CONFIG_MINIX_FS is not set
# CONFIG_EXT_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_XIA_FS is not set
# CONFIG_MSDOS_FS is not set
CONFIG_PROC_FS=y
# CONFIG_ISO9660_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_SMB_FS is not set
#
# character devices
#
# CONFIG_CYCLADES is not set
# CONFIG_STALDRV is not set
# CONFIG_PRINTER is not set
# CONFIG_BUSMOUSE is not set
# CONFIG_PSMOUSE is not set
# CONFIG_MS_BUSMOUSE is not set
# CONFIG_ATIXL_BUSMOUSE is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_APM is not set
# CONFIG_SERIAL is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# Kernel hacking
#
# CONFIG_PROFILE is not set
#
# Makefile for the linux kernel.
# Makefile for the Linux/MIPS kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now in the main makefile...
.S.s:
$(CPP) $(CFLAGS) -D__ASSEMBLY__ -traditional $< -o $*.s
$(CPP) $(CFLAGS) $< -o $*.s
.S.o:
$(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
$(CC) $(CFLAGS) -c $< -o $*.o
all: kernel.o head.o
EXTRA_ASFLAGS = -mips3 -mcpu=r4000
OBJS = process.o signal.o entry.o traps.o irq.o ptrace.o cache.o resume.o \
ioport.o setup.o bios32.o tynedma.o
O_TARGET := kernel.o
O_OBJS := process.o signal.o entry.o traps.o irq.o ptrace.o vm86.o ioport.o \
setup.o syscall.o sysmips.o time.o bios32.o ipc.o
all: kernel.o head.o
#
# Kernel debugging
#
ifdef CONFIG_REMOTE_DEBUG
OBJS += gdb-low.o gdb-stub.o
endif
#
# Board specific code
#
ifdef CONFIG_MIPS_JAZZ
O_OBJS += jazzdma.o jazz-c.o
endif
ifdef CONFIG_ACER_PICA_61
O_OBJS += pica.o
endif
ifdef CONFIG_DESKSTATION_TYNE
O_OBJS += tyne.o tyne-c.o
endif
cache.o: cache.s
ifdef CONFIG_MIPS_MAGNUM_4000
O_OBJS += magnum4000.o
endif
cache.s: cache.S $(TOPDIR)/include/asm/mipsconfig.h \
$(TOPDIR)/include/asm/regdef.h $(TOPDIR)/include/asm/segment.h
#
# CPU model specific code
#
ifdef CONFIG_CPU_R2000
O_OBJS += r3000.o
endif
entry.o: entry.s
ifdef CONFIG_CPU_R3000
O_OBJS += r3000.o
endif
entry.s: entry.S $(TOPDIR)/include/linux/sys.h \
$(TOPDIR)/include/linux/autoconf.h $(TOPDIR)/include/asm/segment.h \
$(TOPDIR)/include/asm/mipsregs.h $(TOPDIR)/include/asm/mipsconfig.h \
$(TOPDIR)/include/asm/page.h $(TOPDIR)/include/asm/stackframe.h \
$(TOPDIR)/include/asm/regdef.h $(TOPDIR)/include/asm/processor.h
ifdef CONFIG_CPU_R4X00
O_OBJS += r4xx0.o
endif
ifdef CONFIG_CPU_R4600
O_OBJS += r4xx0.o
endif
ifdef CONFIG_CPU_R6000
exit 1 # no detailed informations about CPU yet.
endif
ifdef CONFIG_CPU_R8000
exit 1 # no detailed informations about CPU yet.
endif
ifdef CONFIG_CPU_R10000
O_OBJS += r4xx0.o
endif
#
# Since we add the same object files to O_OBJS for different configurations.
# O_OBJS might contain duplicate files. We correct this by filtering out
# duplicate files. Just to avoid users having to know about all the
# compatibility stuff between various boards and boards.
#
O_OBJS := $(sort $(O_OBJS))
all: kernel.o head.o
head.o: head.s
entry.o: entry.S
head.s: head.S $(TOPDIR)/include/linux/tasks.h
head.o: head.S
resume.o: resume.s
magnum4000.o: magnum4000.S
resume.s: resume.S $(TOPDIR)/include/asm/regdef.h \
$(TOPDIR)/include/asm/processor.h $(TOPDIR)/include/asm/mipsregs.h \
$(TOPDIR)/include/asm/mipsconfig.h
pica.o: pica.S
tlb.o: tlb.s
r4xx0.o: r4xx0.S
tlb.s: tlb.S $(TOPDIR)/include/asm/regdef.h $(TOPDIR)/include/asm/mipsregs.h \
$(TOPDIR)/include/asm/bootinfo.h
tyne.o: tyne.S
kernel.o: $(OBJS)
$(LD) -r -o kernel.o $(OBJS)
sync
clean:
include $(TOPDIR)/Rules.make
/*
* arch/mips/kernel/cache.S
*
* Copyright (C) 1994, 1995 Waldorf Electronics
* Written by Ralf Baechle
*
* Flush instruction/data caches
*
* Parameters: a0 - starting address to flush
* a1 - size of area to be flushed
* a2 - which caches to be flushed
*
* FIXME: - ignores parameters
* - doesn't know about second level caches
* - only knows how to handle the R4600
*/
#include <asm/mipsconfig.h>
#include <asm/regdef.h>
#include <asm/segment.h>
#define PAGE_SIZE 0x1000
#define CACHELINES 512 /* number of cachelines */
.set noreorder
.globl _sys_cacheflush
.text
_sys_cacheflush:
/*
* Writeback/invalidate the data cache
*/
li t0,KSEG0
li t1,CACHELINES
1: cache 1,0(t0)
cache 1,32(t0)
cache 1,64(t0)
cache 1,96(t0)
cache 1,128(t0)
cache 1,160(t0)
cache 1,192(t0)
cache 1,224(t0)
cache 1,256(t0)
cache 1,288(t0)
cache 1,320(t0)
cache 1,352(t0)
cache 1,384(t0)
cache 1,416(t0)
cache 1,448(t0)
cache 1,480(t0)
subu t1,t1,1
bnez t1,1b
addiu t0,t0,512 # delay slot
/*
* Flush the instruction cache
*/
lui t0,0x8000
li t1,CACHELINES
1: cache 0,0(t0)
cache 0,32(t0)
cache 0,64(t0)
cache 0,96(t0)
cache 0,128(t0)
cache 0,160(t0)
cache 0,192(t0)
cache 0,224(t0)
cache 0,256(t0)
cache 0,288(t0)
cache 0,320(t0)
cache 0,352(t0)
cache 0,384(t0)
cache 0,416(t0)
cache 0,448(t0)
cache 0,480(t0)
subu t1,t1,1
bnez t1,1b
addiu t0,t0,512 # delay slot
j ra
nop
This diff is collapsed.
/*
* arch/mips/kernel/gdb-low.S
*
* gdb-low.S contains the low-level trap handler for the GDB stub.
*
* Copyright (C) 1995 Andreas Busse
*/
#include <linux/sys.h>
#include <asm/asm.h>
#include <asm/segment.h>
#include <asm/mipsregs.h>
#include <asm/mipsconfig.h>
#include <asm/stackframe.h>
#include <asm/gdb-stub.h>
/*
* The low level trap handler
*/
.align 5
NESTED(trap_low, GDB_FR_SIZE, sp)
.set noat
.set noreorder
mfc0 k0,CP0_STATUS
sll k0,3 /* extract cu0 bit */
bltz k0,1f
move k1,sp
/*
* Called from user mode, new stack
*/
lui k1,%hi(kernelsp)
lw k1,%lo(kernelsp)(k1)
1: move k0,sp
subu sp,k1,GDB_FR_SIZE
sw k0,GDB_FR_REG29(sp)
sw v0,GDB_FR_REG2(sp)
/*
* first save the CP0 and special registers
*/
mfc0 v0,CP0_STATUS
sw v0,GDB_FR_STATUS(sp)
mfc0 v0,CP0_CAUSE
sw v0,GDB_FR_CAUSE(sp)
mfc0 v0,CP0_EPC
sw v0,GDB_FR_EPC(sp)
mfc0 v0,CP0_BADVADDR
sw v0,GDB_FR_BADVADDR(sp)
mfhi v0
sw v0,GDB_FR_HI(sp)
mflo v0
sw v0,GDB_FR_LO(sp)
/*
* Now the integer registers
*/
sw zero,GDB_FR_REG0(sp) /* I know... */
sw $1,GDB_FR_REG1(sp)
/* v0 already saved */
sw v1,GDB_FR_REG3(sp)
sw a0,GDB_FR_REG4(sp)
sw a1,GDB_FR_REG5(sp)
sw a2,GDB_FR_REG6(sp)
sw a3,GDB_FR_REG7(sp)
sw t0,GDB_FR_REG8(sp)
sw t1,GDB_FR_REG9(sp)
sw t2,GDB_FR_REG10(sp)
sw t3,GDB_FR_REG11(sp)
sw t4,GDB_FR_REG12(sp)
sw t5,GDB_FR_REG13(sp)
sw t6,GDB_FR_REG14(sp)
sw t7,GDB_FR_REG15(sp)
sw s0,GDB_FR_REG16(sp)
sw s1,GDB_FR_REG17(sp)
sw s2,GDB_FR_REG18(sp)
sw s3,GDB_FR_REG19(sp)
sw s4,GDB_FR_REG20(sp)
sw s5,GDB_FR_REG21(sp)
sw s6,GDB_FR_REG22(sp)
sw s7,GDB_FR_REG23(sp)
sw t8,GDB_FR_REG24(sp)
sw t9,GDB_FR_REG25(sp)
sw k0,GDB_FR_REG26(sp)
sw k1,GDB_FR_REG27(sp)
sw gp,GDB_FR_REG28(sp)
/* sp already saved */
sw fp,GDB_FR_REG30(sp)
sw ra,GDB_FR_REG31(sp)
STI /* disable interrupts */
/*
* Followed by the floating point registers
*/
mfc0 v0,CP0_STATUS /* check if the FPU is enabled */
srl v0,v0,16
andi v0,v0,(ST0_CU1 >> 16)
beqz v0,2f /* disabled, skip */
nop
swc1 $0,GDB_FR_FPR0(sp)
swc1 $1,GDB_FR_FPR1(sp)
swc1 $2,GDB_FR_FPR2(sp)
swc1 $3,GDB_FR_FPR3(sp)
swc1 $4,GDB_FR_FPR4(sp)
swc1 $5,GDB_FR_FPR5(sp)
swc1 $6,GDB_FR_FPR6(sp)
swc1 $7,GDB_FR_FPR7(sp)
swc1 $8,GDB_FR_FPR8(sp)
swc1 $9,GDB_FR_FPR9(sp)
swc1 $10,GDB_FR_FPR10(sp)
swc1 $11,GDB_FR_FPR11(sp)
swc1 $12,GDB_FR_FPR12(sp)
swc1 $13,GDB_FR_FPR13(sp)
swc1 $14,GDB_FR_FPR14(sp)
swc1 $15,GDB_FR_FPR15(sp)
swc1 $16,GDB_FR_FPR16(sp)
swc1 $17,GDB_FR_FPR17(sp)
swc1 $18,GDB_FR_FPR18(sp)
swc1 $19,GDB_FR_FPR19(sp)
swc1 $20,GDB_FR_FPR20(sp)
swc1 $21,GDB_FR_FPR21(sp)
swc1 $22,GDB_FR_FPR22(sp)
swc1 $23,GDB_FR_FPR23(sp)
swc1 $24,GDB_FR_FPR24(sp)
swc1 $25,GDB_FR_FPR25(sp)
swc1 $26,GDB_FR_FPR26(sp)
swc1 $27,GDB_FR_FPR27(sp)
swc1 $28,GDB_FR_FPR28(sp)
swc1 $29,GDB_FR_FPR29(sp)
swc1 $30,GDB_FR_FPR30(sp)
swc1 $31,GDB_FR_FPR31(sp)
/*
* FPU control registers
*/
mfc1 v0,CP1_STATUS
sw v0,GDB_FR_FSR(sp)
mfc1 v0,CP1_REVISION
sw v0,GDB_FR_FIR(sp)
/*
* current stack frame ptr
*/
2: sw sp,GDB_FR_FRP(sp)
/*
* CP0 registers (R4000/R4400 unused registers skipped)
*/
mfc0 v0,CP0_INDEX
sw v0,GDB_FR_CP0_INDEX(sp)
mfc0 v0,CP0_RANDOM
sw v0,GDB_FR_CP0_RANDOM(sp)
mfc0 v0,CP0_ENTRYLO0
sw v0,GDB_FR_CP0_ENTRYLO0(sp)
mfc0 v0,CP0_ENTRYLO1
sw v0,GDB_FR_CP0_ENTRYLO1(sp)
mfc0 v0,CP0_PAGEMASK
sw v0,GDB_FR_CP0_PAGEMASK(sp)
mfc0 v0,CP0_WIRED
sw v0,GDB_FR_CP0_WIRED(sp)
mfc0 v0,CP0_ENTRYHI
sw v0,GDB_FR_CP0_ENTRYHI(sp)
mfc0 v0,CP0_PRID
sw v0,GDB_FR_CP0_PRID(sp)
.set at
/*
* continue with the higher level handler
*/
move a0,sp
jal handle_exception
nop
/*
* restore all writable registers, in reverse order
*/
.set noat
lw v0,GDB_FR_CP0_ENTRYHI(sp)
lw v1,GDB_FR_CP0_WIRED(sp)
mtc0 v0,CP0_ENTRYHI
mtc0 v1,CP0_WIRED
lw v0,GDB_FR_CP0_PAGEMASK(sp)
lw v1,GDB_FR_CP0_ENTRYLO1(sp)
mtc0 v0,CP0_PAGEMASK
mtc0 v1,CP0_ENTRYLO1
lw v0,GDB_FR_CP0_ENTRYLO0(sp)
lw v1,GDB_FR_CP0_INDEX(sp)
mtc0 v0,CP0_ENTRYLO0
mtc0 v1,CP0_INDEX
/*
* Next, the floating point registers
*/
mfc0 v0,CP0_STATUS /* check if the FPU is enabled */
srl v0,v0,16
andi v0,v0,(ST0_CU1 >> 16)
beqz v0,3f /* disabled, skip */
nop
lwc1 $31,GDB_FR_FPR31(sp)
lwc1 $30,GDB_FR_FPR30(sp)
lwc1 $29,GDB_FR_FPR29(sp)
lwc1 $28,GDB_FR_FPR28(sp)
lwc1 $27,GDB_FR_FPR27(sp)
lwc1 $26,GDB_FR_FPR26(sp)
lwc1 $25,GDB_FR_FPR25(sp)
lwc1 $24,GDB_FR_FPR24(sp)
lwc1 $23,GDB_FR_FPR23(sp)
lwc1 $22,GDB_FR_FPR22(sp)
lwc1 $21,GDB_FR_FPR21(sp)
lwc1 $20,GDB_FR_FPR20(sp)
lwc1 $19,GDB_FR_FPR19(sp)
lwc1 $18,GDB_FR_FPR18(sp)
lwc1 $17,GDB_FR_FPR17(sp)
lwc1 $16,GDB_FR_FPR16(sp)
lwc1 $15,GDB_FR_FPR15(sp)
lwc1 $14,GDB_FR_FPR14(sp)
lwc1 $13,GDB_FR_FPR13(sp)
lwc1 $12,GDB_FR_FPR12(sp)
lwc1 $11,GDB_FR_FPR11(sp)
lwc1 $10,GDB_FR_FPR10(sp)
lwc1 $9,GDB_FR_FPR9(sp)
lwc1 $8,GDB_FR_FPR8(sp)
lwc1 $7,GDB_FR_FPR7(sp)
lwc1 $6,GDB_FR_FPR6(sp)
lwc1 $5,GDB_FR_FPR5(sp)
lwc1 $4,GDB_FR_FPR4(sp)
lwc1 $3,GDB_FR_FPR3(sp)
lwc1 $2,GDB_FR_FPR2(sp)
lwc1 $1,GDB_FR_FPR1(sp)
lwc1 $0,GDB_FR_FPR0(sp)
/*
* Now the CP0 and integer registers
*/
3: mfc0 t0,CP0_STATUS
ori t0,0x1f
xori t0,0x1f
mtc0 t0,CP0_STATUS
lw v0,GDB_FR_STATUS(sp)
lw v1,GDB_FR_EPC(sp)
mtc0 v0,CP0_STATUS
mtc0 v1,CP0_EPC
lw v0,GDB_FR_HI(sp)
lw v1,GDB_FR_LO(sp)
mthi v0
mtlo v0
lw ra,GDB_FR_REG31(sp)
lw fp,GDB_FR_REG30(sp)
lw gp,GDB_FR_REG28(sp)
lw k1,GDB_FR_REG27(sp)
lw k0,GDB_FR_REG26(sp)
lw t9,GDB_FR_REG25(sp)
lw t8,GDB_FR_REG24(sp)
lw s7,GDB_FR_REG23(sp)
lw s6,GDB_FR_REG22(sp)
lw s5,GDB_FR_REG21(sp)
lw s4,GDB_FR_REG20(sp)
lw s3,GDB_FR_REG19(sp)
lw s2,GDB_FR_REG18(sp)
lw s1,GDB_FR_REG17(sp)
lw s0,GDB_FR_REG16(sp)
lw t7,GDB_FR_REG15(sp)
lw t6,GDB_FR_REG14(sp)
lw t5,GDB_FR_REG13(sp)
lw t4,GDB_FR_REG12(sp)
lw t3,GDB_FR_REG11(sp)
lw t2,GDB_FR_REG10(sp)
lw t1,GDB_FR_REG9(sp)
lw t0,GDB_FR_REG8(sp)
lw a3,GDB_FR_REG7(sp)
lw a2,GDB_FR_REG6(sp)
lw a1,GDB_FR_REG5(sp)
lw a0,GDB_FR_REG4(sp)
lw v1,GDB_FR_REG3(sp)
lw v0,GDB_FR_REG2(sp)
lw $1,GDB_FR_REG1(sp)
lw sp,GDB_FR_REG29(sp) /* Deallocate stack */
ERET
.set at
.set reorder
END(trap_low)
/* end of file gdb-low.S */
This diff is collapsed.
This diff is collapsed.
......@@ -7,50 +7,8 @@
#include <linux/types.h>
#include <linux/ioport.h>
#define IOTABLE_SIZE 32
typedef struct resource_entry_t {
u_long from, num;
const char *name;
struct resource_entry_t *next;
} resource_entry_t;
/* Set EXTENT bits starting at BASE in BITMAP to value TURN_ON. */
static void set_bitmap(unsigned long *bitmap, short base, short extent, int new_value)
{
int mask;
unsigned long *bitmap_base = bitmap + (base >> 5);
unsigned short low_index = base & 0x1f;
int length = low_index + extent;
if (low_index != 0) {
mask = (~0 << low_index);
if (length < 32)
mask &= ~(~0 << length);
if (new_value)
*bitmap_base++ |= mask;
else
*bitmap_base++ &= ~mask;
length -= 32;
}
mask = (new_value ? ~0 : 0);
while (length >= 32) {
*bitmap_base++ = mask;
length -= 32;
}
if (length > 0) {
mask = ~(~0 << length);
if (new_value)
*bitmap_base++ |= mask;
else
*bitmap_base++ &= ~mask;
}
}
/*
* this changes the io permissions bitmap in the current task.
* This changes the io permissions bitmap in the current task.
*/
asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
{
......@@ -76,28 +34,3 @@ asmlinkage int sys_iopl(long ebx,long ecx,long edx,
{
return -ENOSYS;
}
/*
* The workhorse function: find where to put a new entry
*/
static resource_entry_t *find_gap(resource_entry_t *root,
u_long from, u_long num)
{
unsigned long flags;
resource_entry_t *p;
if (from > from+num-1)
return NULL;
save_flags(flags);
cli();
for (p = root; ; p = p->next) {
if ((p != root) && (p->from+p->num-1 >= from)) {
p = NULL;
break;
}
if ((p->next == NULL) || (p->next->from > from+num-1))
break;
}
restore_flags(flags);
return p;
}
/*
* linux/arch/mips/kernel/ipc.c
*
* This file contains various random system calls that
* have a non-standard calling sequence on the Linux/i386
* platform.
*/
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/sem.h>
#include <linux/msg.h>
#include <linux/shm.h>
#include <asm/segment.h>
/*
* sys_ipc() is the de-multiplexer for the SysV IPC calls..
*
* This is really horribly ugly; removing this will need some minor
* changes in libc.
*/
asmlinkage int sys_ipc (uint call, int first, int second, int third, void *ptr, long fifth)
{
#ifdef CONFIG_SYSVIPC
int version;
version = call >> 16; /* hack for backward compatibility */
call &= 0xffff;
if (call <= SEMCTL)
switch (call) {
case SEMOP:
return sys_semop (first, (struct sembuf *)ptr, second);
case SEMGET:
return sys_semget (first, second, third);
case SEMCTL: {
union semun fourth;
int err;
if (!ptr)
return -EINVAL;
if ((err = verify_area (VERIFY_READ, ptr, sizeof(long))))
return err;
fourth.__pad = (void *) get_fs_long(ptr);
return sys_semctl (first, second, third, fourth);
}
default:
return -EINVAL;
}
if (call <= MSGCTL)
switch (call) {
case MSGSND:
return sys_msgsnd (first, (struct msgbuf *) ptr,
second, third);
case MSGRCV:
switch (version) {
case 0: {
struct ipc_kludge tmp;
int err;
if (!ptr)
return -EINVAL;
if ((err = verify_area (VERIFY_READ, ptr, sizeof(tmp))))
return err;
memcpy_fromfs (&tmp,(struct ipc_kludge *) ptr,
sizeof (tmp));
return sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp, third);
}
case 1: default:
return sys_msgrcv (first, (struct msgbuf *) ptr, second, fifth, third);
}
case MSGGET:
return sys_msgget ((key_t) first, second);
case MSGCTL:
return sys_msgctl (first, second, (struct msqid_ds *) ptr);
default:
return -EINVAL;
}
if (call <= SHMCTL)
switch (call) {
case SHMAT:
switch (version) {
case 0: default: {
ulong raddr;
int err;
if ((err = verify_area(VERIFY_WRITE, (ulong*) third, sizeof(ulong))))
return err;
err = sys_shmat (first, (char *) ptr, second, &raddr);
if (err)
return err;
put_fs_long (raddr, (ulong *) third);
return 0;
}
case 1: /* iBCS2 emulator entry point */
if (get_fs() != get_ds())
return -EINVAL;
return sys_shmat (first, (char *) ptr, second, (ulong *) third);
}
case SHMDT:
return sys_shmdt ((char *)ptr);
case SHMGET:
return sys_shmget (first, second, third);
case SHMCTL:
return sys_shmctl (first, second, (struct shmid_ds *) ptr);
default:
return -EINVAL;
}
return -EINVAL;
#else /* CONFIG_SYSVIPC */
return -ENOSYS;
#endif /* CONFIG_SYSVIPC */
}
......@@ -16,6 +16,8 @@
*/
/*
* Mips support by Ralf Baechle and Andreas Busse
*
* The Deskstation Tyne is almost completely like an IBM compatible PC with
* another type of microprocessor. Therefore this code is almost completely
* the same. More work needs to be done to support Acer PICA and other
......@@ -27,13 +29,18 @@
#include <linux/kernel_stat.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/timex.h>
#include <linux/random.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/bootinfo.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/bitops.h>
#include <asm/jazz.h>
#include <asm/mipsregs.h>
#include <asm/system.h>
unsigned char cache_21 = 0xff;
unsigned char cache_A1 = 0xff;
......@@ -117,7 +124,7 @@ int get_irq_list(char *buf)
for (i = 0 ; i < 16 ; i++, action++) {
if (!action->handler)
continue;
len += sprintf(buf+len, "%2d: %8d %c %s\n",
len += sprintf(buf+len, "%3d: %8d %c %s\n",
i, kstat.interrupts[i],
(action->flags & SA_INTERRUPT) ? '+' : ' ',
action->name);
......@@ -137,6 +144,8 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
struct irqaction * action = irq + irq_action;
kstat.interrupts[irq]++;
if (action->flags & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
action->handler(irq, regs);
}
......@@ -150,6 +159,8 @@ asmlinkage void do_fast_IRQ(int irq)
struct irqaction * action = irq + irq_action;
kstat.interrupts[irq]++;
if (action->flags & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
action->handler(irq, NULL);
}
......@@ -168,6 +179,8 @@ int request_irq(unsigned int irq, void (*handler)(int, struct pt_regs *),
return -EBUSY;
if (!handler)
return -EINVAL;
if (irqflags & SA_SAMPLE_RANDOM)
rand_initialize_irq(irq);
save_flags(flags);
cli();
action->handler = handler;
......@@ -179,9 +192,9 @@ int request_irq(unsigned int irq, void (*handler)(int, struct pt_regs *),
* FIXME: Does the SA_INTERRUPT flag make any sense on MIPS???
*/
if (action->flags & SA_INTERRUPT)
set_intr_gate(irq,fast_interrupt);
set_int_vector(irq,fast_interrupt);
else
set_intr_gate(irq,interrupt);
set_int_vector(irq,interrupt);
}
if (irq < 8) {
cache_21 &= ~(1<<irq);
......@@ -218,7 +231,7 @@ void free_irq(unsigned int irq)
cache_A1 |= 1 << (irq-8);
outb(cache_A1,0xA1);
}
set_intr_gate(irq,bad_interrupt);
set_int_vector(irq,bad_interrupt);
action->handler = NULL;
action->flags = 0;
action->mask = 0;
......@@ -228,7 +241,7 @@ void free_irq(unsigned int irq)
static void no_action(int cpl, struct pt_regs * regs) { }
unsigned int probe_irq_on (void)
unsigned long probe_irq_on (void)
{
unsigned int i, irqs = 0, irqmask;
unsigned long delay;
......@@ -258,7 +271,7 @@ unsigned int probe_irq_on (void)
return irqs;
}
int probe_irq_off (unsigned int irqs)
int probe_irq_off (unsigned long irqs)
{
unsigned int i, irqmask;
......@@ -284,14 +297,35 @@ void init_IRQ(void)
{
int i;
/* set the clock to 100 Hz */
outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
outb_p(LATCH & 0xff , 0x40); /* LSB */
outb(LATCH >> 8 , 0x40); /* MSB */
switch (boot_info.machtype) {
case MACH_MIPS_MAGNUM_4000:
case MACH_ACER_PICA_61:
r4030_write_reg16(JAZZ_IO_IRQ_ENABLE,
JAZZ_IE_ETHERNET |
JAZZ_IE_SERIAL1 |
JAZZ_IE_SERIAL2 |
JAZZ_IE_PARALLEL |
JAZZ_IE_FLOPPY);
r4030_read_reg16(JAZZ_IO_IRQ_SOURCE); /* clear pending IRQs */
set_cp0_status(ST0_IM, IE_IRQ4 | IE_IRQ1);
/* set the clock to 100 Hz */
r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9);
break;
case MACH_DESKSTATION_TYNE:
/* set the clock to 100 Hz */
outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
outb_p(LATCH & 0xff , 0x40); /* LSB */
outb(LATCH >> 8 , 0x40); /* MSB */
if (request_irq(2, no_action, SA_INTERRUPT, "cascade"))
printk("Unable to get IRQ2 for cascade\n");
break;
default:
panic("Unknown machtype in init_IRQ");
}
for (i = 0; i < 16 ; i++)
set_intr_gate(i, bad_interrupt);
if (request_irq(2, no_action, SA_INTERRUPT, "cascade"))
printk("Unable to get IRQ2 for cascade\n");
set_int_vector(i, bad_interrupt);
/* initialize the bottom half routines. */
for (i = 0; i < 32; i++) {
......
/*
* Jazz specific C parts
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright (C) 1995 by Ralf Baechle
*/
#include <linux/delay.h>
#include <asm/cachectl.h>
#include <asm/jazz.h>
#include <asm/jazzdma.h>
#include <asm/segment.h>
unsigned char jazz_fd_inb(unsigned int port)
{
unsigned char c;
c = *(volatile unsigned char *) port;
udelay(1);
return c;
}
void jazz_fd_outb(unsigned char value, unsigned int port)
{
*(volatile unsigned char *) port = value;
}
/*
* How to access the floppy DMA functions.
*/
void jazz_fd_enable_dma(void)
{
vdma_enable(JAZZ_FLOPPY_DMA);
}
void jazz_fd_disable_dma(void)
{
vdma_disable(JAZZ_FLOPPY_DMA);
}
int jazz_fd_request_dma(void)
{
return 0;
}
void jazz_fd_free_dma(void)
{
}
void jazz_fd_clear_dma_ff(void)
{
}
void jazz_fd_set_dma_mode(char mode)
{
vdma_set_mode(JAZZ_FLOPPY_DMA, mode);
}
void jazz_fd_set_dma_addr(unsigned int a)
{
vdma_set_addr(JAZZ_FLOPPY_DMA, vdma_phys2log(PHYSADDR(a)));
}
void jazz_fd_set_dma_count(unsigned int count)
{
vdma_set_count(JAZZ_FLOPPY_DMA, count);
}
int jazz_fd_get_dma_residue(void)
{
return vdma_get_residue(JAZZ_FLOPPY_DMA);
}
void jazz_fd_enable_irq(void)
{
}
void jazz_fd_disable_irq(void)
{
}
void jazz_fd_cacheflush(unsigned char *addr, unsigned int size)
{
sys_cacheflush((void *)addr, size, DCACHE);
}
unsigned char jazz_rtc_read_data(void)
{
return *(char *)JAZZ_RTC_BASE;
}
void jazz_rtc_write_data(unsigned char data)
{
*(char *)JAZZ_RTC_BASE = data;
}
This diff is collapsed.
/*
* arch/mips/kernel/magnum4000.S
*
* Copyright (C) 1995 Waldorf Electronics
* written by Ralf Baechle and Andreas Busse
*/
#include <asm/asm.h>
#include <asm/mipsregs.h>
#include <asm/jazz.h>
#include <asm/stackframe.h>
/*
* mips_magnum_4000_handle_int: Interrupt handler for Mips Magnum 4000
*/
.set noreorder
NESTED(mips_magnum_4000_handle_int, FR_SIZE, ra)
.set noat
SAVE_ALL
CLI
.set at
/*
* Get pending interrupts
*/
mfc0 t0,CP0_CAUSE # get pending interrupts
mfc0 t1,CP0_STATUS # get enabled interrupts
and t0,t1 # isolate allowed ones
andi t0,0xff00 # isolate pending bits
beqz t0,spurious_interrupt
sll t0,16 # delay slot
/*
* Find irq with highest priority
* FIXME: This is slow
*/
la t1,ll_vectors
1: bltz t0,2f # found pending irq
sll t0,1
b 1b
subu t1,PTRSIZE # delay slot
/*
* Do the low-level stuff
*/
2: lw t0,(t1)
jr t0
nop # delay slot
END(mips_magnum_4000_handle_int)
/*
* Used for keyboard driver's fake_keyboard_interrupt()
*/
ll_sw0: li s1,~IE_SW0
mfc0 t0,CP0_CAUSE
and t0,s1
mtc0 t0,CP0_CAUSE
PRINT("sw0 received...\n")
li t1,1
b call_real
li t3,PTRSIZE # delay slot, re-map to irq level 1
ll_sw1: li s1,~IE_SW1
PANIC("Unimplemented sw1 handler")
ll_local_dma: li s1,~IE_IRQ0
PANIC("Unimplemented local_dma handler")
ll_local_dev: lbu t0,JAZZ_IO_IRQ_SOURCE
#if __mips == 3
dsll t0,1
ld t0,local_vector(t0)
#else /* 32 bit */
lw t0,local_vector(t0)
#endif
jr t0
nop
loc_no_irq: PANIC("Unimplemented loc_no_irq handler")
loc_sound: PANIC("Unimplemented loc_sound handler")
loc_video: PANIC("Unimplemented loc_video handler")
loc_scsi: PANIC("Unimplemented loc_scsi handler")
/*
* Keyboard interrupt handler
*/
loc_keyboard: li s1,~JAZZ_IE_KEYBOARD
li t1,JAZZ_KEYBOARD_IRQ
b loc_call
li t3,PTRSIZE*JAZZ_KEYBOARD_IRQ # delay slot
/*
* Ethernet interrupt handler, remapped to level 2
*/
loc_ethernet: /* PRINT ("ethernet IRQ\n"); */
li s1,~JAZZ_IE_ETHERNET
li t1,JAZZ_ETHERNET_IRQ
b loc_call
li t3,PTRSIZE*JAZZ_ETHERNET_IRQ # delay slot
loc_mouse: PANIC("Unimplemented loc_mouse handler")
/*
* Serial port 1 IRQ, remapped to level 3
*/
loc_serial1: li s1,~JAZZ_IE_SERIAL1
li t1,JAZZ_SERIAL1_IRQ
b loc_call
li t3,PTRSIZE*JAZZ_SERIAL1_IRQ # delay slot
/*
* Serial port 2 IRQ, remapped to level 4
*/
loc_serial2: li s1,~JAZZ_IE_SERIAL2
li t1,JAZZ_SERIAL2_IRQ
b loc_call
li t3,PTRSIZE*JAZZ_SERIAL2_IRQ # delay slot
/*
* Parallel port IRQ, remapped to level 5
*/
loc_parallel: li s1,~JAZZ_IE_PARALLEL
li t1,JAZZ_PARALLEL_IRQ
b loc_call
li t3,PTRSIZE*JAZZ_PARALLEL_IRQ # delay slot
/*
* Floppy IRQ, remapped to level 6
*/
loc_floppy: li s1,~JAZZ_IE_FLOPPY
li t1,JAZZ_FLOPPY_IRQ
b loc_call
li t3,PTRSIZE*JAZZ_FLOPPY_IRQ # delay slot
/*
* Now call the real handler
*/
loc_call: lui s3,%hi(intr_count)
lw t2,%lo(intr_count)(s3)
la t0,IRQ_vectors # delay slot
addiu t2,1
sw t2,%lo(intr_count)(s3)
/*
* Temporarily disable interrupt source
*/
lhu t2,JAZZ_IO_IRQ_ENABLE
addu t0,t3 # make ptr to IRQ handler
lw t0,(t0)
and t2,s1 # delay slot
sh t2,JAZZ_IO_IRQ_ENABLE
jalr t0 # call IRQ handler
nor s1,zero,s1 # delay slot
/*
* Reenable interrupt
*/
lhu t2,JAZZ_IO_IRQ_ENABLE
lw t1,%lo(intr_count)(s3) # delay slot
or t2,s1
sh t2,JAZZ_IO_IRQ_ENABLE
subu t1,1
jr v0
sw t1,%lo(intr_count)(s3)
ll_eisa_irq: li s1,~IE_IRQ2
PANIC("Unimplemented eisa_irq handler")
ll_eisa_nmi: li s1,~IE_IRQ3
PANIC("Unimplemented eisa_nmi handler")
/*
* Timer IRQ
* We remap the timer irq to be more similar to a IBM compatible
*/
ll_timer: lw t0,JAZZ_TIMER_REGISTER # timer irq cleared on read
li s1,~IE_IRQ4
li t1,0
b call_real
li t3,0 # delay slot, re-map to irq level 0
/*
* CPU count/compare IRQ (unused)
*/
ll_count: j return
mtc0 zero,CP0_COMPARE
/*
* Now call the real handler
*/
call_real: lui s3,%hi(intr_count)
lw t2,%lo(intr_count)(s3)
la t0,IRQ_vectors # delay slot
addiu t2,1
sw t2,%lo(intr_count)(s3)
/*
* temporarily disable interrupt
*/
mfc0 t2,CP0_STATUS
and t2,s1
addu t0,t3
lw t0,(t0)
mtc0 t2,CP0_STATUS # delay slot
jalr t0
nor s1,zero,s1 # delay slot
/*
* reenable interrupt
*/
mfc0 t2,CP0_STATUS
or t2,s1
mtc0 t2,CP0_STATUS
lw t2,%lo(intr_count)(s3)
subu t2,1
jr v0
sw t2,%lo(intr_count)(s3)
/*
* Just for debugging...
*/
LEAF(drawline)
li t1,0xffffffff
li t2,0x100
1: sw t1,(a0)
addiu a0,a0,4
addiu t2,t2,-1
bnez t2,1b
nop
jr ra
nop
END(drawline)
.data
PTR ll_sw0 # SW0
PTR ll_sw1 # SW1
PTR ll_local_dma # Local DMA
PTR ll_local_dev # Local devices
PTR ll_eisa_irq # EISA IRQ
PTR ll_eisa_nmi # EISA NMI
PTR ll_timer # Timer
ll_vectors: PTR ll_count # Count/Compare IRQ
local_vector: PTR loc_no_irq
PTR loc_parallel
PTR loc_floppy
PTR loc_sound
PTR loc_video
PTR loc_ethernet
PTR loc_scsi
PTR loc_keyboard
PTR loc_mouse
PTR loc_serial1
PTR loc_serial2
.align 5
LEAF(spurious_interrupt)
/*
* Nothing happened... (whistle)
*/
lui t1,%hi(spurious_count)
lw t0,%lo(spurious_count)(t1)
la v0,return
addiu t0,1
jr ra
sw t0,%lo(spurious_count)(t1)
END(spurious_interrupt)
This diff is collapsed.
This diff is collapsed.
......@@ -11,6 +11,7 @@
#include <linux/user.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <asm/system.h>
#if 0
......@@ -150,10 +151,8 @@ static void put_long(struct vm_area_struct * vma, unsigned long addr,
goto repeat;
}
/* this is a hack for non-kernel-mapped video buffers and similar */
if (page < high_memory) {
page += addr & ~PAGE_MASK;
*(unsigned long *) page = data;
}
if (page < high_memory)
*(unsigned long *) (page + (addr & ~PAGE_MASK)) = data;
/* we're bypassing pagetables, so we have to set the dirty bit ourselves */
/* this should also re-instate whatever read-only mode there was before */
set_pte(pgtable, pte_mkdirty(mk_pte(page, vma->vm_page_prot)));
......@@ -463,6 +462,8 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
case PTRACE_KILL: {
long tmp;
if (child->state == TASK_ZOMBIE) /* already dead */
return 0;
wake_up_process(child);
child->exit_code = SIGKILL;
/* make sure the single step bit is not set. */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#
# Makefile for MIPS-specific library files..
#
# Many of these routines are just left over debugging trash of ancient
# times when I just make my Tyne beep and so ...
#
.S.s:
$(CPP) $(CFLAGS) $< -o $*.s
.S.o:
$(CC) $(CFLAGS) -c $< -o $*.o
L_TARGET = lib.a
L_OBJS = beep.o checksum.o csum.o dump_tlb.o tinycon.o watch.o
include $(TOPDIR)/Rules.make
This diff is collapsed.
#
# Makefile for the linux mips-specific parts of the memory manager.
# Makefile for the Linux/MIPS-specific parts of the memory manager.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
......
This diff is collapsed.
This diff is collapsed.
......@@ -9,7 +9,7 @@
SUB_DIRS := block char net #streams
MOD_SUB_DIRS := $(SUB_DIRS)
ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sound
ALL_SUB_DIRS := $(SUB_DIRS) pci scsi sound cdrom
ifdef CONFIG_PCI
SUB_DIRS += pci
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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