Commit 0a21fb7a authored by Linus Torvalds's avatar Linus Torvalds

Import 1.1.88

parent 917a96ae
......@@ -329,7 +329,7 @@ D: National Language Support
D: German Support-Disks for SLS/Slackware called SLT
D: Linux Internationalization Project
D: DOSemu
S: Mohlenweg 19
S: Muehlenweg 19
S: 34266 Niestetal
S: Germany
......
VERSION = 1
PATCHLEVEL = 1
SUBLEVEL = 87
SUBLEVEL = 88
ARCH = i386
......
......@@ -18,7 +18,7 @@ file README. It generally goes like:
make zImage or make zlilo
In "make config", you select what you want to include in the kernel.
You will generally select the miminal set that is needed to boot:
You will generally select the minimal set that is needed to boot:
The filesystem of your root partition
A scsi driver, but see below for a list of SCSI modules!
......
......@@ -68,11 +68,33 @@
.ent entInt
entInt:
SAVE_ALL
/* start atomic operation with respect to software interrupts */
lda $0,intr_count
ldq $1,0($0)
addq $1,1,$1
stq $1,0($0)
/* set up the arguments to the C interrupt handler */
bis $30,$30,$19
lda $27,do_entInt
jsr $26,($27),do_entInt
/* ok, check if we need to do software interrupts */
1: lda $0,intr_count
ldq $1,0($0)
subq $1,1,$1
bne $1,2f /* interrupt within interrupt: return now */
lda $2,bh_active
ldq $3,0($2)
lda $2,bh_mask
ldq $2,0($2)
and $2,$3,$2
bne $2,3f
2: stq $1,0($0)
RESTORE_ALL
rti
.align 5
3: lda $27,do_bottom_half
jsr $26,($27),do_bottom_half
br $31,1b
.end entInt
.align 5
......
......@@ -18,6 +18,7 @@
#include <asm/system.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
extern void die_if_kernel(char *,struct pt_regs *,long);
......
......@@ -18,6 +18,7 @@
#include <asm/system.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <asm/hwrpb.h>
extern void scsi_mem_init(unsigned long);
......@@ -38,10 +39,10 @@ extern void show_net_buffers(void);
* ZERO_PAGE is a special page that is used for zero-initialized
* data and COW.
*/
pte_t * __bad_pagetable(void)
pmd_t * __bad_pagetable(void)
{
memset((void *) EMPTY_PGT, 0, PAGE_SIZE);
return (pte_t *) EMPTY_PGT;
return (pmd_t *) EMPTY_PGT;
}
pte_t __bad_page(void)
......@@ -151,7 +152,7 @@ void mem_init(unsigned long start_mem, unsigned long end_mem)
start_mem = PAGE_ALIGN(start_mem);
/*
* Mark the pages used by the kernel as reserved,,
* Mark the pages used by the kernel as reserved..
*/
tmp = KERNEL_START;
while (tmp < start_mem) {
......
......@@ -34,7 +34,7 @@ piggy.o: $(SYSTEM) xtract piggyback
xtract: xtract.c
$(HOSTCC) $(CFLAGS) -o xtract xtract.c
piggyback: xtract.c
piggyback: piggyback.c
$(HOSTCC) $(CFLAGS) -o piggyback piggyback.c
clean:
......
......@@ -149,6 +149,7 @@ if [ "$CONFIG_NET_ISA" = "y" ]; then
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
......
......@@ -21,7 +21,9 @@
#include <linux/a.out.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <asm/system.h>
#include <asm/io.h>
asmlinkage void ret_from_sys_call(void) __asm__("ret_from_sys_call");
......@@ -48,6 +50,41 @@ asmlinkage int sys_idle(void)
}
}
/*
* This routine reboots the machine by asking the keyboard
* controller to pulse the reset-line low. We try that for a while,
* and if it doesn't work, we do some other stupid things.
*/
static long no_idt[2] = {0, 0};
static inline void kb_wait(void)
{
int i;
for (i=0; i<0x10000; i++)
if ((inb_p(0x64) & 0x02) == 0)
break;
}
void hard_reset_now(void)
{
int i, j;
sti();
/* rebooting needs to touch the page at absolute addr 0 */
pg0[0] = 7;
*((unsigned short *)0x472) = 0x1234;
for (;;) {
for (i=0; i<100; i++) {
kb_wait();
for(j = 0; j < 100000 ; j++)
/* nothing */;
outb(0xfe,0x64); /* pulse reset low */
}
__asm__ __volatile__("\tlidt %0": "=m" (no_idt));
}
}
/*
* Do necessary setup to start up a newly executed thread.
*/
......
......@@ -9,10 +9,11 @@
#include <linux/errno.h>
#include <linux/ptrace.h>
#include <linux/user.h>
#include <linux/debugreg.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <asm/system.h>
#include <linux/debugreg.h>
/*
* does not yet catch signals sent when the child dies.
......
......@@ -12,6 +12,7 @@
#include <linux/mm.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <asm/io.h>
/*
......
......@@ -18,6 +18,7 @@
#include <asm/system.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
extern void die_if_kernel(char *,struct pt_regs *,long);
......
......@@ -18,6 +18,7 @@
#include <asm/system.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
extern void scsi_mem_init(unsigned long);
extern void sound_mem_init(void);
......@@ -137,7 +138,7 @@ unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
}
pg_table = (pte_t *) pgd_page(pg_dir[768]);
/* also map it tempoarily at 0x0000000 for init */
/* also map it temporarily at 0x0000000 for init */
pgd_set(pg_dir+768, pg_table);
pgd_set(pg_dir, pg_table);
pg_dir++;
......
......@@ -436,7 +436,7 @@ final:
.data
/*
* Inital mapping tables for supported Mips boards.
* Initial mapping tables for supported Mips boards.
* First item is always the number of wired TLB entries,
* following by EntryHi/EntryLo pairs and page mask.
* Since everything must be quad-aligned (8) we insert
......
......@@ -16,8 +16,8 @@
*/
/*
* The Deskstation Tyne is almost completly like an IBM compatible PC with
* another type of microprocessor. Therefore this code is almost completly
* 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
* machines.
*/
......
/* ioport.c: I/O access on the Sparc. Work in progress.. Most of the things
* in this file are for the sole purpose of getting the kernel
* throught the compiler. :-)
* through the compiler. :-)
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
......
......@@ -236,7 +236,7 @@ probe_mmu(void)
void
probe_clock(int fchild)
{
/* TODO :> I just can't stomache it right now... */
/* TODO :> I just can't stomach it right now... */
return;
}
......
......@@ -95,7 +95,7 @@ extern unsigned long free_area_init(unsigned long, unsigned long);
* unmaps the bootup page table (as we're now in KSEG, so we don't need it).
*
* The bootup sequence put the virtual page table into high memory: that
* means that we cah change the L1 page table by just using VL1p below.
* means that we can change the L1 page table by just using VL1p below.
*/
unsigned long paging_init(unsigned long start_mem, unsigned long end_mem)
......
......@@ -22,7 +22,7 @@ Contents of this file:
7. OTHER DRIVES
8. IF YOU DON'T SUCCEED ... DEBUGGING
9. TECHNICAL HISTORY OF THE DRIVER
10. ACKNOWLEDGEMENTS
10. ACKNOWLEDGMENTS
11. PROGRAMMING ADD ONS: CDPLAY.C
APPENDIX: Source code of cdplay.c
----------------------------------------------------------------------------
......@@ -51,7 +51,7 @@ The driver consists of a header file 'aztcd.h', which normally should reside
in /usr/include/linux and the source code 'aztcd.c', which normally resides in
/usr/src/linux/drivers/block. It uses /dev/aztcd0, which must be a valid block
device with major number 29 and reside in directory /dev. To mount a CD-ROM,
your kernel needs to have the ISO9660-filesysytem support included.
your kernel needs to have the ISO9660-filesystem support included.
3. CONFIGURING YOUR KERNEL
......@@ -86,7 +86,7 @@ you try to mount the CD-ROM drive, you have to recompile your kernel.
If your kernel is not yet configured for the AZTECH driver and the ISO9660-
filesystem, you have to recompile your kernel:
- Edit aztcd.h to set the I/O-adress to your I/O-Base adress (AZT_BASE_ADDR),
- Edit aztcd.h to set the I/O-address to your I/O-Base address (AZT_BASE_ADDR),
the driver does not use interrupts or DMA, so if you are using an AZTECH
CD268, an ORCHID CD-3110 or ORCHID/WEARNES CDD110 that's the only item you
have to set up.
......@@ -172,7 +172,7 @@ The following drives ORCHID CDS3110, OKANO CDD110 and WEARNES nearly look
the same as AZTECH CDA268-01A, especially they seem to use the same command
codes. So it was quite simple to make the AZTECH driver work with these drives.
Unfortuntately I do not have any of these drives available, so I couldn't test
Unfortunately I do not have any of these drives available, so I couldn't test
it myself. But I've got reports, that it works with ORCHID CDS3110 and Game-
Wave32 sound cards and also with WEARNES CDD110 in some different combinations.
In some installations, it seems necessary to initialize the drive with the DOS
......@@ -195,7 +195,7 @@ which you don't have available for testing. So if you like, please help us.
DMA: not used
Base Address: something like 300, 320 ...
You can check this, when you start the DOS driver, which came with your
drive. By appropiately configuring the drive and the DOS driver you can
drive. By appropriately configuring the drive and the DOS driver you can
check, whether your drive does operate in this mode correctly under DOS. If
it does not operate under DOS, it won't under Linux.
Make sure the Base Address is configured correctly in aztcd.h, also make
......@@ -297,7 +297,7 @@ with/without DOS, DOS-driver started/not started, which Linux-commands etc.)
The AZTECH-Driver is a rework of the Mitsumi-Driver. Four major items had to
be reworked:
a) The Mitsumi drive does issue complete status informations acknowleding
a) The Mitsumi drive does issue complete status information acknowledging
each command, the Aztech drive does only signal that the command was
processed. So whenever the complete status information is needed, an extra
ACMD_GET_STATUS command is issued. The handshake procedure for the drive
......@@ -326,7 +326,7 @@ not been able to switch to reading in raw mode. For reading raw mode, Aztech
uses a different command than for cooked mode, which I only have implemen-
ted in the ioctl-section but not in the section which is used by the ISO9660-
The driver was developped on an AST PC with Intel 486/DX2, 8MB RAM, 340MB IDE
The driver was developed on an AST PC with Intel 486/DX2, 8MB RAM, 340MB IDE
hard disk and on an AST PC with Intel Pentium 60MHz, 16MB RAM, 520MB IDE
running Linux kernel version 1.0.9 from the LST 1.8 Distribution. The kernel
was compiled with gcc.2.5.8. My CD-ROM drive is an Aztech CDA268-01A. My
......@@ -341,7 +341,7 @@ marked with /*???*/ in the source code. There are also some parts in the
Mitsumi driver, where I did not completely understand their code.
10. ACKNOWLEDGEMENTS
10. ACKNOWLEDGMENTS
Without the help of P.Bush, Aztech, who delivered technical information
about the Aztech Drive and without the help of E.Moenkeberg, GWDG, who did a
great job in analyzing the command structure of various CD-ROM drives, this
......@@ -360,7 +360,7 @@ Robby Schirmer (schirmer@fmi.uni-passau.de) tested the audio stuff (ioctls)
and suggested a lot of patches for them.
Joseph Piskor and Peter Nugent were the first users with the ORCHID CD3110
and also were very patient with the problems, which occured.
and also were very patient with the problems which occurred.
Anybody, who is interested in these items should have a look at 'ftp.gwdg.de',
directory 'pub/linux/cdrom' and at 'ftp.cdrom.com', directory 'pub/cdrom'.
......@@ -415,7 +415,7 @@ APPENDIX: Source code of cdplay.c
Copyright 1994, 1995 Werner Zimmermann (zimmerma@rz.fht-esslingen.de)
This programm originally was written to test the audio functions of the
This program originally was written to test the audio functions of the
AZTECH.CDROM-driver, but it should work with every CD-ROM drive. Before
using it, you should set a symlink from /dev/cdrom to your real CDROM
device.
......@@ -592,7 +592,7 @@ int main(void)
}
break;
case 'a': cmd=CDROMPLAYMSF;
printf("Adress (min:sec:frame) ");
printf("Address (min:sec:frame) ");
scanf("%d:%d:%d",&arg1,&arg2,&arg3);
msf.cdmsf_min0 =arg1;
msf.cdmsf_sec0 =arg2;
......@@ -603,12 +603,12 @@ int main(void)
msf.cdmsf_sec1=00;
msf.cdmsf_frame1=00;
if (ioctl(handle,cmd,&msf))
{ printf("Drive error or invalid adress\n");
{ printf("Drive error or invalid address\n");
}
break;
#ifdef AZT_PRIVATE_IOCTLS /*not supported by every CDROM driver*/
case 'd': cmd=CDROMREADMODE1;
printf("Adress (min:sec:frame) ");
printf("Address (min:sec:frame) ");
scanf("%d:%d:%d",&arg1,&arg2,&arg3);
azt.msf.cdmsf_min0 =arg1;
azt.msf.cdmsf_sec0 =arg2;
......@@ -616,7 +616,7 @@ int main(void)
if (azt.msf.cdmsf_sec0 > 59) azt.msf.cdmsf_sec0 =59;
if (azt.msf.cdmsf_frame0> 74) azt.msf.cdmsf_frame0=74;
if (ioctl(handle,cmd,&azt.msf))
{ printf("Drive error, invalid adress or unsupported command\n");
{ printf("Drive error, invalid address or unsupported command\n");
}
k=0;
getchar();
......@@ -641,7 +641,7 @@ int main(void)
}
break;
case 'w': cmd=CDROMREADMODE2;
printf("Adress (min:sec:frame) ");
printf("Address (min:sec:frame) ");
scanf("%d:%d:%d",&arg1,&arg2,&arg3);
azt.msf.cdmsf_min0 =arg1;
azt.msf.cdmsf_sec0 =arg2;
......@@ -649,7 +649,7 @@ int main(void)
if (azt.msf.cdmsf_sec0 > 59) azt.msf.cdmsf_sec0 =59;
if (azt.msf.cdmsf_frame0> 74) azt.msf.cdmsf_frame0=74;
if (ioctl(handle,cmd,&azt))
{ printf("Drive error, invalid adress or unsupported command\n");
{ printf("Drive error, invalid address or unsupported command\n");
}
k=0;
for (i=0;i<146;i++)
......
......@@ -98,11 +98,11 @@ snyder@fnald0.fnal.gov
Some Terminology
----------------
IDE = Integrated Drive Electonics, meaning that each drive has a built-in
IDE = Integrated Drive Electronics, meaning that each drive has a built-in
controller, which is why an "IDE interface card" is not a "controller card".
IDE drives are designed to attach almost directly to the ISA bus of an AT-style
computer. The typcial IDE interface card merely provides I/O port address
computer. The typical IDE interface card merely provides I/O port address
decoding and tri-state buffers, although several newer localbus cards go much
beyond the basics. When purchasing a localbus IDE interface, avoid cards with
an onboard BIOS and those which require special drivers. Instead, look for a
......@@ -119,7 +119,7 @@ which grew out of vendor-specific "Enhanced IDE" (EIDE) implementations.
ATAPI = ATA Packet Interface, a new protocol for controlling the drives,
similar to SCSI protocols, created at the same time as the ATA2 standard.
ATAPI is currently used for controlling CDROM and TAPE devices, and will
likely also soon be used for Floppy drives, removeable R/W cartridges,
likely also soon be used for Floppy drives, removable R/W cartridges,
and for high capacity hard disk drives.
How To Use *Big* ATA/IDE drives with Linux
......
......@@ -32,7 +32,7 @@
frame can be read in sequence, this is also the reason for
3. getting 'timeout in state 4' messages, but nevertheless
it works
W.Zimmermann, Okt. 31, 1994
W.Zimmermann, Oct. 31, 1994
V0.1 Version is ALPHA, problems #2 and #3 resolved.
W.Zimmermann, Nov. 3, 1994
V0.2 Modification to some comments, debugging aids for partial test
......@@ -67,24 +67,24 @@
W.Zimmermann, Nov. 18, 1994
V0.42 Included getAztStatus command in GetQChannelInfo() to allow
reading Q-channel info on audio disks, if drive is stopped,
and some other bug fixes in the audio stuff, suggestet by
and some other bug fixes in the audio stuff, suggested by
Robby Schirmer.
Added more ioctls (reading data in mode 1 and mode 2).
Completely removed the old azt_poll() routine.
Detection of ORCHID CDS-3110 in aztcd_init implemented.
Additional debugging aids (see the readme file).
W.Zimmermann, Dez. 9, 1994
V0.50 Autodetection of drives inplemented.
W.Zimmermann, Dez. 12, 1994
W.Zimmermann, Dec. 9, 1994
V0.50 Autodetection of drives implemented.
W.Zimmermann, Dec. 12, 1994
V0.52 Prepared for including in the standard kernel, renamed most
variables to contain 'azt', included autoconf.h
W.Zimmermann, Dez. 16, 1994
W.Zimmermann, Dec. 16, 1994
V0.6 Version for being included in the standard Linux kernel.
Renamed source and header file to aztcd.c and aztcd.h
W.Zimmermann, Dez. 24, 1994
W.Zimmermann, Dec. 24, 1994
V0.7 Changed VERIFY_READ to VERIFY_WRITE in aztcd_ioctl, case
CDROMREADMODE1 and CDROMREADMODE2; bug fix in the ioctl,
which causes kernel crashs, when playing audio, changed
which causes kernel crashes when playing audio, changed
include-files (config.h instead of autoconf.h, removed
delay.h)
W.Zimmermann, Jan. 8, 1995
......@@ -209,7 +209,7 @@ static unsigned long aztTimeOutCount;
/* Macros for the drive hardware interface handshake, these macros use
busy waiting */
/* Wait for OP_OK = drive answers with AFL_OP_OK after recieving a command*/
/* Wait for OP_OK = drive answers with AFL_OP_OK after receiving a command*/
# define OP_OK op_ok()
void op_ok(void)
{ aztTimeOutCount=0;
......@@ -222,7 +222,7 @@ void op_ok(void)
} while (aztIndatum!=AFL_OP_OK);
}
/* Wait for PA_OK = drive answers with AFL_PA_OK after recieving parameters*/
/* Wait for PA_OK = drive answers with AFL_PA_OK after receiving parameters*/
# define PA_OK pa_ok()
void pa_ok(void)
{ aztTimeOutCount=0;
......@@ -377,7 +377,7 @@ static int check_aztcd_media_change(dev_t full_dev)
}
/* used in azt_poll to poll the status, expects another programm to issue a
/* used in azt_poll to poll the status, expects another program to issue a
* ACMD_GET_STATUS directly before
*/
static int aztStatus(void)
......@@ -637,7 +637,7 @@ azt_Play.end.min, azt_Play.end.sec, azt_Play.end.frame);
*/
break;
case CDROMEJECT:
/* all drives can atleast stop! */
/* all drives can at least stop! */
if (aztAudioStatus == CDROM_AUDIO_PLAY)
{ if (aztSendCmd(ACMD_STOP)) return -1;
STEN_LOW_WAIT;
......@@ -1439,7 +1439,7 @@ int aztGetQChannelInfo(struct azt_Toc *qp)
}
/*
* Read the table of contents (TOC) and TOC header if neccessary
* Read the table of contents (TOC) and TOC header if necessary
*/
static int aztUpdateToc()
{
......
......@@ -121,6 +121,7 @@ static int FDC2=-1;
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/delay.h>
#include <linux/mc146818rtc.h> /* CMOS defines */
#include <asm/dma.h>
#include <asm/irq.h>
......@@ -2852,11 +2853,6 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
#undef IOCTL_ALLOWED
}
#define CMOS_READ(addr) ({ \
outb_p(addr,0x70); \
inb_p(0x71); \
})
static void set_base_type(int drive,int code)
{
if (code > 0 && code <= NUMBER(default_drive_params)) {
......
......@@ -34,6 +34,7 @@
#include <linux/malloc.h>
#include <linux/string.h>
#include <linux/ioport.h>
#include <linux/mc146818rtc.h> /* CMOS defines */
#define REALLY_SLOW_IO
#include <asm/system.h>
......@@ -47,12 +48,6 @@
static int revalidate_hddisk(int, int);
static inline unsigned char CMOS_READ(unsigned char addr)
{
outb_p(addr,0x70);
return inb_p(0x71);
}
#define HD_DELAY 0
#define MAX_ERRORS 16 /* Max read/write errors/sector */
......
Thu Jan 26 09:02:49 1995 Theodore Y. Ts'o (tytso@rt-11)
* serial.c (rs_init, set_serial_info, get_serial_info, rs_close):
Support close_wait and close_wait2 in the serial driver.
This is helpful for slow devices (like serial plotters) so
that their outputs don't get flushed upon device close.
This has to be configurable because normally we don't want
ports to be hung up for long periods of time during a
close when they are not connected to a device, or the
device is powered off.
The default is to wait 30 seconds after shutting down the
receiver (to prevent echo wars). This is done by setting
close_wait=ASYNC_CLOSE_WAIT_NONE, close_wait2 = 3000. If
XON/XOFF handshaking is used, then the 30 second timeout
should happen before the receiver is shutdown; this is
done by reversing the values of close_wait and
close_wait2. In the case of a very slow device, the
timeouts for close_wait or close_wait2 should be lengthed.
If either value is set to 0, the kernel will wait forever
for all of the data to be transmitted.
Thu Jan 17 01:17:20 1995 Theodore Y. Ts'o (tytso@rt-11)
* serial.c (startup, change_speed, rs_init): Add support to detect
the StarTech 16650 chip. Treat it as a 16450 for now,
because of its FIFO bugs.
Thu Jan 5 21:21:57 1995 <dhinds@allegro.stanford.edu>
* serial.c: (receive_char): Added counter to prevent infinite loop
......
......@@ -1158,34 +1158,6 @@ static void kbd_bh(void * unused)
sti();
}
long no_idt[2] = {0, 0};
/*
* This routine reboots the machine by asking the keyboard
* controller to pulse the reset-line low. We try that for a while,
* and if it doesn't work, we do some other stupid things.
*/
#ifdef __i386__
void hard_reset_now(void)
{
int i, j;
sti();
/* rebooting needs to touch the page at absolute addr 0 */
pg0[0] = 7;
*((unsigned short *)0x472) = 0x1234;
for (;;) {
for (i=0; i<100; i++) {
kb_wait();
for(j = 0; j < 100000 ; j++)
/* nothing */;
outb(0xfe,0x64); /* pulse reset low */
}
__asm__("\tlidt _no_idt");
}
}
#endif
unsigned long kbd_init(unsigned long kmem_start)
{
int i;
......
......@@ -877,7 +877,15 @@ static int startup(struct async_struct * info)
* Clear the FIFO buffers and disable them
* (they will be reenabled in change_speed())
*/
if (info->type == PORT_16550A) {
if (info->type == PORT_16650) {
serial_outp(info, UART_FCR, (UART_FCR_CLEAR_RCVR |
UART_FCR_CLEAR_XMIT));
#if 0
info->xmit_fifo_size = 32;
#else
info->xmit_fifo_size = 1;
#endif
} else if (info->type == PORT_16550A) {
serial_outp(info, UART_FCR, (UART_FCR_CLEAR_RCVR |
UART_FCR_CLEAR_XMIT));
info->xmit_fifo_size = 16;
......@@ -1148,6 +1156,18 @@ static void change_speed(struct async_struct *info)
fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1;
else
fcr = UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_8;
} else if (info->type == PORT_16650) {
/*
* On the 16650, we disable the FIFOs altogether
* because of a design bug in how the implement
* things. We could support it by completely changing
* how we handle the interrupt driver, but not today....
*
* N.B. Because there's no way to set a FIFO trigger
* at 1 char, we'd probably disable at speed below
* 2400 baud anyway...
*/
fcr = 0;
} else
fcr = 0;
......@@ -1404,6 +1424,8 @@ static int get_serial_info(struct async_struct * info,
tmp.flags = info->flags;
tmp.baud_base = info->baud_base;
tmp.close_delay = info->close_delay;
tmp.closing_wait = info->closing_wait;
tmp.closing_wait2 = info->closing_wait2;
tmp.custom_divisor = info->custom_divisor;
tmp.hub6 = info->hub6;
memcpy_tofs(retinfo,&tmp,sizeof(*retinfo));
......@@ -1471,6 +1493,8 @@ static int set_serial_info(struct async_struct * info,
info->custom_divisor = new_serial.custom_divisor;
info->type = new_serial.type;
info->close_delay = new_serial.close_delay;
info->closing_wait = new_serial.closing_wait;
info->closing_wait2 = new_serial.closing_wait2;
release_region(info->port,8);
if (change_port || change_irq) {
......@@ -1871,6 +1895,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
info->normal_termios = *tty->termios;
if (info->flags & ASYNC_CALLOUT_ACTIVE)
info->callout_termios = *tty->termios;
if (info->closing_wait != ASYNC_CLOSING_WAIT_NONE)
wait_until_sent(tty, info->closing_wait);
/*
* At this point we stop accepting input. To do this, we
* disable the receive line status interrupts, and tell the
......@@ -1881,7 +1907,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
info->read_status_mask &= ~UART_LSR_DR;
if (info->flags & ASYNC_INITIALIZED) {
serial_out(info, UART_IER, info->IER);
wait_until_sent(tty, 3000); /* 30 seconds timeout */
wait_until_sent(tty, info->closing_wait2);
/*
* Before we drop DTR, make sure the UART transmitter
* has completely drained; this is especially
......@@ -2329,6 +2355,10 @@ static void autoconfig(struct async_struct * info)
if (info->flags & ASYNC_AUTO_IRQ)
info->irq = do_auto_irq(info);
scratch2 = serial_in(info, UART_LCR);
serial_outp(info, UART_LCR, scratch2 | UART_LCR_DLAB);
serial_outp(info, UART_EFR, 0); /* EFR is the same as FCR */
serial_outp(info, UART_LCR, scratch2);
serial_outp(info, UART_FCR, UART_FCR_ENABLE_FIFO);
scratch = serial_in(info, UART_IIR) >> 6;
info->xmit_fifo_size = 1;
......@@ -2343,8 +2373,15 @@ static void autoconfig(struct async_struct * info)
info->type = PORT_16550;
break;
case 3:
info->type = PORT_16550A;
info->xmit_fifo_size = 16;
serial_outp(info, UART_LCR, scratch2 | UART_LCR_DLAB);
if (serial_in(info, UART_EFR) == 0) {
info->type = PORT_16650;
info->xmit_fifo_size = 32;
} else {
info->type = PORT_16550A;
info->xmit_fifo_size = 16;
}
serial_outp(info, UART_LCR, scratch2);
break;
}
if (info->type == PORT_16450) {
......@@ -2457,6 +2494,8 @@ long rs_init(long kmem_start)
info->type = PORT_UNKNOWN;
info->custom_divisor = 0;
info->close_delay = 50;
info->closing_wait = ASYNC_CLOSING_WAIT_NONE;
info->closing_wait2 = 3000;
info->x_char = 0;
info->event = 0;
info->count = 0;
......@@ -2492,6 +2531,9 @@ long rs_init(long kmem_start)
case PORT_16550A:
printk(" is a 16550A\n");
break;
case PORT_16650:
printk(" is a 16650\n");
break;
default:
printk("\n");
break;
......
......@@ -677,12 +677,15 @@ init_module(void)
void
cleanup_module(void)
{
if (MOD_IN_USE)
printk("3c501: device busy, remove delayed\n");
else
{
unregister_netdev(&dev_3c501);
}
/* No need to check MOD_IN_USE, as sys_delete_module() checks. */
unregister_netdev(&dev_3c501);
/* Free up the private structure, or leak memory :-) */
kfree(dev_3c501.priv);
dev_3c501.priv = NULL; /* gets re-allocated by el1_probe1 */
/* If we don't do this, we can't re-insmod it later. */
release_region(dev_3c501.base_addr, EL1_IO_EXTENT);
}
#endif /* MODULE */
......
......@@ -164,6 +164,12 @@ else
MODULES := $(MODULES) eexpress.o
endif
ifdef CONFIG_WAVELAN
NETDRV_OBJS := $(NETDRV_OBJS) wavelan.o
else
MODULES := $(MODULES) wavelan.o
endif
ifdef CONFIG_ZNET
NETDRV_OBJS := $(NETDRV_OBJS) znet.o
endif
......
#if defined(CONFIG_WAVELAN)
Tue Jan 31 10:42:35 EST 1995
0. This document refers to Version 5 of the Linux WaveLAN device driver software.
It has been tested successfully under the 1.1.87 release of the Linux
kernel. It is `beta-test' software, so caveat emptor. Please report bugs
to me so that I can fix them quickly.
1. At present the driver only autoprobes for a WaveLAN card at I/O address 0x390.
The version of the card that I use (NCR) supports four I/O addresses (selectable
via a pair of DIP switches). If you want the driver to autoprobe a different
subset of the four valid addresses then you will need to edit
.../drivers/net/wavelan.c (near line 714) and change the initialisation of the
`iobase[]' array. Normally, I use a LILO configuration file directive to
obviate the need for autoprobing entirely, a course of action I heartily
recommend.
2. By default, the driver uses the Network ID (NWID) stored in the card's Parameter
Storage Area (PSA). However, the PSA NWID can be overridden by a value passed
explicitly as the third numeric argument to LILO's "ether=" directive, either
at the LILO prompt at boot time or within LILO's configuration file.
For example, the following line from such a LILO configuration file would
auto-configure the IRQ value, set the I/O base to 0x390 and set the NWID to
0x4321, all on a WaveLAN card labelled "eth0":
..
append ="ether=0,0x390,0x4321,eth0"
..
3. The files that comprise this software must be incorporated into the Linux
kernel source tree (usually rooted at /usr/src/linux). Following that a
"make clean; make config; make dep; make zImage" should produce a Linux
kernel incorporating the WaveLAN driver, ready for installation.
The files:
drivers/net/wavelan.[ch]
drivers/net/i82586.h
are unique to this package and simply may be moved into place. The
others are modified versions of pre-existing files and must
be incorporated more carefully. However, the regions of modified code
within these files are small and are bracketted by the preprocessor
symbol CONFIG_WAVELAN, so incorporation should be straightforward.
4. If you encounter any problems send me some email.
Good luck,
Bruce Janson (bruce@cs.usyd.edu.au)
#endif /* defined(CONFIG_WAVELAN) */
......@@ -51,6 +51,9 @@ extern int apricot_probe(struct device *);
extern int ewrk3_probe(struct device *);
extern int de4x5_probe(struct device *);
extern int el1_probe(struct device *);
#if defined(CONFIG_WAVELAN)
extern int wavelan_probe(struct device *);
#endif /* defined(CONFIG_WAVELAN) */
extern int el16_probe(struct device *);
extern int elplus_probe(struct device *);
extern int ac3200_probe(struct device *);
......@@ -121,6 +124,9 @@ ethif_probe(struct device *dev)
#ifdef CONFIG_EL1 /* 3c501 */
&& el1_probe(dev)
#endif
#if defined(CONFIG_WAVELAN) /* WaveLAN */
&& wavelan_probe(dev)
#endif /* defined(CONFIG_WAVELAN) */
#ifdef CONFIG_EL16 /* 3c507 */
&& el16_probe(dev)
#endif
......
......@@ -78,7 +78,7 @@
** EISA Configuration Register 2 bit definitions
*/
#define ER2_BRS 0xc0 /* Boot ROM Size */
#define ER2_BRA 0x3c /* Boot ROM Adress <16:13> */
#define ER2_BRA 0x3c /* Boot ROM Address <16:13> */
/*
** EISA Configuration Register 3 bit definitions
......@@ -247,7 +247,7 @@
#define OMR_BP 0x00010000 /* Back Pressure */
#define OMR_TR 0x0000c000 /* Threshold Control Bits */
#define OMR_ST 0x00002000 /* Start/Stop Transmission Command */
#define OMR_FC 0x00001000 /* Force Collisio Mode */
#define OMR_FC 0x00001000 /* Force Collision Mode */
#define OMR_OM 0x00000c00 /* Operating Mode */
#define OMR_FD 0x00000200 /* Full Duplex Mode */
#define OMR_FKD 0x00000100 /* Flaky Oscillator Disable */
......@@ -343,7 +343,7 @@
/*
** DC21040 SIA Transmit and Receive Register (DE4X5_STRR)
*/
#define STRR_SPP 0x00004000 /* Set Polarit Plus */
#define STRR_SPP 0x00004000 /* Set Polarity Plus */
#define STRR_APE 0x00002000 /* Auto Polarity Enable */
#define STRR_LTE 0x00001000 /* Link Test Enable */
#define STRR_SQE 0x00000800 /* Signal Quality Enable */
......
This diff is collapsed.
......@@ -374,7 +374,7 @@ ppp_changedmtu (struct ppp *ppp, int new_mtu, int new_mru)
/* RFC 1331, section 7.2 says the minimum value is 1500 bytes */
if (mru < PPP_MRU)
mru = new_mru = PPP_MRU;
mru = PPP_MRU;
mtu = (mtu * 2) + 20;
mru = (mru * 2) + 20;
......@@ -1409,8 +1409,8 @@ ppp_ioctl(struct tty_struct *tty, struct file *file, unsigned int i,
case PPPIOCSMRU:
error = verify_area (VERIFY_READ, (void *) l, sizeof (temp_i));
if (error == 0) {
PRINTKN (3,(KERN_INFO "ppp_ioctl: set mru to %x\n", temp_i));
temp_i = (int) get_fs_long (l);
PRINTKN (3,(KERN_INFO "ppp_ioctl: set mru to %d\n", temp_i));
if (ppp->mru != temp_i)
ppp_changedmtu (ppp, ppp->dev->mtu, temp_i);
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -74,7 +74,7 @@ Fri Jan 13 12:54:46 1995 Eric Youngdale (eric@andante)
scsi_init_malloc to get some memory we know will be safe).
* scsi.c: Change dma freelist to be a set of pages. This allows
us to dynamicly adjust the size of the list by adding more pages
us to dynamically adjust the size of the list by adding more pages
to the pagelist. Fix scsi_malloc and scsi_free accordingly.
* scsi_module.c: Fix include.
......
......@@ -578,14 +578,6 @@ void scan_scsis (struct Scsi_Host * shpnt)
} /* for lun ends */
shpnt->host_queue = NULL; /* No longer needed here */
printk("scsi : detected ");
for(sdtpnt = scsi_devicelist; sdtpnt; sdtpnt = sdtpnt->next)
if(sdtpnt->dev_noticed && sdtpnt->name)
printk("%d SCSI %s%s ", sdtpnt->dev_noticed, sdtpnt->name,
(sdtpnt->dev_noticed != 1) ? "s" : "");
printk("total.\n");
/* Last device block does not exist. Free memory. */
scsi_init_free((char *) SDpnt, sizeof(Scsi_Device));
......@@ -1955,6 +1947,11 @@ void * scsi_init_malloc(unsigned int size, int priority)
if(scsi_loadable_module_flag) {
retval = (unsigned long) kmalloc(size, priority);
} else {
/*
* Keep all memory aligned on 16-byte boundaries. Some host adaptors
* (e.g. BusLogic BT-445S) require DMA buffers to be aligned that way.
*/
size = (size + 15) & ~15;
retval = scsi_init_memory_start;
scsi_init_memory_start += size;
}
......@@ -1968,6 +1965,7 @@ void scsi_init_free(char * ptr, unsigned int size)
if((unsigned long) ptr > scsi_init_memory_start) {
kfree(ptr);
} else {
size = (size + 15) & ~15; /* Use the same alignment as scsi_init_malloc(). */
if(((unsigned long) ptr) + size == scsi_init_memory_start)
scsi_init_memory_start = (unsigned long) ptr;
}
......@@ -1993,7 +1991,8 @@ unsigned long scsi_dev_init (unsigned long memory_start,unsigned long memory_end
/* Init a few things so we can "malloc" memory. */
scsi_loadable_module_flag = 0;
scsi_init_memory_start = memory_start;
/* Align everything on 16-byte boundaries. */
scsi_init_memory_start = (memory_start + 15) & ~ 15;
timer_table[SCSI_TIMER].fn = scsi_main_timeout;
timer_table[SCSI_TIMER].expires = 0;
......@@ -2006,6 +2005,13 @@ unsigned long scsi_dev_init (unsigned long memory_start,unsigned long memory_end
for (shpnt = scsi_hostlist; shpnt; shpnt = shpnt->next)
scan_scsis(shpnt); /* scan for scsi devices */
printk("scsi : detected ");
for (sdtpnt = scsi_devicelist; sdtpnt; sdtpnt = sdtpnt->next)
if (sdtpnt->dev_noticed && sdtpnt->name)
printk("%d SCSI %s%s ", sdtpnt->dev_noticed, sdtpnt->name,
(sdtpnt->dev_noticed != 1) ? "s" : "");
printk("total.\n");
for(sdtpnt = scsi_devicelist; sdtpnt; sdtpnt = sdtpnt->next)
if(sdtpnt->init && sdtpnt->dev_noticed) (*sdtpnt->init)();
......@@ -2068,7 +2074,6 @@ unsigned long scsi_dev_init (unsigned long memory_start,unsigned long memory_end
dma_sectors = (dma_sectors + 15) & 0xfff0;
dma_free_sectors = dma_sectors; /* This must be a multiple of 16 */
scsi_init_memory_start = (scsi_init_memory_start + 3) & 0xfffffffc;
dma_malloc_freelist = (unsigned char *)
scsi_init_malloc(dma_sectors >> 3, GFP_ATOMIC);
memset(dma_malloc_freelist, 0, dma_sectors >> 3);
......@@ -2077,9 +2082,6 @@ unsigned long scsi_dev_init (unsigned long memory_start,unsigned long memory_end
scsi_init_malloc(dma_sectors >> 1, GFP_ATOMIC);
memset(dma_malloc_pages, 0, dma_sectors >> 1);
/* Some host adapters require buffers to be word aligned */
if(scsi_init_memory_start & 1) scsi_init_memory_start++;
for(i=0; i< dma_sectors >> 3; i++)
dma_malloc_pages[i] = (unsigned char *)
scsi_init_malloc(PAGE_SIZE, GFP_ATOMIC | GFP_DMA);
......
......@@ -87,7 +87,7 @@ static int sd_open(struct inode * inode, struct file * filp)
return -ENXIO; /* No such device */
/*
* See if we are requesting a non-existant partition.
* See if we are requesting a non-existent partition.
*/
if(sd_sizes[MINOR(inode->i_rdev)] == 0)
return -ENXIO;
......
......@@ -349,7 +349,7 @@ static void sr_photocd(struct inode *inode)
min = (unsigned long) rec[15]/16*10 + (unsigned long) rec[15]%16;
sec = (unsigned long) rec[16]/16*10 + (unsigned long) rec[16]%16;
frame = (unsigned long) rec[17]/16*10 + (unsigned long) rec[17]%16;
/* if rec[14] is'nt 0xb0, the drive does not support multisession CD's, use zero */
/* if rec[14] isn't 0xb0, the drive does not support multisession CD's, use zero */
sector = (0xb0 == rec[14]) ? min*CD_SECS*CD_FRAMES + sec*CD_FRAMES + frame : 0;
#ifdef DEBUG
printk("NEC: (%2x) %2li:%02li:%02li = %li\n",buf[8+14],min,sec,frame,sector);
......@@ -377,7 +377,7 @@ static void sr_photocd(struct inode *inode)
if (rc != 0) {
printk("sr_photocd: ioctl error (TOSHIBA #1): 0x%x\n",rc);
sector = 0;
break; /* if the first ioctl fails, we don't call the secound one */
break; /* if the first ioctl fails, we don't call the second one */
}
is_xa = (rec[0] == 0x20);
#ifdef DEBUG
......@@ -411,7 +411,7 @@ static void sr_photocd(struct inode *inode)
printk("sr_photocd: get_density: 0x%x\n",rec[4]);
#endif
/* ...and only if nessesary a set_density */
/* ...and only if necessary a set_density */
if ((rec[4] != 0x81 && is_xa) || (rec[4] != 0 && !is_xa)) {
#ifdef DEBUG
printk("sr_photocd: doing set_density\n");
......
......@@ -33,6 +33,7 @@
#include <linux/personality.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <linux/config.h>
......
......@@ -42,6 +42,7 @@
#include <asm/system.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <linux/config.h>
......
......@@ -15,7 +15,7 @@ void msdos_ll_rw_block (struct super_block *sb, int opr,
/* These macros exist to avoid modifying all the code */
/* They should be removed one day I guess */
/* The versionning mecanism of the modules system define those macros */
/* The versioning mechanism of the modules system define those macros */
/* This remove some warnings */
#ifdef brelse
#undef brelse
......
......@@ -44,6 +44,7 @@
#include <linux/mm.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
#include <asm/io.h>
#define LOAD_INT(x) ((x) >> FSHIFT)
......
......@@ -13,6 +13,7 @@
#include <asm/page.h>
#include <asm/segment.h>
#include <asm/io.h>
#include <asm/pgtable.h>
/*
* mem_write isn't really a good idea right now. It needs
......
......@@ -55,6 +55,9 @@ extern int dev_get_info(char *, char **, off_t, int);
extern int rt_get_info(char *, char **, off_t, int);
extern int snmp_get_info(char *, char **, off_t, int);
extern int afinet_get_info(char *, char **, off_t, int);
#if defined(CONFIG_WAVELAN)
extern int wavelan_get_info(char *, char **, off_t, int);
#endif /* defined(CONFIG_WAVELAN) */
extern int ip_acct_procinfo(char *, char **, off_t, int);
extern int ip_fw_blk_procinfo(char *, char **, off_t, int);
extern int ip_fw_fwd_procinfo(char *, char **, off_t, int);
......@@ -145,6 +148,9 @@ static struct proc_dir_entry net_dir[] = {
#ifdef CONFIG_IP_ACCT
{ PROC_NET_IPACCT, 7, "ip_acct"},
#endif
#if defined(CONFIG_WAVELAN)
{ PROC_NET_WAVELAN, 7, "wavelan" },
#endif /* defined(CONFIG_WAVELAN) */
#endif /* CONFIG_INET */
#ifdef CONFIG_IPX
{ PROC_NET_IPX_ROUTE, 9, "ipx_route" },
......@@ -305,6 +311,11 @@ static int proc_readnet(struct inode * inode, struct file * file,
length = rarp_get_info(page,&start,file->f_pos,thistime);
break;
#endif /* CONFIG_INET_RARP */
#if defined(CONFIG_WAVELAN)
case PROC_NET_WAVELAN:
length = wavelan_get_info(page, &start, file->f_pos, thistime);
break;
#endif /* defined(CONFIG_WAVELAN) */
#endif /* CONFIG_INET */
#ifdef CONFIG_IPX
case PROC_NET_IPX_INTERFACE:
......
......@@ -16,7 +16,7 @@ It gives you:
There is plenty of documentation on it in the source. A formated document
made from those comments is available from
sunsite.unc.edu:/pub/Linux/ALPHA/umsdos
sunsite.unc.edu:/pub/Linux/system/Filesystems/umsdos.
Mostly...
......@@ -53,9 +53,9 @@ Now, how to get those --linux-.---.
$5 per directory. Add any applicable taxes.
\end joke_section
A utility umssync creates those and maintain them. It is available
from the same directory above (sunsite) in the file umsdos_progs-0.3.tar.gz.
A compiled version is available in umsdos-0.3a.bin.tar.gz.
A utility umssync creates those. The kernel maintain them. It is available
from the same directory above (sunsite) in the file umsdos_progs-0.7.tar.gz.
A compiled version is available in umsdos_progs-0.7.bin.tar.gz.
So in our example, after mounting mnt, we do
......@@ -80,5 +80,17 @@ Umsdos won't notice new files, but will signal removed file (it won't crash).
Using umssync in /etc/rc will make sure the DOS directory is in sync with
the --linux-.---.
It is a good idea to put the following command in your RC file just
after the "mount -a":
mount -a
/sbin/umssync -i+ -c+ -r99 /umsdos_mount_point
(You put one for each umsdos mount point in the fstab)
This will insure nice operation. A umsdos.fsck is in the making,
so you will be allowed to managed umsdos partition in the same way
other filesystem are, using the generic fsck front end.
Hope this helps!
......@@ -167,7 +167,7 @@ int UMSDOS_ioctl_dir (
}else if (cmd == UMSDOS_RENAME_DOS){
/* #Specification: ioctl / UMSDOS_RENAME_DOS
A file or directory is rename in a DOS directory
(not moved accross directory). The source name
(not moved across directory). The source name
is in the dos_dirent.name field and the destination
is in umsdos_dirent.name field.
......
This diff is collapsed.
This diff is collapsed.
#ifndef _I386_PAGE_H
#define _I386_PAGE_H
#define CONFIG_STRICT_MM_TYPECHECKS
#define invalidate() \
__asm__ __volatile__("movl %%cr3,%%eax\n\tmovl %%eax,%%cr3": : :"ax")
/* PAGE_SHIFT determines the page size */
#define PAGE_SHIFT 12
#define PGDIR_SHIFT 22
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#ifdef __KERNEL__
#define PAGE_OFFSET 0
#define MAP_NR(addr) ((addr) >> PAGE_SHIFT)
#define MAP_PAGE_RESERVED (1<<15)
typedef unsigned short mem_map_t;
/* Just any arbitrary offset to the start of the vmalloc VM area: the
* current 8MB value just means that there will be a 8MB "hole" after the
* physical memory until the kernel virtual memory starts. That means that
* any out-of-bounds memory accesses will hopefully be caught.
* The vmalloc() routines leaves a hole of 4kB between each vmalloced
* area for the same reason. ;)
*/
#define VMALLOC_OFFSET (8*1024*1024)
#define VMALLOC_START ((high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
#define VMALLOC_VMADDR(x) (TASK_SIZE + (unsigned long)(x))
#define CONFIG_STRICT_MM_TYPECHECKS
#ifdef CONFIG_STRICT_MM_TYPECHECKS
/*
* These are used to make use of C type-checking..
*/
typedef struct { unsigned long pte; } pte_t;
typedef struct { unsigned long pmd; } pmd_t;
typedef struct { unsigned long pgd; } pgd_t;
typedef struct { unsigned long pgprot; } pgprot_t;
#define pte_val(x) ((x).pte)
#define pmd_val(x) ((x).pmd)
#define pgd_val(x) ((x).pgd)
#define pgprot_val(x) ((x).pgprot)
#define __pte(x) ((pte_t) { (x) } )
#define __pmd(x) ((pmd_t) { (x) } )
#define __pgd(x) ((pgd_t) { (x) } )
#define __pgprot(x) ((pgprot_t) { (x) } )
......@@ -52,171 +34,34 @@ typedef struct { unsigned long pgprot; } pgprot_t;
* .. while these make it easier on the compiler
*/
typedef unsigned long pte_t;
typedef unsigned long pmd_t;
typedef unsigned long pgd_t;
typedef unsigned long pgprot_t;
#define pte_val(x) (x)
#define pmd_val(x) (x)
#define pgd_val(x) (x)
#define pgprot_val(x) (x)
#define __pte(x) (x)
#define __pmd(x) (x)
#define __pgd(x) (x)
#define __pgprot(x) (x)
#endif
#define _PAGE_PRESENT 0x001
#define _PAGE_RW 0x002
#define _PAGE_USER 0x004
#define _PAGE_ACCESSED 0x020
#define _PAGE_DIRTY 0x040
#define _PAGE_COW 0x200 /* implemented in software (one of the AVL bits) */
#define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY)
#define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
#define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_ACCESSED)
#define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED)
#define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED | _PAGE_COW)
#define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | _PAGE_ACCESSED)
#define PAGE_KERNEL __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED)
/*
* The i386 can't do page protection for execute, and considers that the same are read.
* Also, write permissions imply read permissions. This is the closest we can get..
*/
#define __P000 PAGE_NONE
#define __P001 PAGE_READONLY
#define __P010 PAGE_COPY
#define __P011 PAGE_COPY
#define __P100 PAGE_READONLY
#define __P101 PAGE_READONLY
#define __P110 PAGE_COPY
#define __P111 PAGE_COPY
#define __S000 PAGE_NONE
#define __S001 PAGE_READONLY
#define __S010 PAGE_SHARED
#define __S011 PAGE_SHARED
#define __S100 PAGE_READONLY
#define __S101 PAGE_READONLY
#define __S110 PAGE_SHARED
#define __S111 PAGE_SHARED
/*
* Define this if things work differently on a i386 and a i486:
* it will (on a i486) warn about kernel memory accesses that are
* done without a 'verify_area(VERIFY_WRITE,..)'
*/
#undef CONFIG_TEST_VERIFY_AREA
/* page table for 0-4MB for everybody */
extern unsigned long pg0[1024];
/*
* BAD_PAGETABLE is used when we need a bogus page-table, while
* BAD_PAGE is used for a bogus page.
*
* ZERO_PAGE is a global shared page that is always zero: used
* for zero-mapped memory areas etc..
*/
extern pte_t __bad_page(void);
extern pte_t * __bad_pagetable(void);
extern unsigned long __zero_page(void);
#define BAD_PAGETABLE __bad_pagetable()
#define BAD_PAGE __bad_page()
#define ZERO_PAGE __zero_page()
/* number of bits that fit into a memory pointer */
#define BITS_PER_PTR (8*sizeof(unsigned long))
/* to mask away the intra-page address bits */
#define PAGE_MASK (~(PAGE_SIZE-1))
/* to mask away the intra-page address bits */
#define PGDIR_MASK (~(PGDIR_SIZE-1))
#define invalidate() \
__asm__ __volatile__("movl %%cr3,%%eax\n\tmovl %%eax,%%cr3": : :"ax")
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
/* to align the pointer to a pointer address */
#define PTR_MASK (~(sizeof(void*)-1))
/* sizeof(void*)==1<<SIZEOF_PTR_LOG2 */
/* 64-bit machines, beware! SRB. */
#define SIZEOF_PTR_LOG2 2
/* to find an entry in a page-table-directory */
#define PAGE_DIR_OFFSET(tsk,address) \
((((unsigned long)(address)) >> 22) + (pgd_t *) (tsk)->tss.cr3)
/* to find an entry in a page-table */
#define PAGE_PTR(address) \
((unsigned long)(address)>>(PAGE_SHIFT-SIZEOF_PTR_LOG2)&PTR_MASK&~PAGE_MASK)
/* the no. of pointers that fit on a page */
#define PTRS_PER_PAGE (PAGE_SIZE/sizeof(void*))
/* to set the page-dir */
#define SET_PAGE_DIR(tsk,pgdir) \
do { \
(tsk)->tss.cr3 = (unsigned long) (pgdir); \
if ((tsk) == current) \
__asm__ __volatile__("movl %0,%%cr3": :"a" ((tsk)->tss.cr3)); \
} while (0)
#define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK)
extern unsigned long high_memory;
/* This handles the memory map.. */
#define PAGE_OFFSET 0
#define MAP_NR(addr) (((unsigned long)(addr)) >> PAGE_SHIFT)
#define MAP_PAGE_RESERVED (1<<15)
extern inline int pte_none(pte_t pte) { return !pte_val(pte); }
extern inline int pte_present(pte_t pte) { return pte_val(pte) & _PAGE_PRESENT; }
extern inline void pte_clear(pte_t *ptep) { pte_val(*ptep) = 0; }
extern inline int pgd_none(pgd_t pgd) { return !pgd_val(pgd); }
extern inline int pgd_bad(pgd_t pgd) { return (pgd_val(pgd) & ~PAGE_MASK) != _PAGE_TABLE || pgd_val(pgd) > high_memory; }
extern inline int pgd_present(pgd_t pgd) { return pgd_val(pgd) & _PAGE_PRESENT; }
extern inline void pgd_clear(pgd_t * pgdp) { pgd_val(*pgdp) = 0; }
/*
* The following only work if pte_present() is true.
* Undefined behaviour if not..
*/
extern inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; }
extern inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
extern inline int pte_cow(pte_t pte) { return pte_val(pte) & _PAGE_COW; }
extern inline pte_t pte_wrprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_RW; return pte; }
extern inline pte_t pte_rdprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_USER; return pte; }
extern inline pte_t pte_exprotect(pte_t pte) { pte_val(pte) &= ~_PAGE_USER; return pte; }
extern inline pte_t pte_mkclean(pte_t pte) { pte_val(pte) &= ~_PAGE_DIRTY; return pte; }
extern inline pte_t pte_mkold(pte_t pte) { pte_val(pte) &= ~_PAGE_ACCESSED; return pte; }
extern inline pte_t pte_uncow(pte_t pte) { pte_val(pte) &= ~_PAGE_COW; return pte; }
extern inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_RW; return pte; }
extern inline pte_t pte_mkread(pte_t pte) { pte_val(pte) |= _PAGE_USER; return pte; }
extern inline pte_t pte_mkexec(pte_t pte) { pte_val(pte) |= _PAGE_USER; return pte; }
extern inline pte_t pte_mkdirty(pte_t pte) { pte_val(pte) |= _PAGE_DIRTY; return pte; }
extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= _PAGE_ACCESSED; return pte; }
extern inline pte_t pte_mkcow(pte_t pte) { pte_val(pte) |= _PAGE_COW; return pte; }
/*
* Conversion functions: convert a page and protection to a page entry,
* and a page entry and page directory to the page they refer to.
*/
extern inline pte_t mk_pte(unsigned long page, pgprot_t pgprot)
{ pte_t pte; pte_val(pte) = page | pgprot_val(pgprot); return pte; }
extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
{ pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot); return pte; }
extern inline unsigned long pte_page(pte_t pte) { return pte_val(pte) & PAGE_MASK; }
extern inline unsigned long pgd_page(pgd_t pgd) { return pgd_val(pgd) & PAGE_MASK; }
extern inline void pgd_set(pgd_t * pgdp, pte_t * ptep)
{ pgd_val(*pgdp) = _PAGE_TABLE | (unsigned long) ptep; }
typedef unsigned short mem_map_t;
#endif /* __KERNEL__ */
......
This diff is collapsed.
......@@ -50,7 +50,7 @@ typedef unsigned long pgprot_t;
/*
* Note that we shift the lower 32bits of each EntryLo[01] entry
* 6 bits to the left. That way we can convert the PFN into the
* physical address by a single 'and' operation and gain 6 aditional
* physical address by a single 'and' operation and gain 6 additional
* bits for storing information which isn't present in a normal
* MIPS page table.
*/
......
/* cprefix.h: This file is included by assembly source which needs
* to know what the c-label prefixes are. The newer versions
* of cpp that come with gcc predefine such things to help
* us out. The reason this stuff is neaded is to make
* us out. The reason this stuff is needed is to make
* solaris compiles of the kernel work.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
......@@ -19,7 +19,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* History: W.Zimmermann adaption to Aztech CD268-01A Version 1.3
* Oktober 1994 Email: zimmerma@rz.fht-esslingen.de
* October 1994 Email: zimmerma@rz.fht-esslingen.de
*/
/* *** change this to set the I/O port address */
......
This diff is collapsed.
......@@ -12,13 +12,31 @@
#define _MC146818RTC_H
#include <asm/io.h>
#define RTC_PORT(x) (0x70 + (x))
#define RTC_ADDR(x) (0x80 | (x))
#define RTC_ALWAYS_BCD 1
/*
* The Alpha Jensen hardware for some rather strange reason puts
* the RTC clock at 0x170 instead of 0x70. Probably due to some
* misguided idea about using 0x70 for NMI stuff.
*/
#ifdef __alpha__
#undef RTC_PORT
#undef RTC_ADDR
#undef RTC_ALWAYS_BCD
#define RTC_PORT(x) (0x170+(x))
#define RTC_ADDR(x) (x)
#define RTC_ALWAYS_BCD 0
#endif
#define CMOS_READ(addr) ({ \
outb_p(addr|0x80,0x70); \
inb_p(0x71); \
outb_p(RTC_ADDR(addr),RTC_PORT(0)); \
inb_p(RTC_PORT(1)); \
})
#define CMOS_WRITE(val, addr) ({ \
outb_p(addr|0x80,0x70); \
outb_p(val,0x71); \
outb_p(RTC_ADDR(addr),RTC_PORT(0)); \
outb_p(val,RTC_PORT(1)); \
})
/**********************************************************************
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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