Make everything compile with -Wtraditional. Make it easier to distribute
a binary link-kit. Make all non-optional options (pagers, procfs) standard, and update LINT to reflect new symtab requirements. NB: -Wtraditional will henceforth be forgotten. This editing pass was primarily intended to detect any constructions where the old code might have been relying on traditional C semantics or syntax. These were all fixed, and the result of fixing some of them means that -Wall is now a realistic possibility within a few weeks.
This commit is contained in:
parent
b39c878e2b
commit
aaf08d94ca
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=879
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
|
||||
* $Id: autoconf.c,v 1.4 1993/10/16 14:14:48 rgrimes Exp $
|
||||
* $Id: autoconf.c,v 1.5 1993/11/25 01:30:46 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -52,6 +52,7 @@
|
||||
#include "conf.h"
|
||||
#include "dmap.h"
|
||||
#include "reboot.h"
|
||||
#include "kernel.h"
|
||||
|
||||
#include "machine/pte.h"
|
||||
|
||||
|
@ -23,15 +23,16 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_disasm.c,v 1.3 1993/10/16 14:14:52 rgrimes Exp $
|
||||
* $Id: db_disasm.c,v 1.4 1993/11/25 01:30:51 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Instruction disassembler.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "proc.h"
|
||||
#include <machine/db_machdep.h>
|
||||
#include "ddb/ddb.h"
|
||||
|
||||
#include <ddb/db_access.h>
|
||||
#include <ddb/db_sym.h>
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_interface.c,v 1.3 1993/11/07 17:41:34 wollman Exp $
|
||||
* $Id: db_interface.c,v 1.4 1993/11/25 01:30:52 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -31,6 +31,7 @@
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "kernel.h"
|
||||
#include "proc.h"
|
||||
#include "ddb/ddb.h"
|
||||
|
||||
@ -235,7 +236,7 @@ db_write_bytes(addr, size, data)
|
||||
|
||||
void
|
||||
Debugger (msg)
|
||||
char *msg;
|
||||
const char *msg;
|
||||
{
|
||||
asm ("int $3");
|
||||
}
|
||||
|
@ -23,12 +23,13 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: db_trace.c,v 1.2 1993/10/16 14:14:56 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "proc.h"
|
||||
#include <machine/db_machdep.h>
|
||||
#include "ddb/ddb.h"
|
||||
|
||||
#include <ddb/db_access.h>
|
||||
#include <ddb/db_sym.h>
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.20 1993/12/03 05:07:43 alm Exp $
|
||||
* $Id: machdep.c,v 1.21 1993/12/12 12:22:56 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -85,6 +85,7 @@ static unsigned int avail_remaining;
|
||||
#include "machine/psl.h"
|
||||
#include "machine/specialreg.h"
|
||||
#include "machine/sysarch.h"
|
||||
#include "machine/cons.h"
|
||||
|
||||
#include "i386/isa/isa.h"
|
||||
#include "i386/isa/rtc.h"
|
||||
@ -156,10 +157,11 @@ cpu_startup()
|
||||
/* avail_end was pre-decremented in pmap_bootstrap to compensate */
|
||||
for (i = 0; i < btoc(sizeof (struct msgbuf)); i++)
|
||||
#ifndef MACHINE_NONCONTIG
|
||||
pmap_enter(pmap_kernel(), msgbufp, avail_end + i * NBPG,
|
||||
pmap_enter(pmap_kernel(), (vm_offset_t)msgbufp,
|
||||
avail_end + i * NBPG,
|
||||
VM_PROT_ALL, TRUE);
|
||||
#else
|
||||
pmap_enter(pmap_kernel(), (caddr_t)msgbufp + i * NBPG,
|
||||
pmap_enter(pmap_kernel(), (vm_offset_t)msgbufp + i * NBPG,
|
||||
avail_end + i * NBPG, VM_PROT_ALL, TRUE);
|
||||
#endif
|
||||
msgbufmapped = 1;
|
||||
@ -664,7 +666,7 @@ boot(arghowto)
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
unsigned dumpmag = 0x8fca0101; /* magic number for savecore */
|
||||
unsigned long dumpmag = 0x8fca0101UL; /* magic number for savecore */
|
||||
int dumpsize = 0; /* also for savecore */
|
||||
/*
|
||||
* Doadump comes here after turning off memory management and
|
||||
@ -929,7 +931,7 @@ struct soft_segment_descriptor ldt_segs[] = {
|
||||
void
|
||||
setidt(idx, func, typ, dpl)
|
||||
int idx;
|
||||
caddr_t func;
|
||||
void (*func)();
|
||||
int typ;
|
||||
int dpl;
|
||||
{
|
||||
@ -946,7 +948,10 @@ setidt(idx, func, typ, dpl)
|
||||
}
|
||||
|
||||
#define IDTVEC(name) __CONCAT(X, name)
|
||||
extern IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl),
|
||||
typedef void idtvec_t();
|
||||
|
||||
extern idtvec_t
|
||||
IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl),
|
||||
IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(dble), IDTVEC(fpusegm),
|
||||
IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot),
|
||||
IDTVEC(page), IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(rsvd0),
|
||||
@ -955,7 +960,6 @@ extern IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl),
|
||||
IDTVEC(rsvd9), IDTVEC(rsvd10), IDTVEC(rsvd11), IDTVEC(rsvd12),
|
||||
IDTVEC(rsvd13), IDTVEC(rsvd14), IDTVEC(rsvd14), IDTVEC(syscall);
|
||||
|
||||
int lcr0(), lcr3(), rcr0(), rcr2();
|
||||
int _gsel_tss;
|
||||
|
||||
void
|
||||
@ -986,7 +990,7 @@ init386(first)
|
||||
* the address space
|
||||
*/
|
||||
gdt_segs[GCODE_SEL].ssd_limit = i386_btop(i386_round_page(&etext)) - 1;
|
||||
gdt_segs[GDATA_SEL].ssd_limit = 0xffffffff; /* XXX constant? */
|
||||
gdt_segs[GDATA_SEL].ssd_limit = 0xffffffffUL; /* XXX constant? */
|
||||
for (x=0; x < NGDT; x++) ssdtosd(gdt_segs+x, gdt+x);
|
||||
/* make ldt memory segments */
|
||||
/*
|
||||
@ -1065,7 +1069,7 @@ init386(first)
|
||||
#if NDDB > 0
|
||||
kdb_init();
|
||||
if (boothowto & RB_KDB)
|
||||
Debugger();
|
||||
Debugger("Boot flags requested debugger");
|
||||
#endif
|
||||
|
||||
/* Use BIOS values stored in RTC CMOS RAM, since probing
|
||||
@ -1485,4 +1489,14 @@ copystr(fromaddr, toaddr, maxlength, lencopied) u_int *lencopied, maxlength;
|
||||
if(lencopied) *lencopied = tally;
|
||||
return(ENAMETOOLONG);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#include "ddb.h"
|
||||
#if NDDB <= 0
|
||||
void
|
||||
Debugger(const char *msg)
|
||||
{
|
||||
printf("Debugger(\"%s\") called.", msg);
|
||||
}
|
||||
#endif /* no DDB */
|
||||
|
@ -38,7 +38,7 @@
|
||||
*
|
||||
* from: Utah $Hdr: mem.c 1.13 89/10/08$
|
||||
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: mem.c,v 1.4 1993/11/22 09:46:45 davidg Exp $
|
||||
* $Id: mem.c,v 1.5 1993/11/25 01:30:59 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -59,8 +59,8 @@
|
||||
#include "vm/vm_param.h"
|
||||
#include "vm/lock.h"
|
||||
#include "vm/vm_statistics.h"
|
||||
#include "vm/pmap.h"
|
||||
#include "vm/vm_prot.h"
|
||||
#include "vm/pmap.h"
|
||||
|
||||
extern char *vmmap; /* poor name! */
|
||||
/*ARGSUSED*/
|
||||
@ -128,7 +128,7 @@ mmrw(dev, uio, flags)
|
||||
/* minor device 0 is physical memory */
|
||||
case 0:
|
||||
v = uio->uio_offset;
|
||||
pmap_enter(pmap_kernel(), vmmap, v,
|
||||
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, v,
|
||||
uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE,
|
||||
TRUE);
|
||||
o = (int)uio->uio_offset & PGOFSET;
|
||||
@ -136,7 +136,8 @@ mmrw(dev, uio, flags)
|
||||
c = MIN(c, (u_int)(NBPG - o));
|
||||
c = MIN(c, (u_int)iov->iov_len);
|
||||
error = uiomove((caddr_t)&vmmap[o], (int)c, uio);
|
||||
pmap_remove(pmap_kernel(), vmmap, &vmmap[NBPG]);
|
||||
pmap_remove(pmap_kernel(), (vm_offset_t)vmmap,
|
||||
(vm_offset_t)&vmmap[NBPG]);
|
||||
continue;
|
||||
|
||||
/* minor device 1 is kernel memory */
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.9 1993/11/25 01:31:00 wollman Exp $
|
||||
* $Id: pmap.c,v 1.10 1993/12/13 07:02:27 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -80,6 +80,7 @@
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "kernel.h"
|
||||
#include "proc.h"
|
||||
#include "malloc.h"
|
||||
#include "user.h"
|
||||
@ -92,7 +93,6 @@
|
||||
#include "i386/isa/isa.h"
|
||||
|
||||
static void i386_protection_init(void);
|
||||
static void pmap_changebit(vm_offset_t, int, boolean_t);
|
||||
|
||||
/*
|
||||
* Allocate various and sundry SYSMAPs used in the days of old VM
|
||||
@ -459,7 +459,8 @@ pmap_pinit(pmap)
|
||||
|
||||
/* install self-referential address mapping entry */
|
||||
*(int *)(pmap->pm_pdir+PTDPTDI) =
|
||||
(int)pmap_extract(kernel_pmap, pmap->pm_pdir) | PG_V | PG_KW;
|
||||
(int)pmap_extract(kernel_pmap, (vm_offset_t)pmap->pm_pdir)
|
||||
| PG_V | PG_KW;
|
||||
|
||||
pmap->pm_count = 1;
|
||||
simple_lock_init(&pmap->pm_lock);
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.10 1993/12/03 05:07:45 alm Exp $
|
||||
* $Id: trap.c,v 1.11 1993/12/12 12:22:57 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -59,6 +59,7 @@
|
||||
#include "vm/vm_param.h"
|
||||
#include "vm/pmap.h"
|
||||
#include "vm/vm_map.h"
|
||||
#include "vm/vm_user.h"
|
||||
#include "sys/vmmeter.h"
|
||||
|
||||
#include "machine/trap.h"
|
||||
@ -70,7 +71,7 @@
|
||||
* we omit the size from the mov instruction to avoid nonfatal bugs in gas.
|
||||
*/
|
||||
#define read_gs() ({ u_short gs; __asm("mov %%gs,%0" : "=r" (gs)); gs; })
|
||||
#define write_gs(gs) __asm("mov %0,%%gs" : : "r" ((u_short) gs))
|
||||
#define write_gs(newgs) __asm("mov %0,%%gs" : : "r" ((u_short) newgs))
|
||||
|
||||
#else /* not __GNUC__ */
|
||||
|
||||
@ -81,7 +82,6 @@ void write_gs __P((/* promoted u_short */ int gs));
|
||||
|
||||
struct sysent sysent[];
|
||||
int nsysent;
|
||||
unsigned rcr2();
|
||||
extern short cpl;
|
||||
|
||||
#define MAX_TRAP_MSG 27
|
||||
@ -353,7 +353,8 @@ if(curpcb == 0 || curproc == 0) goto we_re_toast;
|
||||
v = vm->vm_maxsaddr;
|
||||
grow_amount = MAXSSIZ - (vm->vm_ssize << PGSHIFT);
|
||||
}
|
||||
if (vm_allocate(&vm->vm_map, &v, grow_amount, FALSE) !=
|
||||
if (vm_allocate(&vm->vm_map, (vm_offset_t *)&v,
|
||||
grow_amount, FALSE) !=
|
||||
KERN_SUCCESS) {
|
||||
goto nogo;
|
||||
}
|
||||
@ -363,10 +364,11 @@ if(curpcb == 0 || curproc == 0) goto we_re_toast;
|
||||
/* check if page table is mapped, if not, fault it first */
|
||||
if (!pde_v(va)) {
|
||||
v = (char *)trunc_page(vtopte(va));
|
||||
rv = vm_fault(map, v, ftype, FALSE);
|
||||
rv = vm_fault(map, (vm_offset_t)v, ftype, FALSE);
|
||||
if (rv != KERN_SUCCESS) goto nogo;
|
||||
/* check if page table fault, increment wiring */
|
||||
vm_map_pageable(map, v, round_page(v+1), FALSE);
|
||||
vm_map_pageable(map, (vm_offset_t)v,
|
||||
round_page(v+1), FALSE);
|
||||
} else v=0;
|
||||
rv = vm_fault(map, va, ftype, FALSE);
|
||||
if (rv == KERN_SUCCESS) {
|
||||
@ -543,8 +545,9 @@ int trapwrite(addr)
|
||||
v = vm->vm_maxsaddr;
|
||||
grow_amount = MAXSSIZ - (vm->vm_ssize << PGSHIFT);
|
||||
}
|
||||
if (vm_allocate(&vm->vm_map, &v, grow_amount, FALSE) !=
|
||||
KERN_SUCCESS) {
|
||||
if (vm_allocate(&vm->vm_map, (vm_offset_t *)&v,
|
||||
grow_amount, FALSE)
|
||||
!= KERN_SUCCESS) {
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
@ -613,13 +616,13 @@ syscall(frame)
|
||||
frame.sf_eflags |= PSL_C; /* carry bit */
|
||||
#ifdef KTRACE
|
||||
if (KTRPOINT(p, KTR_SYSCALL))
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, &args);
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, args);
|
||||
#endif
|
||||
goto done;
|
||||
}
|
||||
#ifdef KTRACE
|
||||
if (KTRPOINT(p, KTR_SYSCALL))
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, &args);
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, args);
|
||||
#endif
|
||||
rval[0] = 0;
|
||||
rval[1] = frame.sf_edx;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.3 1993/11/04 01:56:31 ache Exp $
|
||||
* $Id: clock.c,v 1.4 1993/11/25 01:31:29 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -233,7 +233,7 @@ resettodr()
|
||||
* Wire clock interrupt in.
|
||||
*/
|
||||
#define V(s) __CONCAT(V, s)
|
||||
extern V(clk)();
|
||||
extern void V(clk)();
|
||||
|
||||
void
|
||||
enablertclock()
|
||||
|
@ -37,7 +37,7 @@
|
||||
*
|
||||
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
|
||||
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
|
||||
* $Id: vm_machdep.c,v 1.6 1993/10/15 10:34:29 rgrimes Exp $
|
||||
* $Id: vm_machdep.c,v 1.7 1993/11/25 01:31:02 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -95,7 +95,7 @@ cpu_fork(p1, p2)
|
||||
addr = trunc_page((u_int)vtopte(kstack));
|
||||
vm_map_pageable(&p2->p_vmspace->vm_map, addr, addr+NBPG, FALSE);
|
||||
for (i=0; i < UPAGES; i++)
|
||||
pmap_enter(&p2->p_vmspace->vm_pmap, kstack+i*NBPG,
|
||||
pmap_enter(&p2->p_vmspace->vm_pmap, (vm_offset_t)kstack+i*NBPG,
|
||||
pmap_extract(kernel_pmap, ((int)p2->p_addr)+i*NBPG),
|
||||
/*
|
||||
* The user area has to be mapped writable because
|
||||
@ -236,16 +236,16 @@ pagemove(from, to, size)
|
||||
/*
|
||||
* Convert kernel VA to physical address
|
||||
*/
|
||||
int
|
||||
u_long
|
||||
kvtop(addr)
|
||||
register caddr_t addr;
|
||||
register void *addr;
|
||||
{
|
||||
vm_offset_t va;
|
||||
|
||||
va = pmap_extract(kernel_pmap, (vm_offset_t)addr);
|
||||
if (va == 0)
|
||||
panic("kvtop: zero page frame");
|
||||
return((int)va);
|
||||
return((u_long)va);
|
||||
}
|
||||
|
||||
#ifdef notdef
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Functions to provide access to special i386 instructions.
|
||||
* XXX - bezillions more are defined in locore.s but are not declared anywhere.
|
||||
*
|
||||
* $Id: cpufunc.h,v 1.4 1993/11/07 17:42:47 wollman Exp $
|
||||
* $Id: cpufunc.h,v 1.5 1993/11/25 01:31:07 wollman Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_CPUFUNC_H_
|
||||
@ -177,7 +177,34 @@ strlen(s1)
|
||||
return (len);
|
||||
}
|
||||
|
||||
struct quehead {
|
||||
struct quehead *qh_link;
|
||||
struct quehead *qh_rlink;
|
||||
};
|
||||
|
||||
static inline void
|
||||
insque(void *a, void *b)
|
||||
{
|
||||
register struct quehead *element = a, *head = b;
|
||||
element->qh_link = head->qh_link;
|
||||
head->qh_link = (struct quehead *)element;
|
||||
element->qh_rlink = (struct quehead *)head;
|
||||
((struct quehead *)(element->qh_link))->qh_rlink
|
||||
= (struct quehead *)element;
|
||||
}
|
||||
|
||||
static inline void
|
||||
remque(void *a)
|
||||
{
|
||||
register struct quehead *element = a;
|
||||
((struct quehead *)(element->qh_link))->qh_rlink = element->qh_rlink;
|
||||
((struct quehead *)(element->qh_rlink))->qh_link = element->qh_link;
|
||||
element->qh_rlink = 0;
|
||||
}
|
||||
|
||||
#else /* not __GNUC__ */
|
||||
extern void insque __P((void *, void *));
|
||||
extern void remque __P((void *));
|
||||
|
||||
int bdb __P((void));
|
||||
void disable_intr __P((void));
|
||||
@ -187,17 +214,19 @@ void outb __P((u_int port, u_int data)); /* XXX - incompat */
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#define really_u_int int /* XXX */
|
||||
#define really_void int /* XXX */
|
||||
|
||||
void load_cr0 __P((u_int cr0));
|
||||
really_u_int rcr0 __P((void));
|
||||
u_int rcr0 __P((void));
|
||||
void load_cr3(u_long);
|
||||
u_long rcr3(void);
|
||||
u_long rcr2(void);
|
||||
|
||||
#ifdef notyet
|
||||
really_void setidt __P((int idx, /*XXX*/caddr_t func, int typ, int dpl));
|
||||
#endif
|
||||
|
||||
#undef really_u_int
|
||||
#undef really_void
|
||||
void setidt __P((int, void (*)(), int, int));
|
||||
extern u_long kvtop(void *);
|
||||
extern void tlbflush(void);
|
||||
extern void outw(int /*u_short*/, int /*u_short*/); /* XXX inline!*/
|
||||
extern void outsb(int /*u_short*/, caddr_t, size_t);
|
||||
extern void outsw(int /*u_short*/, caddr_t, size_t);
|
||||
extern void insw(int /*u_short*/, caddr_t, size_t);
|
||||
extern void fillw(int /*u_short*/, caddr_t, size_t);
|
||||
|
||||
#endif /* _MACHINE_CPUFUNC_H_ */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)frame.h 5.2 (Berkeley) 1/18/91
|
||||
* $Id: frame.h,v 1.4 1993/11/17 23:25:03 wollman Exp $
|
||||
* $Id: frame.h,v 1.5 1993/12/03 05:10:00 alm Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_FRAME_H_
|
||||
@ -72,6 +72,8 @@ struct trapframe {
|
||||
int tf_ss;
|
||||
};
|
||||
|
||||
extern int kdb_trap(int, int, struct trapframe *);
|
||||
|
||||
/* Interrupt stack frame */
|
||||
|
||||
struct intrframe {
|
||||
|
@ -42,7 +42,7 @@
|
||||
*
|
||||
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
|
||||
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
|
||||
* $Id: pmap.h,v 1.5 1993/11/07 17:43:02 wollman Exp $
|
||||
* $Id: pmap.h,v 1.6 1993/11/13 02:25:16 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef _PMAP_MACHINE_
|
||||
@ -65,8 +65,8 @@ unsigned int
|
||||
pd_pfnum:20; /* physical page frame number of pte's*/
|
||||
};
|
||||
|
||||
#define PD_MASK 0xffc00000 /* page directory address bits */
|
||||
#define PT_MASK 0x003ff000 /* page table address bits */
|
||||
#define PD_MASK 0xffc00000UL /* page directory address bits */
|
||||
#define PT_MASK 0x003ff000UL /* page table address bits */
|
||||
#define PD_SHIFT 22 /* page directory address shift */
|
||||
#define PG_SHIFT 12 /* page table address shift */
|
||||
|
||||
@ -94,7 +94,7 @@ unsigned int
|
||||
#define PG_N 0x00000800 /* Non-cacheable */
|
||||
#define PG_M 0x00000040
|
||||
#define PG_U 0x00000020
|
||||
#define PG_FRAME 0xfffff000
|
||||
#define PG_FRAME 0xfffff000UL
|
||||
|
||||
#define PG_NOACC 0
|
||||
#define PG_KR 0x00000000
|
||||
@ -199,7 +199,7 @@ extern pmap_t kernel_pmap;
|
||||
#define PMAP_ACTIVATE(pmapp, pcbp) \
|
||||
if ((pmapp) != NULL /*&& (pmapp)->pm_pdchanged */) { \
|
||||
(pcbp)->pcb_cr3 = \
|
||||
pmap_extract(kernel_pmap, (pmapp)->pm_pdir); \
|
||||
pmap_extract(kernel_pmap, (vm_offset_t)(pmapp)->pm_pdir); \
|
||||
if ((pmapp) == &curproc->p_vmspace->vm_pmap) \
|
||||
load_cr3((pcbp)->pcb_cr3); \
|
||||
(pmapp)->pm_pdchanged = FALSE; \
|
||||
@ -232,6 +232,24 @@ pv_entry_t pv_table; /* array of entries, one per page */
|
||||
|
||||
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
|
||||
|
||||
extern pmap_t pmap_create(vm_size_t);
|
||||
extern void pmap_pinit(struct pmap *);
|
||||
extern void pmap_destroy(pmap_t);
|
||||
extern void pmap_release(struct pmap *);
|
||||
extern void pmap_reference(pmap_t);
|
||||
extern void pmap_remove(struct pmap *, vm_offset_t, vm_offset_t);
|
||||
extern void pmap_protect(struct pmap *, vm_offset_t, vm_offset_t, vm_prot_t);
|
||||
extern void pmap_enter(pmap_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t);
|
||||
extern void pmap_change_wiring(pmap_t, vm_offset_t, boolean_t);
|
||||
extern struct pte *pmap_pte(pmap_t, vm_offset_t);
|
||||
extern vm_offset_t pmap_extract(pmap_t, vm_offset_t);
|
||||
extern void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t);
|
||||
extern void pmap_collect(pmap_t);
|
||||
struct pcb; extern void pmap_activate(pmap_t, struct pcb *);
|
||||
extern pmap_t pmap_kernel(void);
|
||||
extern void pmap_pageable(pmap_t, vm_offset_t, vm_offset_t, boolean_t);
|
||||
|
||||
|
||||
#endif /* KERNEL */
|
||||
|
||||
#endif /* _PMAP_MACHINE_ */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91
|
||||
* $Id: vmparam.h,v 1.7 1993/10/15 10:07:45 rgrimes Exp $
|
||||
* $Id: vmparam.h,v 1.8 1993/11/07 17:43:17 wollman Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -56,27 +56,27 @@
|
||||
* Immediately after the user structure is the page table map, and then
|
||||
* kernal address space.
|
||||
*/
|
||||
#define USRTEXT 0
|
||||
#define USRSTACK 0xFDBFE000
|
||||
#define USRTEXT 0UL
|
||||
#define USRSTACK 0xFDBFE000UL
|
||||
#define BTOPUSRSTACK (0xFDC00-(UPAGES)) /* btop(USRSTACK) */
|
||||
#define LOWPAGES 0
|
||||
#define LOWPAGES 0UL
|
||||
#define HIGHPAGES UPAGES
|
||||
|
||||
/*
|
||||
* Virtual memory related constants, all in bytes
|
||||
*/
|
||||
#define MAXTSIZ (6*1024*1024) /* max text size */
|
||||
#define MAXTSIZ (6UL*1024*1024) /* max text size */
|
||||
#ifndef DFLDSIZ
|
||||
#define DFLDSIZ (16*1024*1024) /* initial data size limit */
|
||||
#define DFLDSIZ (16UL*1024*1024) /* initial data size limit */
|
||||
#endif
|
||||
#ifndef MAXDSIZ
|
||||
#define MAXDSIZ (32*1024*1024) /* max data size */
|
||||
#define MAXDSIZ (32UL*1024*1024) /* max data size */
|
||||
#endif
|
||||
#ifndef DFLSSIZ
|
||||
#define DFLSSIZ (512*1024) /* initial stack size limit */
|
||||
#define DFLSSIZ (512UL*1024) /* initial stack size limit */
|
||||
#endif
|
||||
#ifndef MAXSSIZ
|
||||
#define MAXSSIZ (8*1024*1024) /* max stack size */
|
||||
#define MAXSSIZ (8UL*1024*1024) /* max stack size */
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -211,15 +211,15 @@
|
||||
|
||||
/* user/kernel map constants */
|
||||
#define VM_MIN_ADDRESS ((vm_offset_t)0)
|
||||
#define VM_MAXUSER_ADDRESS ((vm_offset_t)0xFDBFE000)
|
||||
#define UPT_MIN_ADDRESS ((vm_offset_t)0xFDC00000)
|
||||
#define UPT_MAX_ADDRESS ((vm_offset_t)0xFDFF7000)
|
||||
#define VM_MAXUSER_ADDRESS ((vm_offset_t)0xFDBFE000UL)
|
||||
#define UPT_MIN_ADDRESS ((vm_offset_t)0xFDC00000UL)
|
||||
#define UPT_MAX_ADDRESS ((vm_offset_t)0xFDFF7000UL)
|
||||
#define VM_MAX_ADDRESS UPT_MAX_ADDRESS
|
||||
#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xFDFF7000)
|
||||
#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xFDFF7000UL)
|
||||
#define UPDT VM_MIN_KERNEL_ADDRESS
|
||||
#define KPT_MIN_ADDRESS ((vm_offset_t)0xFDFF8000)
|
||||
#define KPT_MAX_ADDRESS ((vm_offset_t)0xFDFFF000)
|
||||
#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFF7FF000)
|
||||
#define KPT_MIN_ADDRESS ((vm_offset_t)0xFDFF8000UL)
|
||||
#define KPT_MAX_ADDRESS ((vm_offset_t)0xFDFFF000UL)
|
||||
#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFF7FF000UL)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.3 1993/11/04 01:56:31 ache Exp $
|
||||
* $Id: clock.c,v 1.4 1993/11/25 01:31:29 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -233,7 +233,7 @@ resettodr()
|
||||
* Wire clock interrupt in.
|
||||
*/
|
||||
#define V(s) __CONCAT(V, s)
|
||||
extern V(clk)();
|
||||
extern void V(clk)();
|
||||
|
||||
void
|
||||
enablertclock()
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
|
||||
* $Id: isa.c,v 1.9 1993/11/17 00:21:03 ache Exp $
|
||||
* $Id: isa.c,v 1.10 1993/11/25 01:31:39 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -322,19 +322,22 @@ config_isadev(isdp, mp)
|
||||
|
||||
#define IDTVEC(name) __CONCAT(X,name)
|
||||
/* default interrupt vector table entries */
|
||||
extern IDTVEC(intr0), IDTVEC(intr1), IDTVEC(intr2), IDTVEC(intr3),
|
||||
typedef void inthand_t();
|
||||
typedef void (*inthand_func_t)();
|
||||
extern inthand_t
|
||||
IDTVEC(intr0), IDTVEC(intr1), IDTVEC(intr2), IDTVEC(intr3),
|
||||
IDTVEC(intr4), IDTVEC(intr5), IDTVEC(intr6), IDTVEC(intr7),
|
||||
IDTVEC(intr8), IDTVEC(intr9), IDTVEC(intr10), IDTVEC(intr11),
|
||||
IDTVEC(intr12), IDTVEC(intr13), IDTVEC(intr14), IDTVEC(intr15);
|
||||
|
||||
static *defvec[16] = {
|
||||
static inthand_func_t defvec[16] = {
|
||||
&IDTVEC(intr0), &IDTVEC(intr1), &IDTVEC(intr2), &IDTVEC(intr3),
|
||||
&IDTVEC(intr4), &IDTVEC(intr5), &IDTVEC(intr6), &IDTVEC(intr7),
|
||||
&IDTVEC(intr8), &IDTVEC(intr9), &IDTVEC(intr10), &IDTVEC(intr11),
|
||||
&IDTVEC(intr12), &IDTVEC(intr13), &IDTVEC(intr14), &IDTVEC(intr15) };
|
||||
|
||||
/* out of range default interrupt vector gate entry */
|
||||
extern IDTVEC(intrdefault);
|
||||
extern inthand_t IDTVEC(intrdefault);
|
||||
|
||||
/*
|
||||
* Fill in default interrupt table (in case of spuruious interrupt
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Copyright 1990 W. Jolitz
|
||||
# from: @(#)Makefile.i386 7.1 5/10/91
|
||||
# $Id: Makefile.i386,v 1.16 1993/11/25 01:30:38 wollman Exp $
|
||||
# $Id: Makefile.i386,v 1.17 1993/12/12 12:22:28 davidg Exp $
|
||||
#
|
||||
# Makefile for FreeBSD
|
||||
#
|
||||
@ -33,7 +33,7 @@ I386= ../../i386
|
||||
CWARNFLAGS=-W -Wreturn-type -Wcomment
|
||||
#
|
||||
# The following flags are next up for working on:
|
||||
# -Wtraditional -Wredundant-decls -Wnested-externs
|
||||
# -Wredundant-decls -Wnested-externs
|
||||
#
|
||||
# When working on removing warnings from code, the `-Werror' flag should be
|
||||
# of material assistance.
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Copyright 1990 W. Jolitz
|
||||
# from: @(#)Makefile.i386 7.1 5/10/91
|
||||
# $Id: Makefile.i386,v 1.16 1993/11/25 01:30:38 wollman Exp $
|
||||
# $Id: Makefile.i386,v 1.17 1993/12/12 12:22:28 davidg Exp $
|
||||
#
|
||||
# Makefile for FreeBSD
|
||||
#
|
||||
@ -33,7 +33,7 @@ I386= ../../i386
|
||||
CWARNFLAGS=-W -Wreturn-type -Wcomment
|
||||
#
|
||||
# The following flags are next up for working on:
|
||||
# -Wtraditional -Wredundant-decls -Wnested-externs
|
||||
# -Wredundant-decls -Wnested-externs
|
||||
#
|
||||
# When working on removing warnings from code, the `-Werror' flag should be
|
||||
# of material assistance.
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# This kernel is NOT MEANT to be runnable!
|
||||
#
|
||||
# $Id: LINT,v 1.31 1993/12/06 01:57:16 wollman Exp $
|
||||
# $Id: LINT,v 1.32 1993/12/12 12:22:27 davidg Exp $
|
||||
#
|
||||
|
||||
machine "i386"
|
||||
@ -24,7 +24,7 @@ config "386bsd" at 0xFE100000 root on wd0 swap on wd0 and sd0
|
||||
options "COM_BIDIR" #Bidirectional support in sys/isa/sio.c
|
||||
options "COM_MULTIPORT" #Multiport support in sys/isa/sio.c
|
||||
options "COMPAT_43" #compatible with BSD 4.3
|
||||
options "SYMTAB_SPACE=103365" #This kernel needs LOTS of symtable
|
||||
options "SYMTAB_SPACE=103939" #This kernel needs LOTS of symtable
|
||||
options GATEWAY #internetwork gateway
|
||||
options KTRACE #kernel tracing
|
||||
options "NCONS=8" #number of syscons virtual consoles
|
||||
@ -70,7 +70,7 @@ options NFS #Network File System
|
||||
options NS #Xerox NS communications protocols
|
||||
options NSIP #XNS over IP
|
||||
options PCFS #PC (MSDOS) File System
|
||||
options PROCFS #Proc File System
|
||||
#options PROCFS #Proc File System
|
||||
pseudo-device ppp 2
|
||||
pseudo-device pty 4
|
||||
options QUOTA #enable disk quotas
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_access.c,v 1.2 1993/10/16 16:47:04 rgrimes Exp $
|
||||
* $Id: db_access.c,v 1.3 1993/11/25 01:30:01 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -31,8 +31,9 @@
|
||||
* Date: 7/90
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "proc.h"
|
||||
#include <machine/db_machdep.h> /* type definitions */
|
||||
#include "ddb/ddb.h"
|
||||
|
||||
/*
|
||||
* Access unaligned data items on aligned (longword)
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_examine.c,v 1.2 1993/10/16 16:47:13 rgrimes Exp $
|
||||
* $Id: db_examine.c,v 1.3 1993/11/25 01:30:05 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -36,10 +36,11 @@
|
||||
|
||||
#include "ddb/ddb.h"
|
||||
|
||||
#include <ddb/db_lex.h>
|
||||
#include <ddb/db_output.h>
|
||||
#include <ddb/db_command.h>
|
||||
#include <ddb/db_sym.h>
|
||||
#include "ddb/db_lex.h"
|
||||
#include "ddb/db_output.h"
|
||||
#include "ddb/db_command.h"
|
||||
#include "ddb/db_sym.h"
|
||||
#include "ddb/db_access.h"
|
||||
|
||||
char db_examine_format[TOK_STRING_SIZE] = "x";
|
||||
|
||||
@ -302,7 +303,7 @@ db_search_cmd(db_expr_t dummy1, int dummy2, db_expr_t dummy3, char *dummy4)
|
||||
}
|
||||
|
||||
if (!db_expression(&mask))
|
||||
mask = 0xffffffff;
|
||||
mask = 0xffffffffUL;
|
||||
|
||||
t = db_read_token();
|
||||
if (t == tCOMMA) {
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_input.c,v 1.2 1993/10/16 16:47:16 rgrimes Exp $
|
||||
* $Id: db_input.c,v 1.3 1993/11/25 01:30:06 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -35,7 +35,8 @@
|
||||
#include "systm.h"
|
||||
#include "proc.h"
|
||||
#include "ddb/ddb.h"
|
||||
#include <ddb/db_output.h>
|
||||
#include "ddb/db_output.h"
|
||||
#include "machine/cons.h"
|
||||
|
||||
/*
|
||||
* Character input and editing.
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_output.c,v 1.4 1993/10/16 16:47:20 rgrimes Exp $
|
||||
* $Id: db_output.c,v 1.5 1993/11/25 01:30:08 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -37,8 +37,9 @@
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include <machine/stdarg.h>
|
||||
#include "machine/stdarg.h"
|
||||
#include "ddb/ddb.h"
|
||||
#include "machine/cons.h"
|
||||
|
||||
/*
|
||||
* Character output - tracks position in line.
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: if_ed.c,v 2.16 1993/11/29 16:55:56 davidg Exp davidg $
|
||||
* $Id: if_ed.c,v 1.25 1993/11/29 17:07:26 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1596,7 +1596,7 @@ ed_start(ifp)
|
||||
|
||||
/* copy trailer_header into a data structure */
|
||||
m_copydata(m0, off, sizeof(struct trailer_header),
|
||||
&trailer_header.ether_type);
|
||||
(caddr_t)&trailer_header.ether_type);
|
||||
|
||||
/* copy residual data */
|
||||
m_copydata(m0, off+sizeof(struct trailer_header),
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
* $Id: fd.c,v 1.14 1993/12/16 19:47:42 ache Exp $
|
||||
* $Id: fd.c,v 1.16 1993/12/19 00:40:49 ache Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -165,6 +165,8 @@ typedef int fdsu_t;
|
||||
typedef struct fd_data *fd_p;
|
||||
typedef struct fdc_data *fdc_p;
|
||||
|
||||
static int retrier(fdcu_t);
|
||||
|
||||
#define DEVIDLE 0
|
||||
#define FINDWORK 1
|
||||
#define DOSEEK 2
|
||||
@ -391,7 +393,7 @@ void fdstrategy(struct buf *bp)
|
||||
dp = &(fdc->head);
|
||||
s = splbio();
|
||||
disksort(dp, bp);
|
||||
untimeout(fd_turnoff,fdu); /* a good idea */
|
||||
untimeout(fd_turnoff, (caddr_t)fdu); /* a good idea */
|
||||
fdstart(fdcu);
|
||||
splx(s);
|
||||
return;
|
||||
@ -762,7 +764,7 @@ fdstate(fdcu, fdc)
|
||||
TRACE1("fd%d",fdu);
|
||||
TRACE1("[%s]",fdstates[fdc->state]);
|
||||
TRACE1("(0x%x)",fd->flags);
|
||||
untimeout(fd_turnoff, fdu);
|
||||
untimeout(fd_turnoff, (caddr_t)fdu);
|
||||
timeout(fd_turnoff, (caddr_t)fdu, 4 * hz);
|
||||
switch (fdc->state)
|
||||
{
|
||||
@ -810,7 +812,7 @@ fdstate(fdcu, fdc)
|
||||
timeout(fd_timeout, (caddr_t)fdcu, 2 * hz);
|
||||
return(0); /* will return later */
|
||||
case SEEKWAIT:
|
||||
untimeout(fd_timeout,fdcu);
|
||||
untimeout(fd_timeout, (caddr_t)fdcu);
|
||||
/* allow heads to settle */
|
||||
timeout(fd_pseudointr, (caddr_t)fdcu, hz / 50);
|
||||
fdc->state = SEEKCOMPLETE;
|
||||
@ -883,7 +885,7 @@ fdstate(fdcu, fdc)
|
||||
timeout(fd_timeout, (caddr_t)fdcu, 2 * hz);
|
||||
return(0); /* will return later */
|
||||
case IOCOMPLETE: /* IO DONE, post-analyze */
|
||||
untimeout(fd_timeout,fdcu);
|
||||
untimeout(fd_timeout, (caddr_t)fdcu);
|
||||
for(i=0;i<7;i++)
|
||||
{
|
||||
fdc->status[i] = in_fdc(fdcu);
|
||||
@ -994,7 +996,7 @@ fdstate(fdcu, fdc)
|
||||
return(1); /* Come back immediatly to new state */
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
retrier(fdcu)
|
||||
fdcu_t fdcu;
|
||||
{
|
||||
|
@ -34,7 +34,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mcd.c,v 1.2 1993/10/16 13:46:13 rgrimes Exp $
|
||||
* $Id: mcd.c,v 1.3 1993/11/25 01:31:43 wollman Exp $
|
||||
*/
|
||||
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
|
||||
|
||||
@ -68,7 +68,7 @@ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
|
||||
#undef MCD_TO_WARNING_ON
|
||||
#endif
|
||||
#else
|
||||
#define MCD_TRACE(fmt,a,b,c,d) {if (mcd_data[unit].debug) {printf("mcd%d st=%02x: ",unit,mcd_data[unit].status); printf(fmt,a,b,c,d);}}
|
||||
#define MCD_TRACE(fmt,a,b,c,xd) {if (mcd_data[unit].debug) {printf("mcd%d st=%02x: ",unit,mcd_data[unit].status); printf(fmt,a,b,c,xd);}}
|
||||
#endif
|
||||
|
||||
#define mcd_part(dev) ((minor(dev)) & 7)
|
||||
@ -158,7 +158,7 @@ static void hsg2msf(int hsg, bcd_t *msf);
|
||||
static int msf2hsg(bcd_t *msf);
|
||||
static int mcd_volinfo(int unit);
|
||||
static int mcd_waitrdy(int port,int dly);
|
||||
static void mcd_doread(int state, struct mcd_mbx *mbxin);
|
||||
static void mcd_doread(caddr_t, int);
|
||||
#ifndef MCDMINI
|
||||
static int mcd_setmode(int unit, int mode);
|
||||
static int mcd_getqchan(int unit, struct mcd_qchninfo *q);
|
||||
@ -397,7 +397,7 @@ static void mcd_start(int unit)
|
||||
cd->mbx.p_offset = p->p_offset;
|
||||
|
||||
/* calling the read routine */
|
||||
mcd_doread(MCD_S_BEGIN,&(cd->mbx));
|
||||
mcd_doread((caddr_t)MCD_S_BEGIN, (int)&(cd->mbx));
|
||||
/* triggers mcd_start, when successful finished */
|
||||
return;
|
||||
}
|
||||
@ -811,8 +811,13 @@ mcdintr(unit)
|
||||
*/
|
||||
static struct mcd_mbx *mbxsave;
|
||||
|
||||
static void mcd_doread(int state, struct mcd_mbx *mbxin)
|
||||
/*
|
||||
* Good thing Alphas come with real CD players...
|
||||
*/
|
||||
static void mcd_doread(caddr_t xstate, int xmbxin)
|
||||
{
|
||||
int state = (int)xstate;
|
||||
struct mcd_mbx *mbxin = (struct mcd_mbx *)xmbxin;
|
||||
struct mcd_mbx *mbx = (state!=MCD_S_BEGIN) ? mbxsave : mbxin;
|
||||
int unit = mbx->unit;
|
||||
int port = mbx->port;
|
||||
@ -836,7 +841,7 @@ static void mcd_doread(int state, struct mcd_mbx *mbxin)
|
||||
timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */
|
||||
return;
|
||||
case MCD_S_WAITSTAT:
|
||||
untimeout(mcd_doread,MCD_S_WAITSTAT);
|
||||
untimeout(mcd_doread, (caddr_t)MCD_S_WAITSTAT);
|
||||
if (mbx->count-- >= 0) {
|
||||
if (inb(port+mcd_xfer) & MCD_ST_BUSY) {
|
||||
timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */
|
||||
@ -873,7 +878,7 @@ static void mcd_doread(int state, struct mcd_mbx *mbxin)
|
||||
}
|
||||
|
||||
case MCD_S_WAITMODE:
|
||||
untimeout(mcd_doread,MCD_S_WAITMODE);
|
||||
untimeout(mcd_doread, (caddr_t)MCD_S_WAITMODE);
|
||||
if (mbx->count-- < 0) {
|
||||
#ifdef MCD_TO_WARNING_ON
|
||||
printf("mcd%d: timeout set mode\n",unit);
|
||||
@ -911,7 +916,7 @@ static void mcd_doread(int state, struct mcd_mbx *mbxin)
|
||||
timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITREAD,hz/100); /* XXX */
|
||||
return;
|
||||
case MCD_S_WAITREAD:
|
||||
untimeout(mcd_doread,MCD_S_WAITREAD);
|
||||
untimeout(mcd_doread,(caddr_t)MCD_S_WAITREAD);
|
||||
if (mbx->count-- > 0) {
|
||||
k = inb(port+mcd_xfer);
|
||||
if ((k & 2)==0) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# GENERICAH -- Generic machine with WD/AHx family disks
|
||||
#
|
||||
# $Id: GENERICAH,v 1.17 1993/11/03 20:02:20 ats Exp $
|
||||
# $Id: GENERICAH,v 1.18 1993/12/12 12:22:25 davidg Exp $
|
||||
#
|
||||
|
||||
machine "i386"
|
||||
@ -16,7 +16,7 @@ options INET #InterNETworking
|
||||
options ISOFS #ISO File System
|
||||
options NFS #Network File System
|
||||
options PCFS #MSDOS File System
|
||||
options PROCFS #Proc File System
|
||||
#options PROCFS #Proc File System
|
||||
options "COMPAT_43" #Compatible with BSD 4.3
|
||||
options "TCP_COMPAT_42" #TCP/IP compatible with 4.2
|
||||
options XSERVER #Xserver
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# GENERICBT -- Generic machine with WD/BTx family disks
|
||||
#
|
||||
# $Id: GENERICBT,v 1.16 1993/11/03 20:02:21 ats Exp $
|
||||
# $Id: GENERICBT,v 1.17 1993/12/12 12:22:26 davidg Exp $
|
||||
#
|
||||
|
||||
machine "i386"
|
||||
@ -16,7 +16,7 @@ options INET #InterNETworking
|
||||
options ISOFS #ISO File System
|
||||
options NFS #Network File System
|
||||
options PCFS #MSDOS File System
|
||||
options PROCFS #Proc File System
|
||||
#options PROCFS #Proc File System
|
||||
options "COMPAT_43" #Compatible with BSD 4.3
|
||||
options "TCP_COMPAT_42" #TCP/IP compatible with 4.2
|
||||
options XSERVER #Xserver
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# This kernel is NOT MEANT to be runnable!
|
||||
#
|
||||
# $Id: LINT,v 1.31 1993/12/06 01:57:16 wollman Exp $
|
||||
# $Id: LINT,v 1.32 1993/12/12 12:22:27 davidg Exp $
|
||||
#
|
||||
|
||||
machine "i386"
|
||||
@ -24,7 +24,7 @@ config "386bsd" at 0xFE100000 root on wd0 swap on wd0 and sd0
|
||||
options "COM_BIDIR" #Bidirectional support in sys/isa/sio.c
|
||||
options "COM_MULTIPORT" #Multiport support in sys/isa/sio.c
|
||||
options "COMPAT_43" #compatible with BSD 4.3
|
||||
options "SYMTAB_SPACE=103365" #This kernel needs LOTS of symtable
|
||||
options "SYMTAB_SPACE=103939" #This kernel needs LOTS of symtable
|
||||
options GATEWAY #internetwork gateway
|
||||
options KTRACE #kernel tracing
|
||||
options "NCONS=8" #number of syscons virtual consoles
|
||||
@ -70,7 +70,7 @@ options NFS #Network File System
|
||||
options NS #Xerox NS communications protocols
|
||||
options NSIP #XNS over IP
|
||||
options PCFS #PC (MSDOS) File System
|
||||
options PROCFS #Proc File System
|
||||
#options PROCFS #Proc File System
|
||||
pseudo-device ppp 2
|
||||
pseudo-device pty 4
|
||||
options QUOTA #enable disk quotas
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Copyright 1990 W. Jolitz
|
||||
# from: @(#)Makefile.i386 7.1 5/10/91
|
||||
# $Id: Makefile.i386,v 1.16 1993/11/25 01:30:38 wollman Exp $
|
||||
# $Id: Makefile.i386,v 1.17 1993/12/12 12:22:28 davidg Exp $
|
||||
#
|
||||
# Makefile for FreeBSD
|
||||
#
|
||||
@ -33,7 +33,7 @@ I386= ../../i386
|
||||
CWARNFLAGS=-W -Wreturn-type -Wcomment
|
||||
#
|
||||
# The following flags are next up for working on:
|
||||
# -Wtraditional -Wredundant-decls -Wnested-externs
|
||||
# -Wredundant-decls -Wnested-externs
|
||||
#
|
||||
# When working on removing warnings from code, the `-Werror' flag should be
|
||||
# of material assistance.
|
||||
|
@ -4,7 +4,7 @@
|
||||
#
|
||||
# This kernel is NOT MEANT to be runnable!
|
||||
#
|
||||
# $Id: LINT,v 1.31 1993/12/06 01:57:16 wollman Exp $
|
||||
# $Id: LINT,v 1.32 1993/12/12 12:22:27 davidg Exp $
|
||||
#
|
||||
|
||||
machine "i386"
|
||||
@ -24,7 +24,7 @@ config "386bsd" at 0xFE100000 root on wd0 swap on wd0 and sd0
|
||||
options "COM_BIDIR" #Bidirectional support in sys/isa/sio.c
|
||||
options "COM_MULTIPORT" #Multiport support in sys/isa/sio.c
|
||||
options "COMPAT_43" #compatible with BSD 4.3
|
||||
options "SYMTAB_SPACE=103365" #This kernel needs LOTS of symtable
|
||||
options "SYMTAB_SPACE=103939" #This kernel needs LOTS of symtable
|
||||
options GATEWAY #internetwork gateway
|
||||
options KTRACE #kernel tracing
|
||||
options "NCONS=8" #number of syscons virtual consoles
|
||||
@ -70,7 +70,7 @@ options NFS #Network File System
|
||||
options NS #Xerox NS communications protocols
|
||||
options NSIP #XNS over IP
|
||||
options PCFS #PC (MSDOS) File System
|
||||
options PROCFS #Proc File System
|
||||
#options PROCFS #Proc File System
|
||||
pseudo-device ppp 2
|
||||
pseudo-device pty 4
|
||||
options QUOTA #enable disk quotas
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* commenced: Sun Sep 27 18:14:01 PDT 1992
|
||||
*
|
||||
* $Id: aha1742.c,v 1.11 1993/11/18 05:02:15 rgrimes Exp $
|
||||
* $Id: aha1742.c,v 1.12 1993/11/25 01:31:25 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -46,11 +46,6 @@ int Debugger();
|
||||
# endif /* DDB */
|
||||
# else
|
||||
#include "ddb.h"
|
||||
#if NDDB > 0
|
||||
int Debugger();
|
||||
#else /* NDDB */
|
||||
#define Debugger() panic("should call debugger here (adaptec.c)")
|
||||
#endif /* NDDB */
|
||||
#endif /* netbsd */
|
||||
#else /* KERNEL */
|
||||
#define NAHB 1
|
||||
@ -61,7 +56,7 @@ typedef timeout_func_t timeout_t;
|
||||
#endif
|
||||
|
||||
typedef unsigned long int physaddr;
|
||||
extern int hz;
|
||||
#include "kernel.h"
|
||||
|
||||
#define KVTOPHYS(x) vtophys(x)
|
||||
|
||||
@ -360,7 +355,7 @@ ahb_send_mbox(int unit, int opcode, int target, struct ecb *ecb)
|
||||
}
|
||||
if (wait == 0) {
|
||||
printf("ahb%d: board not responding\n", unit);
|
||||
Debugger();
|
||||
Debugger("aha1742");
|
||||
}
|
||||
outl(port + MBOXOUT0, KVTOPHYS(ecb)); /* don't know this will work */
|
||||
outb(port + ATTN, opcode | target);
|
||||
@ -416,7 +411,7 @@ ahb_send_immed(int unit, int target, u_long cmd)
|
||||
DELAY(10);
|
||||
} if (wait == 0) {
|
||||
printf("ahb%d: board not responding\n", unit);
|
||||
Debugger();
|
||||
Debugger("aha1742");
|
||||
}
|
||||
outl(port + MBOXOUT0, cmd); /* don't know this will work */
|
||||
outb(port + G2CNTRL, G2CNTRL_SET_HOST_READY);
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
|
||||
* $Id: autoconf.c,v 1.4 1993/10/16 14:14:48 rgrimes Exp $
|
||||
* $Id: autoconf.c,v 1.5 1993/11/25 01:30:46 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -52,6 +52,7 @@
|
||||
#include "conf.h"
|
||||
#include "dmap.h"
|
||||
#include "reboot.h"
|
||||
#include "kernel.h"
|
||||
|
||||
#include "machine/pte.h"
|
||||
|
||||
|
@ -23,15 +23,16 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_disasm.c,v 1.3 1993/10/16 14:14:52 rgrimes Exp $
|
||||
* $Id: db_disasm.c,v 1.4 1993/11/25 01:30:51 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Instruction disassembler.
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "proc.h"
|
||||
#include <machine/db_machdep.h>
|
||||
#include "ddb/ddb.h"
|
||||
|
||||
#include <ddb/db_access.h>
|
||||
#include <ddb/db_sym.h>
|
||||
|
@ -23,7 +23,7 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id: db_interface.c,v 1.3 1993/11/07 17:41:34 wollman Exp $
|
||||
* $Id: db_interface.c,v 1.4 1993/11/25 01:30:52 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -31,6 +31,7 @@
|
||||
*/
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "kernel.h"
|
||||
#include "proc.h"
|
||||
#include "ddb/ddb.h"
|
||||
|
||||
@ -235,7 +236,7 @@ db_write_bytes(addr, size, data)
|
||||
|
||||
void
|
||||
Debugger (msg)
|
||||
char *msg;
|
||||
const char *msg;
|
||||
{
|
||||
asm ("int $3");
|
||||
}
|
||||
|
@ -23,12 +23,13 @@
|
||||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: db_trace.c,v 1.2 1993/10/16 14:14:56 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "proc.h"
|
||||
#include <machine/db_machdep.h>
|
||||
#include "ddb/ddb.h"
|
||||
|
||||
#include <ddb/db_access.h>
|
||||
#include <ddb/db_sym.h>
|
||||
|
@ -34,12 +34,13 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)dkbad.c 5.4 (Berkeley) 1/19/91
|
||||
* $Id$
|
||||
* $Id: dkbad.c,v 1.2 1993/10/16 14:14:59 rgrimes Exp $
|
||||
*/
|
||||
|
||||
|
||||
#ifndef NOBADSECT
|
||||
#include "sys/param.h"
|
||||
#include "systm.h"
|
||||
#include "sys/buf.h"
|
||||
#include "sys/dkbad.h"
|
||||
|
||||
|
@ -32,10 +32,11 @@
|
||||
*
|
||||
* from tahoe: in_cksum.c 1.2 86/01/05
|
||||
* from: @(#)in_cksum.c 1.3 (Berkeley) 1/19/91
|
||||
* $Id: in_cksum.c,v 1.2 1993/10/16 14:15:00 rgrimes Exp $
|
||||
* $Id: in_cksum.c,v 1.3 1993/11/25 01:30:53 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "sys/mbuf.h"
|
||||
|
||||
/*
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.20 1993/12/03 05:07:43 alm Exp $
|
||||
* $Id: machdep.c,v 1.21 1993/12/12 12:22:56 davidg Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -85,6 +85,7 @@ static unsigned int avail_remaining;
|
||||
#include "machine/psl.h"
|
||||
#include "machine/specialreg.h"
|
||||
#include "machine/sysarch.h"
|
||||
#include "machine/cons.h"
|
||||
|
||||
#include "i386/isa/isa.h"
|
||||
#include "i386/isa/rtc.h"
|
||||
@ -156,10 +157,11 @@ cpu_startup()
|
||||
/* avail_end was pre-decremented in pmap_bootstrap to compensate */
|
||||
for (i = 0; i < btoc(sizeof (struct msgbuf)); i++)
|
||||
#ifndef MACHINE_NONCONTIG
|
||||
pmap_enter(pmap_kernel(), msgbufp, avail_end + i * NBPG,
|
||||
pmap_enter(pmap_kernel(), (vm_offset_t)msgbufp,
|
||||
avail_end + i * NBPG,
|
||||
VM_PROT_ALL, TRUE);
|
||||
#else
|
||||
pmap_enter(pmap_kernel(), (caddr_t)msgbufp + i * NBPG,
|
||||
pmap_enter(pmap_kernel(), (vm_offset_t)msgbufp + i * NBPG,
|
||||
avail_end + i * NBPG, VM_PROT_ALL, TRUE);
|
||||
#endif
|
||||
msgbufmapped = 1;
|
||||
@ -664,7 +666,7 @@ boot(arghowto)
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
unsigned dumpmag = 0x8fca0101; /* magic number for savecore */
|
||||
unsigned long dumpmag = 0x8fca0101UL; /* magic number for savecore */
|
||||
int dumpsize = 0; /* also for savecore */
|
||||
/*
|
||||
* Doadump comes here after turning off memory management and
|
||||
@ -929,7 +931,7 @@ struct soft_segment_descriptor ldt_segs[] = {
|
||||
void
|
||||
setidt(idx, func, typ, dpl)
|
||||
int idx;
|
||||
caddr_t func;
|
||||
void (*func)();
|
||||
int typ;
|
||||
int dpl;
|
||||
{
|
||||
@ -946,7 +948,10 @@ setidt(idx, func, typ, dpl)
|
||||
}
|
||||
|
||||
#define IDTVEC(name) __CONCAT(X, name)
|
||||
extern IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl),
|
||||
typedef void idtvec_t();
|
||||
|
||||
extern idtvec_t
|
||||
IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl),
|
||||
IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(dble), IDTVEC(fpusegm),
|
||||
IDTVEC(tss), IDTVEC(missing), IDTVEC(stk), IDTVEC(prot),
|
||||
IDTVEC(page), IDTVEC(rsvd), IDTVEC(fpu), IDTVEC(rsvd0),
|
||||
@ -955,7 +960,6 @@ extern IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl),
|
||||
IDTVEC(rsvd9), IDTVEC(rsvd10), IDTVEC(rsvd11), IDTVEC(rsvd12),
|
||||
IDTVEC(rsvd13), IDTVEC(rsvd14), IDTVEC(rsvd14), IDTVEC(syscall);
|
||||
|
||||
int lcr0(), lcr3(), rcr0(), rcr2();
|
||||
int _gsel_tss;
|
||||
|
||||
void
|
||||
@ -986,7 +990,7 @@ init386(first)
|
||||
* the address space
|
||||
*/
|
||||
gdt_segs[GCODE_SEL].ssd_limit = i386_btop(i386_round_page(&etext)) - 1;
|
||||
gdt_segs[GDATA_SEL].ssd_limit = 0xffffffff; /* XXX constant? */
|
||||
gdt_segs[GDATA_SEL].ssd_limit = 0xffffffffUL; /* XXX constant? */
|
||||
for (x=0; x < NGDT; x++) ssdtosd(gdt_segs+x, gdt+x);
|
||||
/* make ldt memory segments */
|
||||
/*
|
||||
@ -1065,7 +1069,7 @@ init386(first)
|
||||
#if NDDB > 0
|
||||
kdb_init();
|
||||
if (boothowto & RB_KDB)
|
||||
Debugger();
|
||||
Debugger("Boot flags requested debugger");
|
||||
#endif
|
||||
|
||||
/* Use BIOS values stored in RTC CMOS RAM, since probing
|
||||
@ -1485,4 +1489,14 @@ copystr(fromaddr, toaddr, maxlength, lencopied) u_int *lencopied, maxlength;
|
||||
if(lencopied) *lencopied = tally;
|
||||
return(ENAMETOOLONG);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#include "ddb.h"
|
||||
#if NDDB <= 0
|
||||
void
|
||||
Debugger(const char *msg)
|
||||
{
|
||||
printf("Debugger(\"%s\") called.", msg);
|
||||
}
|
||||
#endif /* no DDB */
|
||||
|
@ -6,7 +6,7 @@
|
||||
* [expediant "port" of linux 8087 emulator to 386BSD, with apologies -wfj]
|
||||
*
|
||||
* from: 386BSD 0.1
|
||||
* $Id: math_emulate.c,v 1.4 1993/10/16 14:15:04 rgrimes Exp $
|
||||
* $Id: math_emulate.c,v 1.5 1993/11/25 01:30:57 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -522,7 +522,7 @@ static void fpop(void)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
||||
tmp = I387.swd & 0xffffc7ff;
|
||||
tmp = I387.swd & 0xffffc7ffUL;
|
||||
I387.swd += 0x00000800;
|
||||
I387.swd &= 0x00003800;
|
||||
I387.swd |= tmp;
|
||||
@ -532,7 +532,7 @@ static void fpush(void)
|
||||
{
|
||||
unsigned long tmp;
|
||||
|
||||
tmp = I387.swd & 0xffffc7ff;
|
||||
tmp = I387.swd & 0xffffc7ffUL;
|
||||
I387.swd += 0x00003800;
|
||||
I387.swd &= 0x00003800;
|
||||
I387.swd |= tmp;
|
||||
@ -993,7 +993,7 @@ static void div64(int * a, int * b, int * c)
|
||||
for (i = 0 ; i<64 ; i++) {
|
||||
if (!(mask >>= 1)) {
|
||||
c--;
|
||||
mask = 0x80000000;
|
||||
mask = 0x80000000UL;
|
||||
}
|
||||
tmp[0] = a[0]; tmp[1] = a[1];
|
||||
tmp[2] = a[2]; tmp[3] = a[3];
|
||||
@ -1237,7 +1237,7 @@ void short_to_temp(const short_real * a, temp_real * b)
|
||||
b->exponent = ((*a>>23) & 0xff)-127+16383;
|
||||
if (*a<0)
|
||||
b->exponent |= 0x8000;
|
||||
b->b = (*a<<8) | 0x80000000;
|
||||
b->b = (*a<<8) | 0x80000000UL;
|
||||
b->a = 0;
|
||||
}
|
||||
|
||||
@ -1254,21 +1254,21 @@ void long_to_temp(const long_real * a, temp_real * b)
|
||||
b->exponent = ((a->b >> 20) & 0x7ff)-1023+16383;
|
||||
if (a->b<0)
|
||||
b->exponent |= 0x8000;
|
||||
b->b = 0x80000000 | (a->b<<11) | (((unsigned long)a->a)>>21);
|
||||
b->b = 0x80000000UL | (a->b<<11) | (((unsigned long)a->a)>>21);
|
||||
b->a = a->a<<11;
|
||||
}
|
||||
|
||||
void temp_to_short(const temp_real * a, short_real * b)
|
||||
{
|
||||
if (!(a->exponent & 0x7fff)) {
|
||||
*b = (a->exponent)?0x80000000:0;
|
||||
*b = (a->exponent)?0x80000000UL:0;
|
||||
return;
|
||||
}
|
||||
*b = ((((long) a->exponent)-16383+127) << 23) & 0x7f800000;
|
||||
if (a->exponent < 0)
|
||||
*b |= 0x80000000;
|
||||
*b |= 0x80000000UL;
|
||||
*b |= (a->b >> 8) & 0x007fffff;
|
||||
switch (ROUNDING) {
|
||||
switch ((int)ROUNDING) {
|
||||
case ROUND_NEAREST:
|
||||
if ((a->b & 0xff) > 0x80)
|
||||
++*b;
|
||||
@ -1288,16 +1288,16 @@ void temp_to_long(const temp_real * a, long_real * b)
|
||||
{
|
||||
if (!(a->exponent & 0x7fff)) {
|
||||
b->a = 0;
|
||||
b->b = (a->exponent)?0x80000000:0;
|
||||
b->b = (a->exponent)?0x80000000UL:0;
|
||||
return;
|
||||
}
|
||||
b->b = (((0x7fff & (long) a->exponent)-16383+1023) << 20) & 0x7ff00000;
|
||||
if (a->exponent < 0)
|
||||
b->b |= 0x80000000;
|
||||
b->b |= 0x80000000UL;
|
||||
b->b |= (a->b >> 11) & 0x000fffff;
|
||||
b->a = a->b << 21;
|
||||
b->a |= (a->a >> 11) & 0x001fffff;
|
||||
switch (ROUNDING) {
|
||||
switch ((int)ROUNDING) {
|
||||
case ROUND_NEAREST:
|
||||
if ((a->a & 0x7ff) > 0x400)
|
||||
__asm__("addl $1,%0 ; adcl $0,%1"
|
||||
@ -1354,7 +1354,7 @@ void frndint(const temp_real * a, temp_real * b)
|
||||
__asm__("shrl %1,%0"
|
||||
:"=r" (b->b)
|
||||
:"c" ((char) shift),"0" (b->b));
|
||||
switch (ROUNDING) {
|
||||
switch ((int)ROUNDING) {
|
||||
case ROUND_NEAREST:
|
||||
__asm__("addl %4,%5 ; adcl $0,%0 ; adcl $0,%1"
|
||||
:"=r" (b->a),"=r" (b->b)
|
||||
@ -1434,7 +1434,7 @@ void real_to_int(const temp_real * a, temp_int * b)
|
||||
__asm__("shrl %1,%0"
|
||||
:"=r" (b->b)
|
||||
:"c" ((char) shift),"0" (b->b));
|
||||
switch (ROUNDING) {
|
||||
switch ((int)ROUNDING) {
|
||||
case ROUND_NEAREST:
|
||||
__asm__("addl %4,%5 ; adcl $0,%0 ; adcl $0,%1"
|
||||
:"=r" (b->a),"=r" (b->b)
|
||||
|
@ -38,7 +38,7 @@
|
||||
*
|
||||
* from: Utah $Hdr: mem.c 1.13 89/10/08$
|
||||
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: mem.c,v 1.4 1993/11/22 09:46:45 davidg Exp $
|
||||
* $Id: mem.c,v 1.5 1993/11/25 01:30:59 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -59,8 +59,8 @@
|
||||
#include "vm/vm_param.h"
|
||||
#include "vm/lock.h"
|
||||
#include "vm/vm_statistics.h"
|
||||
#include "vm/pmap.h"
|
||||
#include "vm/vm_prot.h"
|
||||
#include "vm/pmap.h"
|
||||
|
||||
extern char *vmmap; /* poor name! */
|
||||
/*ARGSUSED*/
|
||||
@ -128,7 +128,7 @@ mmrw(dev, uio, flags)
|
||||
/* minor device 0 is physical memory */
|
||||
case 0:
|
||||
v = uio->uio_offset;
|
||||
pmap_enter(pmap_kernel(), vmmap, v,
|
||||
pmap_enter(pmap_kernel(), (vm_offset_t)vmmap, v,
|
||||
uio->uio_rw == UIO_READ ? VM_PROT_READ : VM_PROT_WRITE,
|
||||
TRUE);
|
||||
o = (int)uio->uio_offset & PGOFSET;
|
||||
@ -136,7 +136,8 @@ mmrw(dev, uio, flags)
|
||||
c = MIN(c, (u_int)(NBPG - o));
|
||||
c = MIN(c, (u_int)iov->iov_len);
|
||||
error = uiomove((caddr_t)&vmmap[o], (int)c, uio);
|
||||
pmap_remove(pmap_kernel(), vmmap, &vmmap[NBPG]);
|
||||
pmap_remove(pmap_kernel(), (vm_offset_t)vmmap,
|
||||
(vm_offset_t)&vmmap[NBPG]);
|
||||
continue;
|
||||
|
||||
/* minor device 1 is kernel memory */
|
||||
|
@ -32,10 +32,11 @@
|
||||
*
|
||||
* from: @(#)ns_cksum.c 7.7 (Berkeley) 4/29/91
|
||||
* from NetBSD: ns_cksum.c,v 1.2 1993/05/22 07:59:55 cgd Exp
|
||||
* $Id$
|
||||
* $Id: ns_cksum.c,v 1.1 1993/09/06 12:12:24 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#include "sys/param.h"
|
||||
#include "systm.h"
|
||||
#include "sys/mbuf.h"
|
||||
|
||||
/*
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
|
||||
* $Id: pmap.c,v 1.9 1993/11/25 01:31:00 wollman Exp $
|
||||
* $Id: pmap.c,v 1.10 1993/12/13 07:02:27 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -80,6 +80,7 @@
|
||||
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "kernel.h"
|
||||
#include "proc.h"
|
||||
#include "malloc.h"
|
||||
#include "user.h"
|
||||
@ -92,7 +93,6 @@
|
||||
#include "i386/isa/isa.h"
|
||||
|
||||
static void i386_protection_init(void);
|
||||
static void pmap_changebit(vm_offset_t, int, boolean_t);
|
||||
|
||||
/*
|
||||
* Allocate various and sundry SYSMAPs used in the days of old VM
|
||||
@ -459,7 +459,8 @@ pmap_pinit(pmap)
|
||||
|
||||
/* install self-referential address mapping entry */
|
||||
*(int *)(pmap->pm_pdir+PTDPTDI) =
|
||||
(int)pmap_extract(kernel_pmap, pmap->pm_pdir) | PG_V | PG_KW;
|
||||
(int)pmap_extract(kernel_pmap, (vm_offset_t)pmap->pm_pdir)
|
||||
| PG_V | PG_KW;
|
||||
|
||||
pmap->pm_count = 1;
|
||||
simple_lock_init(&pmap->pm_lock);
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.10 1993/12/03 05:07:45 alm Exp $
|
||||
* $Id: trap.c,v 1.11 1993/12/12 12:22:57 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -59,6 +59,7 @@
|
||||
#include "vm/vm_param.h"
|
||||
#include "vm/pmap.h"
|
||||
#include "vm/vm_map.h"
|
||||
#include "vm/vm_user.h"
|
||||
#include "sys/vmmeter.h"
|
||||
|
||||
#include "machine/trap.h"
|
||||
@ -70,7 +71,7 @@
|
||||
* we omit the size from the mov instruction to avoid nonfatal bugs in gas.
|
||||
*/
|
||||
#define read_gs() ({ u_short gs; __asm("mov %%gs,%0" : "=r" (gs)); gs; })
|
||||
#define write_gs(gs) __asm("mov %0,%%gs" : : "r" ((u_short) gs))
|
||||
#define write_gs(newgs) __asm("mov %0,%%gs" : : "r" ((u_short) newgs))
|
||||
|
||||
#else /* not __GNUC__ */
|
||||
|
||||
@ -81,7 +82,6 @@ void write_gs __P((/* promoted u_short */ int gs));
|
||||
|
||||
struct sysent sysent[];
|
||||
int nsysent;
|
||||
unsigned rcr2();
|
||||
extern short cpl;
|
||||
|
||||
#define MAX_TRAP_MSG 27
|
||||
@ -353,7 +353,8 @@ if(curpcb == 0 || curproc == 0) goto we_re_toast;
|
||||
v = vm->vm_maxsaddr;
|
||||
grow_amount = MAXSSIZ - (vm->vm_ssize << PGSHIFT);
|
||||
}
|
||||
if (vm_allocate(&vm->vm_map, &v, grow_amount, FALSE) !=
|
||||
if (vm_allocate(&vm->vm_map, (vm_offset_t *)&v,
|
||||
grow_amount, FALSE) !=
|
||||
KERN_SUCCESS) {
|
||||
goto nogo;
|
||||
}
|
||||
@ -363,10 +364,11 @@ if(curpcb == 0 || curproc == 0) goto we_re_toast;
|
||||
/* check if page table is mapped, if not, fault it first */
|
||||
if (!pde_v(va)) {
|
||||
v = (char *)trunc_page(vtopte(va));
|
||||
rv = vm_fault(map, v, ftype, FALSE);
|
||||
rv = vm_fault(map, (vm_offset_t)v, ftype, FALSE);
|
||||
if (rv != KERN_SUCCESS) goto nogo;
|
||||
/* check if page table fault, increment wiring */
|
||||
vm_map_pageable(map, v, round_page(v+1), FALSE);
|
||||
vm_map_pageable(map, (vm_offset_t)v,
|
||||
round_page(v+1), FALSE);
|
||||
} else v=0;
|
||||
rv = vm_fault(map, va, ftype, FALSE);
|
||||
if (rv == KERN_SUCCESS) {
|
||||
@ -543,8 +545,9 @@ int trapwrite(addr)
|
||||
v = vm->vm_maxsaddr;
|
||||
grow_amount = MAXSSIZ - (vm->vm_ssize << PGSHIFT);
|
||||
}
|
||||
if (vm_allocate(&vm->vm_map, &v, grow_amount, FALSE) !=
|
||||
KERN_SUCCESS) {
|
||||
if (vm_allocate(&vm->vm_map, (vm_offset_t *)&v,
|
||||
grow_amount, FALSE)
|
||||
!= KERN_SUCCESS) {
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
@ -613,13 +616,13 @@ syscall(frame)
|
||||
frame.sf_eflags |= PSL_C; /* carry bit */
|
||||
#ifdef KTRACE
|
||||
if (KTRPOINT(p, KTR_SYSCALL))
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, &args);
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, args);
|
||||
#endif
|
||||
goto done;
|
||||
}
|
||||
#ifdef KTRACE
|
||||
if (KTRPOINT(p, KTR_SYSCALL))
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, &args);
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, args);
|
||||
#endif
|
||||
rval[0] = 0;
|
||||
rval[1] = frame.sf_edx;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.3 1993/11/04 01:56:31 ache Exp $
|
||||
* $Id: clock.c,v 1.4 1993/11/25 01:31:29 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -233,7 +233,7 @@ resettodr()
|
||||
* Wire clock interrupt in.
|
||||
*/
|
||||
#define V(s) __CONCAT(V, s)
|
||||
extern V(clk)();
|
||||
extern void V(clk)();
|
||||
|
||||
void
|
||||
enablertclock()
|
||||
|
@ -37,7 +37,7 @@
|
||||
*
|
||||
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
|
||||
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
|
||||
* $Id: vm_machdep.c,v 1.6 1993/10/15 10:34:29 rgrimes Exp $
|
||||
* $Id: vm_machdep.c,v 1.7 1993/11/25 01:31:02 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "npx.h"
|
||||
@ -95,7 +95,7 @@ cpu_fork(p1, p2)
|
||||
addr = trunc_page((u_int)vtopte(kstack));
|
||||
vm_map_pageable(&p2->p_vmspace->vm_map, addr, addr+NBPG, FALSE);
|
||||
for (i=0; i < UPAGES; i++)
|
||||
pmap_enter(&p2->p_vmspace->vm_pmap, kstack+i*NBPG,
|
||||
pmap_enter(&p2->p_vmspace->vm_pmap, (vm_offset_t)kstack+i*NBPG,
|
||||
pmap_extract(kernel_pmap, ((int)p2->p_addr)+i*NBPG),
|
||||
/*
|
||||
* The user area has to be mapped writable because
|
||||
@ -236,16 +236,16 @@ pagemove(from, to, size)
|
||||
/*
|
||||
* Convert kernel VA to physical address
|
||||
*/
|
||||
int
|
||||
u_long
|
||||
kvtop(addr)
|
||||
register caddr_t addr;
|
||||
register void *addr;
|
||||
{
|
||||
vm_offset_t va;
|
||||
|
||||
va = pmap_extract(kernel_pmap, (vm_offset_t)addr);
|
||||
if (va == 0)
|
||||
panic("kvtop: zero page frame");
|
||||
return((int)va);
|
||||
return((u_long)va);
|
||||
}
|
||||
|
||||
#ifdef notdef
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Functions to provide access to special i386 instructions.
|
||||
* XXX - bezillions more are defined in locore.s but are not declared anywhere.
|
||||
*
|
||||
* $Id: cpufunc.h,v 1.4 1993/11/07 17:42:47 wollman Exp $
|
||||
* $Id: cpufunc.h,v 1.5 1993/11/25 01:31:07 wollman Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_CPUFUNC_H_
|
||||
@ -177,7 +177,34 @@ strlen(s1)
|
||||
return (len);
|
||||
}
|
||||
|
||||
struct quehead {
|
||||
struct quehead *qh_link;
|
||||
struct quehead *qh_rlink;
|
||||
};
|
||||
|
||||
static inline void
|
||||
insque(void *a, void *b)
|
||||
{
|
||||
register struct quehead *element = a, *head = b;
|
||||
element->qh_link = head->qh_link;
|
||||
head->qh_link = (struct quehead *)element;
|
||||
element->qh_rlink = (struct quehead *)head;
|
||||
((struct quehead *)(element->qh_link))->qh_rlink
|
||||
= (struct quehead *)element;
|
||||
}
|
||||
|
||||
static inline void
|
||||
remque(void *a)
|
||||
{
|
||||
register struct quehead *element = a;
|
||||
((struct quehead *)(element->qh_link))->qh_rlink = element->qh_rlink;
|
||||
((struct quehead *)(element->qh_rlink))->qh_link = element->qh_link;
|
||||
element->qh_rlink = 0;
|
||||
}
|
||||
|
||||
#else /* not __GNUC__ */
|
||||
extern void insque __P((void *, void *));
|
||||
extern void remque __P((void *));
|
||||
|
||||
int bdb __P((void));
|
||||
void disable_intr __P((void));
|
||||
@ -187,17 +214,19 @@ void outb __P((u_int port, u_int data)); /* XXX - incompat */
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#define really_u_int int /* XXX */
|
||||
#define really_void int /* XXX */
|
||||
|
||||
void load_cr0 __P((u_int cr0));
|
||||
really_u_int rcr0 __P((void));
|
||||
u_int rcr0 __P((void));
|
||||
void load_cr3(u_long);
|
||||
u_long rcr3(void);
|
||||
u_long rcr2(void);
|
||||
|
||||
#ifdef notyet
|
||||
really_void setidt __P((int idx, /*XXX*/caddr_t func, int typ, int dpl));
|
||||
#endif
|
||||
|
||||
#undef really_u_int
|
||||
#undef really_void
|
||||
void setidt __P((int, void (*)(), int, int));
|
||||
extern u_long kvtop(void *);
|
||||
extern void tlbflush(void);
|
||||
extern void outw(int /*u_short*/, int /*u_short*/); /* XXX inline!*/
|
||||
extern void outsb(int /*u_short*/, caddr_t, size_t);
|
||||
extern void outsw(int /*u_short*/, caddr_t, size_t);
|
||||
extern void insw(int /*u_short*/, caddr_t, size_t);
|
||||
extern void fillw(int /*u_short*/, caddr_t, size_t);
|
||||
|
||||
#endif /* _MACHINE_CPUFUNC_H_ */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)frame.h 5.2 (Berkeley) 1/18/91
|
||||
* $Id: frame.h,v 1.4 1993/11/17 23:25:03 wollman Exp $
|
||||
* $Id: frame.h,v 1.5 1993/12/03 05:10:00 alm Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_FRAME_H_
|
||||
@ -72,6 +72,8 @@ struct trapframe {
|
||||
int tf_ss;
|
||||
};
|
||||
|
||||
extern int kdb_trap(int, int, struct trapframe *);
|
||||
|
||||
/* Interrupt stack frame */
|
||||
|
||||
struct intrframe {
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)param.h 5.8 (Berkeley) 6/28/91
|
||||
* $Id: param.h,v 1.9 1993/11/13 02:25:14 davidg Exp $
|
||||
* $Id: param.h,v 1.10 1993/11/18 05:02:05 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#ifndef _MACHINE_PARAM_H_
|
||||
@ -71,8 +71,8 @@
|
||||
* defined in pmap.h which is included after this we can't do that
|
||||
* (YET!)
|
||||
*/
|
||||
#define KERNBASE 0xFE000000 /* start of kernel virtual */
|
||||
#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
|
||||
#define KERNBASE 0xFE000000UL /* start of kernel virtual */
|
||||
#define BTOPKERNBASE (KERNBASE >> PGSHIFT)
|
||||
|
||||
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
|
||||
#define DEV_BSIZE (1 << DEV_BSHIFT)
|
||||
|
@ -42,7 +42,7 @@
|
||||
*
|
||||
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
|
||||
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
|
||||
* $Id: pmap.h,v 1.5 1993/11/07 17:43:02 wollman Exp $
|
||||
* $Id: pmap.h,v 1.6 1993/11/13 02:25:16 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef _PMAP_MACHINE_
|
||||
@ -65,8 +65,8 @@ unsigned int
|
||||
pd_pfnum:20; /* physical page frame number of pte's*/
|
||||
};
|
||||
|
||||
#define PD_MASK 0xffc00000 /* page directory address bits */
|
||||
#define PT_MASK 0x003ff000 /* page table address bits */
|
||||
#define PD_MASK 0xffc00000UL /* page directory address bits */
|
||||
#define PT_MASK 0x003ff000UL /* page table address bits */
|
||||
#define PD_SHIFT 22 /* page directory address shift */
|
||||
#define PG_SHIFT 12 /* page table address shift */
|
||||
|
||||
@ -94,7 +94,7 @@ unsigned int
|
||||
#define PG_N 0x00000800 /* Non-cacheable */
|
||||
#define PG_M 0x00000040
|
||||
#define PG_U 0x00000020
|
||||
#define PG_FRAME 0xfffff000
|
||||
#define PG_FRAME 0xfffff000UL
|
||||
|
||||
#define PG_NOACC 0
|
||||
#define PG_KR 0x00000000
|
||||
@ -199,7 +199,7 @@ extern pmap_t kernel_pmap;
|
||||
#define PMAP_ACTIVATE(pmapp, pcbp) \
|
||||
if ((pmapp) != NULL /*&& (pmapp)->pm_pdchanged */) { \
|
||||
(pcbp)->pcb_cr3 = \
|
||||
pmap_extract(kernel_pmap, (pmapp)->pm_pdir); \
|
||||
pmap_extract(kernel_pmap, (vm_offset_t)(pmapp)->pm_pdir); \
|
||||
if ((pmapp) == &curproc->p_vmspace->vm_pmap) \
|
||||
load_cr3((pcbp)->pcb_cr3); \
|
||||
(pmapp)->pm_pdchanged = FALSE; \
|
||||
@ -232,6 +232,24 @@ pv_entry_t pv_table; /* array of entries, one per page */
|
||||
|
||||
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
|
||||
|
||||
extern pmap_t pmap_create(vm_size_t);
|
||||
extern void pmap_pinit(struct pmap *);
|
||||
extern void pmap_destroy(pmap_t);
|
||||
extern void pmap_release(struct pmap *);
|
||||
extern void pmap_reference(pmap_t);
|
||||
extern void pmap_remove(struct pmap *, vm_offset_t, vm_offset_t);
|
||||
extern void pmap_protect(struct pmap *, vm_offset_t, vm_offset_t, vm_prot_t);
|
||||
extern void pmap_enter(pmap_t, vm_offset_t, vm_offset_t, vm_prot_t, boolean_t);
|
||||
extern void pmap_change_wiring(pmap_t, vm_offset_t, boolean_t);
|
||||
extern struct pte *pmap_pte(pmap_t, vm_offset_t);
|
||||
extern vm_offset_t pmap_extract(pmap_t, vm_offset_t);
|
||||
extern void pmap_copy(pmap_t, pmap_t, vm_offset_t, vm_size_t, vm_offset_t);
|
||||
extern void pmap_collect(pmap_t);
|
||||
struct pcb; extern void pmap_activate(pmap_t, struct pcb *);
|
||||
extern pmap_t pmap_kernel(void);
|
||||
extern void pmap_pageable(pmap_t, vm_offset_t, vm_offset_t, boolean_t);
|
||||
|
||||
|
||||
#endif /* KERNEL */
|
||||
|
||||
#endif /* _PMAP_MACHINE_ */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91
|
||||
* $Id: vmparam.h,v 1.7 1993/10/15 10:07:45 rgrimes Exp $
|
||||
* $Id: vmparam.h,v 1.8 1993/11/07 17:43:17 wollman Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -56,27 +56,27 @@
|
||||
* Immediately after the user structure is the page table map, and then
|
||||
* kernal address space.
|
||||
*/
|
||||
#define USRTEXT 0
|
||||
#define USRSTACK 0xFDBFE000
|
||||
#define USRTEXT 0UL
|
||||
#define USRSTACK 0xFDBFE000UL
|
||||
#define BTOPUSRSTACK (0xFDC00-(UPAGES)) /* btop(USRSTACK) */
|
||||
#define LOWPAGES 0
|
||||
#define LOWPAGES 0UL
|
||||
#define HIGHPAGES UPAGES
|
||||
|
||||
/*
|
||||
* Virtual memory related constants, all in bytes
|
||||
*/
|
||||
#define MAXTSIZ (6*1024*1024) /* max text size */
|
||||
#define MAXTSIZ (6UL*1024*1024) /* max text size */
|
||||
#ifndef DFLDSIZ
|
||||
#define DFLDSIZ (16*1024*1024) /* initial data size limit */
|
||||
#define DFLDSIZ (16UL*1024*1024) /* initial data size limit */
|
||||
#endif
|
||||
#ifndef MAXDSIZ
|
||||
#define MAXDSIZ (32*1024*1024) /* max data size */
|
||||
#define MAXDSIZ (32UL*1024*1024) /* max data size */
|
||||
#endif
|
||||
#ifndef DFLSSIZ
|
||||
#define DFLSSIZ (512*1024) /* initial stack size limit */
|
||||
#define DFLSSIZ (512UL*1024) /* initial stack size limit */
|
||||
#endif
|
||||
#ifndef MAXSSIZ
|
||||
#define MAXSSIZ (8*1024*1024) /* max stack size */
|
||||
#define MAXSSIZ (8UL*1024*1024) /* max stack size */
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -211,15 +211,15 @@
|
||||
|
||||
/* user/kernel map constants */
|
||||
#define VM_MIN_ADDRESS ((vm_offset_t)0)
|
||||
#define VM_MAXUSER_ADDRESS ((vm_offset_t)0xFDBFE000)
|
||||
#define UPT_MIN_ADDRESS ((vm_offset_t)0xFDC00000)
|
||||
#define UPT_MAX_ADDRESS ((vm_offset_t)0xFDFF7000)
|
||||
#define VM_MAXUSER_ADDRESS ((vm_offset_t)0xFDBFE000UL)
|
||||
#define UPT_MIN_ADDRESS ((vm_offset_t)0xFDC00000UL)
|
||||
#define UPT_MAX_ADDRESS ((vm_offset_t)0xFDFF7000UL)
|
||||
#define VM_MAX_ADDRESS UPT_MAX_ADDRESS
|
||||
#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xFDFF7000)
|
||||
#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0xFDFF7000UL)
|
||||
#define UPDT VM_MIN_KERNEL_ADDRESS
|
||||
#define KPT_MIN_ADDRESS ((vm_offset_t)0xFDFF8000)
|
||||
#define KPT_MAX_ADDRESS ((vm_offset_t)0xFDFFF000)
|
||||
#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFF7FF000)
|
||||
#define KPT_MIN_ADDRESS ((vm_offset_t)0xFDFF8000UL)
|
||||
#define KPT_MAX_ADDRESS ((vm_offset_t)0xFDFFF000UL)
|
||||
#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xFF7FF000UL)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
|
||||
|
@ -12,7 +12,7 @@
|
||||
* on the understanding that TFS is not responsible for the correct
|
||||
* functioning of this software in any circumstances.
|
||||
*
|
||||
* $Id: aha1542.c,v 1.15 1993/11/18 05:02:12 rgrimes Exp $
|
||||
* $Id: aha1542.c,v 1.16 1993/11/25 01:31:22 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -38,12 +38,7 @@
|
||||
|
||||
#ifdef KERNEL
|
||||
#include "ddb.h"
|
||||
#if NDDB > 0
|
||||
int Debugger();
|
||||
#else /* NDDB */
|
||||
#define Debugger() panic("should call debugger here (adaptec.c)")
|
||||
#endif /* NDDB */
|
||||
extern int hz;
|
||||
#include "kernel.h"
|
||||
#else /*KERNEL */
|
||||
#define NAHA 1
|
||||
#endif /*KERNEL */
|
||||
@ -686,7 +681,7 @@ ahaintr(unit)
|
||||
#endif /*AHADEBUG */
|
||||
}
|
||||
if (ccb) {
|
||||
untimeout(aha_timeout, ccb);
|
||||
untimeout(aha_timeout, (caddr_t)ccb);
|
||||
aha_done(unit, ccb);
|
||||
}
|
||||
aha->aha_mbx.mbi[i].stat = AHA_MBI_FREE;
|
||||
@ -776,7 +771,7 @@ aha_done(unit, ccb)
|
||||
*/
|
||||
if (!(xs->flags & INUSE)) {
|
||||
printf("aha%d: exiting but not in use!\n", unit);
|
||||
Debugger();
|
||||
Debugger("aha1542");
|
||||
}
|
||||
if (((ccb->host_stat != AHA_OK) || (ccb->target_stat != SCSI_OK))
|
||||
&& ((xs->flags & SCSI_ERR_OK) == 0)) {
|
||||
@ -1252,7 +1247,7 @@ aha_poll(unit, xs, ccb)
|
||||
* because we are polling,
|
||||
* take out the timeout entry aha_timeout made
|
||||
*/
|
||||
untimeout(aha_timeout, ccb);
|
||||
untimeout(aha_timeout, (caddr_t)ccb);
|
||||
count = 2000;
|
||||
while (count) {
|
||||
/*
|
||||
@ -1428,7 +1423,7 @@ aha_timeout(caddr_t arg1, int arg2)
|
||||
*/
|
||||
if (ccb->mbx->cmd != AHA_MBO_FREE) {
|
||||
printf("\nadapter not taking commands.. frozen?!\n");
|
||||
Debugger();
|
||||
Debugger("aha1542");
|
||||
}
|
||||
/*
|
||||
* If it has been through before, then
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* commenced: Sun Sep 27 18:14:01 PDT 1992
|
||||
*
|
||||
* $Id: aha1742.c,v 1.11 1993/11/18 05:02:15 rgrimes Exp $
|
||||
* $Id: aha1742.c,v 1.12 1993/11/25 01:31:25 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -46,11 +46,6 @@ int Debugger();
|
||||
# endif /* DDB */
|
||||
# else
|
||||
#include "ddb.h"
|
||||
#if NDDB > 0
|
||||
int Debugger();
|
||||
#else /* NDDB */
|
||||
#define Debugger() panic("should call debugger here (adaptec.c)")
|
||||
#endif /* NDDB */
|
||||
#endif /* netbsd */
|
||||
#else /* KERNEL */
|
||||
#define NAHB 1
|
||||
@ -61,7 +56,7 @@ typedef timeout_func_t timeout_t;
|
||||
#endif
|
||||
|
||||
typedef unsigned long int physaddr;
|
||||
extern int hz;
|
||||
#include "kernel.h"
|
||||
|
||||
#define KVTOPHYS(x) vtophys(x)
|
||||
|
||||
@ -360,7 +355,7 @@ ahb_send_mbox(int unit, int opcode, int target, struct ecb *ecb)
|
||||
}
|
||||
if (wait == 0) {
|
||||
printf("ahb%d: board not responding\n", unit);
|
||||
Debugger();
|
||||
Debugger("aha1742");
|
||||
}
|
||||
outl(port + MBOXOUT0, KVTOPHYS(ecb)); /* don't know this will work */
|
||||
outb(port + ATTN, opcode | target);
|
||||
@ -416,7 +411,7 @@ ahb_send_immed(int unit, int target, u_long cmd)
|
||||
DELAY(10);
|
||||
} if (wait == 0) {
|
||||
printf("ahb%d: board not responding\n", unit);
|
||||
Debugger();
|
||||
Debugger("aha1742");
|
||||
}
|
||||
outl(port + MBOXOUT0, cmd); /* don't know this will work */
|
||||
outb(port + G2CNTRL, G2CNTRL_SET_HOST_READY);
|
||||
|
@ -12,7 +12,7 @@
|
||||
* on the understanding that TFS is not responsible for the correct
|
||||
* functioning of this software in any circumstances.
|
||||
*
|
||||
* $Id: bt742a.c,v 1.10 1993/11/18 05:02:17 rgrimes Exp $
|
||||
* $Id: bt742a.c,v 1.11 1993/11/25 01:31:27 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -39,16 +39,11 @@
|
||||
|
||||
#ifdef KERNEL
|
||||
#include "ddb.h"
|
||||
#if NDDB > 0
|
||||
int Debugger();
|
||||
#else /* NDDB */
|
||||
#define Debugger() panic("should call debugger here (bt742a.c)")
|
||||
#endif /* NDDB */
|
||||
#include "kernel.h"
|
||||
#else /*KERNEL */
|
||||
#define NBT 1
|
||||
#endif /*KERNEL */
|
||||
|
||||
extern int hz;
|
||||
typedef unsigned long int physaddr;
|
||||
|
||||
/*
|
||||
@ -721,7 +716,7 @@ btintr(unit)
|
||||
}
|
||||
wmbi->stat = BT_MBI_FREE;
|
||||
if (ccb) {
|
||||
untimeout(bt_timeout, ccb);
|
||||
untimeout(bt_timeout, (caddr_t)ccb);
|
||||
bt_done(unit, ccb);
|
||||
}
|
||||
/* Set the IN mail Box pointer for next */ bt_nextmbx(wmbi, wmbx, mbi);
|
||||
@ -900,7 +895,8 @@ bt_send_mbo(int unit, int flags, int cmd, struct bt_ccb *ccb)
|
||||
return ((BT_MBO *) 0);
|
||||
}
|
||||
outb(BT_CMD_DATA_PORT, 0x01); /* Enable */
|
||||
sleep(wmbx, PRIBIO); /*XXX *//*can't do this! */
|
||||
tsleep((caddr_t)wmbx, PRIBIO, "btsend", 0);
|
||||
/* XXX */ /*can't do this! */
|
||||
/* May be servicing an int */
|
||||
}
|
||||
/* Link CCB to the Mail Box */
|
||||
@ -1401,7 +1397,7 @@ bt_poll(unit, xs, ccb)
|
||||
* because we are polling, take out the timeout entry
|
||||
* bt_timeout made
|
||||
*/
|
||||
untimeout(bt_timeout, ccb);
|
||||
untimeout(bt_timeout, (caddr_t)ccb);
|
||||
count = 2000;
|
||||
while (count) {
|
||||
/*
|
||||
@ -1456,7 +1452,7 @@ bt_timeout(caddr_t arg1, int arg2)
|
||||
if (bt_ccb_phys_kv(bt, ccb->mbx->ccb_addr) == ccb &&
|
||||
ccb->mbx->cmd != BT_MBO_FREE) {
|
||||
printf("bt%d: not taking commands!\n", unit);
|
||||
Debugger();
|
||||
Debugger("bt742a");
|
||||
}
|
||||
/*
|
||||
* If it has been through before, then
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.3 1993/11/04 01:56:31 ache Exp $
|
||||
* $Id: clock.c,v 1.4 1993/11/25 01:31:29 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -233,7 +233,7 @@ resettodr()
|
||||
* Wire clock interrupt in.
|
||||
*/
|
||||
#define V(s) __CONCAT(V, s)
|
||||
extern V(clk)();
|
||||
extern void V(clk)();
|
||||
|
||||
void
|
||||
enablertclock()
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
* $Id: fd.c,v 1.14 1993/12/16 19:47:42 ache Exp $
|
||||
* $Id: fd.c,v 1.16 1993/12/19 00:40:49 ache Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -165,6 +165,8 @@ typedef int fdsu_t;
|
||||
typedef struct fd_data *fd_p;
|
||||
typedef struct fdc_data *fdc_p;
|
||||
|
||||
static int retrier(fdcu_t);
|
||||
|
||||
#define DEVIDLE 0
|
||||
#define FINDWORK 1
|
||||
#define DOSEEK 2
|
||||
@ -391,7 +393,7 @@ void fdstrategy(struct buf *bp)
|
||||
dp = &(fdc->head);
|
||||
s = splbio();
|
||||
disksort(dp, bp);
|
||||
untimeout(fd_turnoff,fdu); /* a good idea */
|
||||
untimeout(fd_turnoff, (caddr_t)fdu); /* a good idea */
|
||||
fdstart(fdcu);
|
||||
splx(s);
|
||||
return;
|
||||
@ -762,7 +764,7 @@ fdstate(fdcu, fdc)
|
||||
TRACE1("fd%d",fdu);
|
||||
TRACE1("[%s]",fdstates[fdc->state]);
|
||||
TRACE1("(0x%x)",fd->flags);
|
||||
untimeout(fd_turnoff, fdu);
|
||||
untimeout(fd_turnoff, (caddr_t)fdu);
|
||||
timeout(fd_turnoff, (caddr_t)fdu, 4 * hz);
|
||||
switch (fdc->state)
|
||||
{
|
||||
@ -810,7 +812,7 @@ fdstate(fdcu, fdc)
|
||||
timeout(fd_timeout, (caddr_t)fdcu, 2 * hz);
|
||||
return(0); /* will return later */
|
||||
case SEEKWAIT:
|
||||
untimeout(fd_timeout,fdcu);
|
||||
untimeout(fd_timeout, (caddr_t)fdcu);
|
||||
/* allow heads to settle */
|
||||
timeout(fd_pseudointr, (caddr_t)fdcu, hz / 50);
|
||||
fdc->state = SEEKCOMPLETE;
|
||||
@ -883,7 +885,7 @@ fdstate(fdcu, fdc)
|
||||
timeout(fd_timeout, (caddr_t)fdcu, 2 * hz);
|
||||
return(0); /* will return later */
|
||||
case IOCOMPLETE: /* IO DONE, post-analyze */
|
||||
untimeout(fd_timeout,fdcu);
|
||||
untimeout(fd_timeout, (caddr_t)fdcu);
|
||||
for(i=0;i<7;i++)
|
||||
{
|
||||
fdc->status[i] = in_fdc(fdcu);
|
||||
@ -994,7 +996,7 @@ fdstate(fdcu, fdc)
|
||||
return(1); /* Come back immediatly to new state */
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
retrier(fdcu)
|
||||
fdcu_t fdcu;
|
||||
{
|
||||
|
@ -36,7 +36,7 @@
|
||||
*
|
||||
* @(#)icu.s 7.2 (Berkeley) 5/21/91
|
||||
*
|
||||
* $Id: icu.s,v 1.4 1993/11/13 02:25:21 davidg Exp $
|
||||
* $Id: icu.s,v 1.5 1993/11/25 01:31:33 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -211,6 +211,10 @@ none_to_unpend:
|
||||
DONET(NETISR_ISO, _clnlintr, 9)
|
||||
#endif /* ISO */
|
||||
|
||||
#ifdef CCITT
|
||||
DONET(NETISR_CCITT, _pkintr, 29)
|
||||
#endif /* CCITT */
|
||||
|
||||
FASTSPL($0)
|
||||
test_ASTs:
|
||||
btrl $NETISR_SCLK,_netisr
|
||||
|
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Id: if_ed.c,v 2.16 1993/11/29 16:55:56 davidg Exp davidg $
|
||||
* $Id: if_ed.c,v 1.25 1993/11/29 17:07:26 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1596,7 +1596,7 @@ ed_start(ifp)
|
||||
|
||||
/* copy trailer_header into a data structure */
|
||||
m_copydata(m0, off, sizeof(struct trailer_header),
|
||||
&trailer_header.ether_type);
|
||||
(caddr_t)&trailer_header.ether_type);
|
||||
|
||||
/* copy residual data */
|
||||
m_copydata(m0, off+sizeof(struct trailer_header),
|
||||
|
@ -502,7 +502,7 @@ is_start(ifp)
|
||||
|
||||
/* copy trailer_header into a data structure */
|
||||
m_copydata(m0, off, sizeof(struct trailer_header),
|
||||
&trailer_header.ether_type);
|
||||
(caddr_t)&trailer_header.ether_type);
|
||||
|
||||
/* copy residual data */
|
||||
resid = trailer_header.ether_residual -
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
|
||||
* $Id: isa.c,v 1.9 1993/11/17 00:21:03 ache Exp $
|
||||
* $Id: isa.c,v 1.10 1993/11/25 01:31:39 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -322,19 +322,22 @@ config_isadev(isdp, mp)
|
||||
|
||||
#define IDTVEC(name) __CONCAT(X,name)
|
||||
/* default interrupt vector table entries */
|
||||
extern IDTVEC(intr0), IDTVEC(intr1), IDTVEC(intr2), IDTVEC(intr3),
|
||||
typedef void inthand_t();
|
||||
typedef void (*inthand_func_t)();
|
||||
extern inthand_t
|
||||
IDTVEC(intr0), IDTVEC(intr1), IDTVEC(intr2), IDTVEC(intr3),
|
||||
IDTVEC(intr4), IDTVEC(intr5), IDTVEC(intr6), IDTVEC(intr7),
|
||||
IDTVEC(intr8), IDTVEC(intr9), IDTVEC(intr10), IDTVEC(intr11),
|
||||
IDTVEC(intr12), IDTVEC(intr13), IDTVEC(intr14), IDTVEC(intr15);
|
||||
|
||||
static *defvec[16] = {
|
||||
static inthand_func_t defvec[16] = {
|
||||
&IDTVEC(intr0), &IDTVEC(intr1), &IDTVEC(intr2), &IDTVEC(intr3),
|
||||
&IDTVEC(intr4), &IDTVEC(intr5), &IDTVEC(intr6), &IDTVEC(intr7),
|
||||
&IDTVEC(intr8), &IDTVEC(intr9), &IDTVEC(intr10), &IDTVEC(intr11),
|
||||
&IDTVEC(intr12), &IDTVEC(intr13), &IDTVEC(intr14), &IDTVEC(intr15) };
|
||||
|
||||
/* out of range default interrupt vector gate entry */
|
||||
extern IDTVEC(intrdefault);
|
||||
extern inthand_t IDTVEC(intrdefault);
|
||||
|
||||
/*
|
||||
* Fill in default interrupt table (in case of spuruious interrupt
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)isa_device.h 7.1 (Berkeley) 5/9/91
|
||||
* $Id: isa_device.h,v 1.2 1993/10/16 13:45:59 rgrimes Exp $
|
||||
* $Id: isa_device.h,v 1.3 1993/11/07 17:44:32 wollman Exp $
|
||||
*/
|
||||
|
||||
#ifndef _I386_ISA_ISA_DEVICE_H_
|
||||
@ -51,7 +51,7 @@ struct isa_device {
|
||||
short id_drq; /* DMA request */
|
||||
caddr_t id_maddr; /* physical i/o memory address on bus (if any)*/
|
||||
int id_msize; /* size of i/o memory */
|
||||
int (*id_intr)(); /* interrupt interface routine */
|
||||
void (*id_intr)(); /* interrupt interface routine */
|
||||
int id_unit; /* unit number */
|
||||
int id_flags; /* flags */
|
||||
int id_scsiid; /* scsi id if needed */
|
||||
@ -75,4 +75,8 @@ extern struct isa_device isa_devtab_bio[], isa_devtab_tty[], isa_devtab_net[],
|
||||
isa_devtab_null[];
|
||||
|
||||
extern struct isa_device *find_isadev(/* table, driver, unit*/);
|
||||
|
||||
extern void isa_dmastart(int, caddr_t, unsigned, unsigned);
|
||||
extern void isa_dmadone(int, caddr_t, int, int);
|
||||
|
||||
#endif /* _I386_ISA_ISA_DEVICE_H_ */
|
||||
|
@ -34,7 +34,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mcd.c,v 1.2 1993/10/16 13:46:13 rgrimes Exp $
|
||||
* $Id: mcd.c,v 1.3 1993/11/25 01:31:43 wollman Exp $
|
||||
*/
|
||||
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
|
||||
|
||||
@ -68,7 +68,7 @@ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
|
||||
#undef MCD_TO_WARNING_ON
|
||||
#endif
|
||||
#else
|
||||
#define MCD_TRACE(fmt,a,b,c,d) {if (mcd_data[unit].debug) {printf("mcd%d st=%02x: ",unit,mcd_data[unit].status); printf(fmt,a,b,c,d);}}
|
||||
#define MCD_TRACE(fmt,a,b,c,xd) {if (mcd_data[unit].debug) {printf("mcd%d st=%02x: ",unit,mcd_data[unit].status); printf(fmt,a,b,c,xd);}}
|
||||
#endif
|
||||
|
||||
#define mcd_part(dev) ((minor(dev)) & 7)
|
||||
@ -158,7 +158,7 @@ static void hsg2msf(int hsg, bcd_t *msf);
|
||||
static int msf2hsg(bcd_t *msf);
|
||||
static int mcd_volinfo(int unit);
|
||||
static int mcd_waitrdy(int port,int dly);
|
||||
static void mcd_doread(int state, struct mcd_mbx *mbxin);
|
||||
static void mcd_doread(caddr_t, int);
|
||||
#ifndef MCDMINI
|
||||
static int mcd_setmode(int unit, int mode);
|
||||
static int mcd_getqchan(int unit, struct mcd_qchninfo *q);
|
||||
@ -397,7 +397,7 @@ static void mcd_start(int unit)
|
||||
cd->mbx.p_offset = p->p_offset;
|
||||
|
||||
/* calling the read routine */
|
||||
mcd_doread(MCD_S_BEGIN,&(cd->mbx));
|
||||
mcd_doread((caddr_t)MCD_S_BEGIN, (int)&(cd->mbx));
|
||||
/* triggers mcd_start, when successful finished */
|
||||
return;
|
||||
}
|
||||
@ -811,8 +811,13 @@ mcdintr(unit)
|
||||
*/
|
||||
static struct mcd_mbx *mbxsave;
|
||||
|
||||
static void mcd_doread(int state, struct mcd_mbx *mbxin)
|
||||
/*
|
||||
* Good thing Alphas come with real CD players...
|
||||
*/
|
||||
static void mcd_doread(caddr_t xstate, int xmbxin)
|
||||
{
|
||||
int state = (int)xstate;
|
||||
struct mcd_mbx *mbxin = (struct mcd_mbx *)xmbxin;
|
||||
struct mcd_mbx *mbx = (state!=MCD_S_BEGIN) ? mbxsave : mbxin;
|
||||
int unit = mbx->unit;
|
||||
int port = mbx->port;
|
||||
@ -836,7 +841,7 @@ static void mcd_doread(int state, struct mcd_mbx *mbxin)
|
||||
timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */
|
||||
return;
|
||||
case MCD_S_WAITSTAT:
|
||||
untimeout(mcd_doread,MCD_S_WAITSTAT);
|
||||
untimeout(mcd_doread, (caddr_t)MCD_S_WAITSTAT);
|
||||
if (mbx->count-- >= 0) {
|
||||
if (inb(port+mcd_xfer) & MCD_ST_BUSY) {
|
||||
timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */
|
||||
@ -873,7 +878,7 @@ static void mcd_doread(int state, struct mcd_mbx *mbxin)
|
||||
}
|
||||
|
||||
case MCD_S_WAITMODE:
|
||||
untimeout(mcd_doread,MCD_S_WAITMODE);
|
||||
untimeout(mcd_doread, (caddr_t)MCD_S_WAITMODE);
|
||||
if (mbx->count-- < 0) {
|
||||
#ifdef MCD_TO_WARNING_ON
|
||||
printf("mcd%d: timeout set mode\n",unit);
|
||||
@ -911,7 +916,7 @@ static void mcd_doread(int state, struct mcd_mbx *mbxin)
|
||||
timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITREAD,hz/100); /* XXX */
|
||||
return;
|
||||
case MCD_S_WAITREAD:
|
||||
untimeout(mcd_doread,MCD_S_WAITREAD);
|
||||
untimeout(mcd_doread,(caddr_t)MCD_S_WAITREAD);
|
||||
if (mbx->count-- > 0) {
|
||||
k = inb(port+mcd_xfer);
|
||||
if ((k & 2)==0) {
|
||||
|
@ -510,9 +510,9 @@ DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode)
|
||||
printk ("sound: Invalid DMA mode for device %d\n", dev);
|
||||
|
||||
isa_dmastart ((dma_mode == DMA_MODE_READ) ? B_READ : B_WRITE,
|
||||
snd_raw_buf_phys[dev][0],
|
||||
sound_buffsizes[dev],
|
||||
chan);
|
||||
(caddr_t)snd_raw_buf_phys[dev][0],
|
||||
(unsigned)sound_buffsizes[dev],
|
||||
(unsigned)chan);
|
||||
#else
|
||||
#ifdef ISC
|
||||
printk ("sound: Invalid DMA mode for device %d\n", dev);
|
||||
@ -540,7 +540,7 @@ DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode)
|
||||
#else
|
||||
#ifdef __386BSD__
|
||||
isa_dmastart ((dma_mode == DMA_MODE_READ) ? B_READ : B_WRITE,
|
||||
physaddr,
|
||||
(caddr_t)physaddr,
|
||||
count,
|
||||
chan);
|
||||
#else
|
||||
|
@ -110,12 +110,12 @@ typedef struct uio snd_rw_buf;
|
||||
* user space. The count is number of bytes to be moved.
|
||||
*/
|
||||
#define COPY_FROM_USER(target, source, offs, count) \
|
||||
do { if (uiomove(target, count, source)) { \
|
||||
do { if (uiomove(target, count, (struct uio *)source)) { \
|
||||
printf ("sb: Bad copyin()!\n"); \
|
||||
} } while(0)
|
||||
/* Like COPY_FOM_USER but for writes. */
|
||||
#define COPY_TO_USER(target, offs, source, count) \
|
||||
do { if (uiomove(source, count, target)) { \
|
||||
do { if (uiomove(source, count, (struct uio *)target)) { \
|
||||
printf ("sb: Bad copyout()!\n"); \
|
||||
} } while(0)
|
||||
/*
|
||||
@ -123,10 +123,10 @@ typedef struct uio snd_rw_buf;
|
||||
* short (16 bit) or long (32 bit) at a time.
|
||||
* The same restrictions apply than for COPY_*_USER
|
||||
*/
|
||||
#define GET_BYTE_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 1, addr);}
|
||||
#define GET_SHORT_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 2, addr);}
|
||||
#define GET_WORD_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 4, addr);}
|
||||
#define PUT_WORD_TO_USER(addr, offs, data) {uiomove((char*)&(data), 4, addr);}
|
||||
#define GET_BYTE_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 1, (struct uio *)addr);}
|
||||
#define GET_SHORT_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 2, (struct uio *)addr);}
|
||||
#define GET_WORD_FROM_USER(target, addr, offs) {uiomove((char*)&(target), 4, (struct uio *)addr);}
|
||||
#define PUT_WORD_TO_USER(addr, offs, data) {uiomove((char*)&(data), 4, (struct uio *)addr);}
|
||||
|
||||
/*
|
||||
* The way how the ioctl arguments are passed is another nonportable thing.
|
||||
@ -224,6 +224,7 @@ typedef struct uio snd_rw_buf;
|
||||
*
|
||||
*/
|
||||
#define GET_TIME() get_time()
|
||||
extern long get_time(void);
|
||||
/*#define GET_TIME() (lbolt)*/ /* Returns current time (1/HZ secs since boot) */
|
||||
|
||||
/*
|
||||
|
@ -75,7 +75,7 @@ int sndwrite (int dev, struct uio *uio);
|
||||
int sndselect (int dev, int rw);
|
||||
static void sound_mem_init(void);
|
||||
|
||||
int
|
||||
long
|
||||
get_time()
|
||||
{
|
||||
extern struct timeval time;
|
||||
@ -393,7 +393,7 @@ sndattach (struct isa_device *dev)
|
||||
static int midi_initialized = 0;
|
||||
static int seq_initialized = 0;
|
||||
static int generic_midi_initialized = 0;
|
||||
unsigned long mem_start = 0xefffffff;
|
||||
unsigned long mem_start = 0xefffffffUL;
|
||||
struct address_info hw_config;
|
||||
|
||||
hw_config.io_base = dev->id_iobase;
|
||||
@ -514,7 +514,7 @@ void
|
||||
sound_stop_timer (void)
|
||||
{
|
||||
if (timer_running)
|
||||
untimeout (sequencer_timer, 0);
|
||||
untimeout ((timeout_func_t)sequencer_timer, 0); /* XXX should fix */
|
||||
timer_running = 0;
|
||||
}
|
||||
|
||||
@ -555,7 +555,7 @@ sound_mem_init (void)
|
||||
|
||||
if (sound_buffsizes[dev] > dma_pagesize)
|
||||
sound_buffsizes[dev] = dma_pagesize;
|
||||
sound_buffsizes[dev] &= 0xfffff000; /* Truncate to n*4k */
|
||||
sound_buffsizes[dev] &= ~0xfff; /* Truncate to n*4k */
|
||||
if (sound_buffsizes[dev] < 4096)
|
||||
sound_buffsizes[dev] = 4096;
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
* commenced: Sun Sep 27 18:14:01 PDT 1992
|
||||
* slight mod to make work with 34F as well: Wed Jun 2 18:05:48 WST 1993
|
||||
*
|
||||
* $Id: ultra14f.c,v 1.12 1993/11/18 05:02:20 rgrimes Exp $
|
||||
* $Id: ultra14f.c,v 1.13 1993/11/25 01:31:50 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -46,11 +46,6 @@
|
||||
|
||||
#ifdef KERNEL
|
||||
#include "ddb.h"
|
||||
#if NDDB > 0
|
||||
int Debugger();
|
||||
#else /* NDDB */
|
||||
#define Debugger() panic("should call debugger here")
|
||||
#endif /* NDDB */
|
||||
#else /*KERNEL */
|
||||
#define NUHA 1
|
||||
#endif /*KERNEL */
|
||||
@ -321,7 +316,7 @@ uha_send_mbox(int unit, struct mscp *mscp)
|
||||
}
|
||||
if (spincount == 0) {
|
||||
printf("uha%d: uha_send_mbox, board not responding\n", unit);
|
||||
Debugger();
|
||||
Debugger("ultra14f");
|
||||
}
|
||||
outl(port + UHA_OGM0, KVTOPHYS(mscp));
|
||||
outb(port + UHA_LINT, (UHA_OGMINT));
|
||||
@ -348,7 +343,7 @@ uha_abort(int unit, struct mscp *mscp)
|
||||
if (spincount == 0);
|
||||
{
|
||||
printf("uha%d: uha_abort, board not responding\n", unit);
|
||||
Debugger();
|
||||
Debugger("ultra14f");
|
||||
}
|
||||
outl(port + UHA_OGM0, KVTOPHYS(mscp));
|
||||
outb(port + UHA_LINT, UHA_ABORT);
|
||||
@ -360,7 +355,7 @@ uha_abort(int unit, struct mscp *mscp)
|
||||
}
|
||||
if (abortcount == 0) {
|
||||
printf("uha%d: uha_abort, board not responding\n", unit);
|
||||
Debugger();
|
||||
Debugger("ultra14f");
|
||||
}
|
||||
if ((inb(port + UHA_SINT) & 0x10) != 0) {
|
||||
outb(port + UHA_SINT, UHA_ABORT_ACK);
|
||||
@ -528,7 +523,7 @@ uhaintr(unit)
|
||||
printf("uha: BAD MSCP RETURNED\n");
|
||||
return (0); /* whatever it was, it'll timeout */
|
||||
}
|
||||
untimeout(uha_timeout, mscp);
|
||||
untimeout(uha_timeout, (caddr_t)mscp);
|
||||
|
||||
uha_done(unit, mscp);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: wd.c,v 1.16 1993/11/23 21:36:37 nate Exp $
|
||||
* $Id: wd.c,v 1.17 1993/11/25 01:31:52 wollman Exp $
|
||||
*/
|
||||
|
||||
/* TODO:peel out buffer at low ipl, speed improvement */
|
||||
@ -46,6 +46,7 @@
|
||||
#include "param.h"
|
||||
#include "dkbad.h"
|
||||
#include "systm.h"
|
||||
#include "kernel.h"
|
||||
#include "conf.h"
|
||||
#include "file.h"
|
||||
#include "stat.h"
|
||||
@ -532,7 +533,7 @@ wdstart()
|
||||
}
|
||||
|
||||
/* then send it! */
|
||||
outsw (wdc+wd_data, addr+du->dk_skip * DEV_BSIZE,
|
||||
outsw (wdc + wd_data, (caddr_t)addr + du->dk_skip * DEV_BSIZE,
|
||||
DEV_BSIZE/sizeof(short));
|
||||
du->dk_bc -= DEV_BSIZE;
|
||||
wdtimeout_status[unit] = 2;
|
||||
@ -634,11 +635,11 @@ wdintr(struct intrframe wdif)
|
||||
|
||||
/* suck in data */
|
||||
insw (wdc+wd_data,
|
||||
(int)bp->b_un.b_addr + du->dk_skip * DEV_BSIZE, chk);
|
||||
(caddr_t)bp->b_un.b_addr + du->dk_skip * DEV_BSIZE, chk);
|
||||
du->dk_bc -= chk * sizeof(short);
|
||||
|
||||
/* for obselete fractional sector reads */
|
||||
while (chk++ < 256) insw (wdc+wd_data, &dummy, 1);
|
||||
while (chk++ < 256) insw (wdc + wd_data, (caddr_t)&dummy, 1);
|
||||
}
|
||||
|
||||
wdxfer[du->dk_unit]++;
|
||||
@ -1298,7 +1299,8 @@ wddump(dev_t dev) /* dump core after a system crash */
|
||||
blkcnt = secpercyl - (blknum % secpercyl);
|
||||
/* keep transfer within current cylinder */
|
||||
#endif
|
||||
pmap_enter(kernel_pmap, CADDR1, trunc_page(addr), VM_PROT_READ, TRUE);
|
||||
pmap_enter(kernel_pmap, (vm_offset_t)CADDR1,
|
||||
trunc_page(addr), VM_PROT_READ, TRUE);
|
||||
|
||||
/* compute disk address */
|
||||
cylin = blknum / secpercyl;
|
||||
|
@ -19,7 +19,7 @@
|
||||
* the original CMU copyright notice.
|
||||
*
|
||||
* Version 1.3, Thu Nov 11 12:09:13 MSK 1993
|
||||
* $Id$
|
||||
* $Id: wt.c,v 1.4 1993/12/13 18:38:43 alm Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -54,6 +54,8 @@
|
||||
#if NWT > 0
|
||||
|
||||
#include "sys/param.h"
|
||||
#include "systm.h"
|
||||
#include "kernel.h"
|
||||
#include "sys/buf.h"
|
||||
#include "sys/fcntl.h"
|
||||
#include "sys/malloc.h"
|
||||
@ -150,13 +152,11 @@ typedef struct {
|
||||
|
||||
wtinfo_t wttab[NWT]; /* tape info by unit number */
|
||||
|
||||
extern int hz; /* number of ticks per second */
|
||||
|
||||
static int wtwait (wtinfo_t *t, int catch, char *msg);
|
||||
static int wtcmd (wtinfo_t *t, int cmd);
|
||||
static int wtstart (wtinfo_t *t, unsigned mode, void *vaddr, unsigned len);
|
||||
static void wtdma (wtinfo_t *t);
|
||||
static void wtimer (wtinfo_t *t);
|
||||
static void wtimer (caddr_t, int);
|
||||
static void wtclock (wtinfo_t *t);
|
||||
static int wtreset (wtinfo_t *t);
|
||||
static int wtsense (wtinfo_t *t, int verb, int ignor);
|
||||
@ -166,16 +166,8 @@ static int wtreadfm (wtinfo_t *t);
|
||||
static int wtwritefm (wtinfo_t *t);
|
||||
static int wtpoll (wtinfo_t *t, int mask, int bits);
|
||||
|
||||
/* XXX */
|
||||
extern void DELAY (int usec);
|
||||
extern void bcopy (void *from, void *to, unsigned len);
|
||||
extern void isa_dmastart (int flags, void *addr, unsigned len, unsigned chan);
|
||||
extern void isa_dmadone (int flags, void *addr, unsigned len, int chan);
|
||||
extern void printf (char *str, ...);
|
||||
extern int splbio (void);
|
||||
extern int splx (int level);
|
||||
extern void timeout (void (*func) (), void *arg, int timo);
|
||||
extern int tsleep (void *chan, int priority, char *msg, int timo);
|
||||
extern void wakeup (void *chan);
|
||||
|
||||
/*
|
||||
* Probe for the presence of the device.
|
||||
@ -569,7 +561,7 @@ void wtintr (int u)
|
||||
"rewind busy?\n" : "rewind finished\n"));
|
||||
t->flags &= ~TPREW; /* Rewind finished. */
|
||||
wtsense (t, 1, TP_WRP);
|
||||
wakeup (t);
|
||||
wakeup ((caddr_t)t);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -582,7 +574,7 @@ void wtintr (int u)
|
||||
if (! (s & t->NOEXCEP)) /* operation failed */
|
||||
wtsense (t, 1, (t->flags & TPRMARK) ? TP_WRP : 0);
|
||||
t->flags &= ~(TPRMARK | TPWMARK); /* operation finished */
|
||||
wakeup (t);
|
||||
wakeup ((caddr_t)t);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -617,7 +609,7 @@ void wtintr (int u)
|
||||
t->flags |= TPVOL; /* end of file */
|
||||
else
|
||||
t->flags |= TPEXCEP; /* i/o error */
|
||||
wakeup (t);
|
||||
wakeup ((caddr_t)t);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -629,7 +621,7 @@ void wtintr (int u)
|
||||
}
|
||||
if (t->dmacount > t->dmatotal) /* short last block */
|
||||
t->dmacount = t->dmatotal;
|
||||
wakeup (t); /* wake up user level */
|
||||
wakeup ((caddr_t)t); /* wake up user level */
|
||||
DEBUG (("i/o finished, %d\n", t->dmacount));
|
||||
}
|
||||
|
||||
@ -670,7 +662,7 @@ static int wtreadfm (wtinfo_t *t)
|
||||
/* write marker to the tape */
|
||||
static int wtwritefm (wtinfo_t *t)
|
||||
{
|
||||
tsleep (wtwritefm, WTPRI, "wtwfm", hz); /* timeout: 1 second */
|
||||
tsleep ((caddr_t)wtwritefm, WTPRI, "wtwfm", hz); /* timeout: 1 second */
|
||||
t->flags &= ~(TPRO | TPWO);
|
||||
if (! wtcmd (t, QIC_WRITEFM)) {
|
||||
wtsense (t, 1, 0);
|
||||
@ -703,7 +695,7 @@ static int wtpoll (wtinfo_t *t, int mask, int bits)
|
||||
s = inb (t->STATPORT);
|
||||
if ((s & mask) != bits)
|
||||
return (s);
|
||||
tsleep (wtpoll, WTPRI, "wtpoll", 1); /* timeout: 1 tick */
|
||||
tsleep ((caddr_t)wtpoll, WTPRI, "wtpoll", 1); /* timeout: 1 tick */
|
||||
}
|
||||
}
|
||||
|
||||
@ -733,7 +725,7 @@ static int wtwait (wtinfo_t *t, int catch, char *msg)
|
||||
|
||||
DEBUG (("wtwait() `%s'\n", msg));
|
||||
while (t->flags & (TPACTIVE | TPREW | TPRMARK | TPWMARK))
|
||||
if (error = tsleep (t, WTPRI | catch, msg, 0))
|
||||
if (error = tsleep ((caddr_t)t, WTPRI | catch, msg, 0))
|
||||
return (error);
|
||||
return (0);
|
||||
}
|
||||
@ -781,7 +773,7 @@ static void wtclock (wtinfo_t *t)
|
||||
t->flags |= TPTIMER;
|
||||
/* Some controllers seem to lose dma interrupts too often.
|
||||
* To make the tape stream we need 1 tick timeout. */
|
||||
timeout (wtimer, t, (t->flags & TPACTIVE) ? 1 : hz);
|
||||
timeout (wtimer, (caddr_t)t, (t->flags & TPACTIVE) ? 1 : hz);
|
||||
}
|
||||
}
|
||||
|
||||
@ -790,8 +782,9 @@ static void wtclock (wtinfo_t *t)
|
||||
* This is necessary in case interrupts get eaten due to
|
||||
* multiple devices on a single IRQ line.
|
||||
*/
|
||||
static void wtimer (wtinfo_t *t)
|
||||
static void wtimer (caddr_t xt, int dummy)
|
||||
{
|
||||
wtinfo_t *t = (wtinfo_t *)xt;
|
||||
int s;
|
||||
|
||||
t->flags &= ~TPTIMER;
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.3 1993/11/04 01:56:31 ache Exp $
|
||||
* $Id: clock.c,v 1.4 1993/11/25 01:31:29 wollman Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -233,7 +233,7 @@ resettodr()
|
||||
* Wire clock interrupt in.
|
||||
*/
|
||||
#define V(s) __CONCAT(V, s)
|
||||
extern V(clk)();
|
||||
extern void V(clk)();
|
||||
|
||||
void
|
||||
enablertclock()
|
||||
|
14
sys/isa/fd.c
14
sys/isa/fd.c
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
* $Id: fd.c,v 1.14 1993/12/16 19:47:42 ache Exp $
|
||||
* $Id: fd.c,v 1.16 1993/12/19 00:40:49 ache Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -165,6 +165,8 @@ typedef int fdsu_t;
|
||||
typedef struct fd_data *fd_p;
|
||||
typedef struct fdc_data *fdc_p;
|
||||
|
||||
static int retrier(fdcu_t);
|
||||
|
||||
#define DEVIDLE 0
|
||||
#define FINDWORK 1
|
||||
#define DOSEEK 2
|
||||
@ -391,7 +393,7 @@ void fdstrategy(struct buf *bp)
|
||||
dp = &(fdc->head);
|
||||
s = splbio();
|
||||
disksort(dp, bp);
|
||||
untimeout(fd_turnoff,fdu); /* a good idea */
|
||||
untimeout(fd_turnoff, (caddr_t)fdu); /* a good idea */
|
||||
fdstart(fdcu);
|
||||
splx(s);
|
||||
return;
|
||||
@ -762,7 +764,7 @@ fdstate(fdcu, fdc)
|
||||
TRACE1("fd%d",fdu);
|
||||
TRACE1("[%s]",fdstates[fdc->state]);
|
||||
TRACE1("(0x%x)",fd->flags);
|
||||
untimeout(fd_turnoff, fdu);
|
||||
untimeout(fd_turnoff, (caddr_t)fdu);
|
||||
timeout(fd_turnoff, (caddr_t)fdu, 4 * hz);
|
||||
switch (fdc->state)
|
||||
{
|
||||
@ -810,7 +812,7 @@ fdstate(fdcu, fdc)
|
||||
timeout(fd_timeout, (caddr_t)fdcu, 2 * hz);
|
||||
return(0); /* will return later */
|
||||
case SEEKWAIT:
|
||||
untimeout(fd_timeout,fdcu);
|
||||
untimeout(fd_timeout, (caddr_t)fdcu);
|
||||
/* allow heads to settle */
|
||||
timeout(fd_pseudointr, (caddr_t)fdcu, hz / 50);
|
||||
fdc->state = SEEKCOMPLETE;
|
||||
@ -883,7 +885,7 @@ fdstate(fdcu, fdc)
|
||||
timeout(fd_timeout, (caddr_t)fdcu, 2 * hz);
|
||||
return(0); /* will return later */
|
||||
case IOCOMPLETE: /* IO DONE, post-analyze */
|
||||
untimeout(fd_timeout,fdcu);
|
||||
untimeout(fd_timeout, (caddr_t)fdcu);
|
||||
for(i=0;i<7;i++)
|
||||
{
|
||||
fdc->status[i] = in_fdc(fdcu);
|
||||
@ -994,7 +996,7 @@ fdstate(fdcu, fdc)
|
||||
return(1); /* Come back immediatly to new state */
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
retrier(fdcu)
|
||||
fdcu_t fdcu;
|
||||
{
|
||||
|
@ -45,12 +45,12 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: subr_rlist.c,v 1.2 1993/10/16 15:24:44 rgrimes Exp $
|
||||
* $Id: subr_rlist.c,v 1.3 1993/11/25 01:33:18 wollman Exp $
|
||||
*/
|
||||
|
||||
#include "sys/param.h"
|
||||
#include "sys/cdefs.h"
|
||||
#include "sys/malloc.h"
|
||||
#include "param.h"
|
||||
#include "systm.h"
|
||||
#include "malloc.h"
|
||||
#include "rlist.h"
|
||||
|
||||
/*
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.10 1993/12/03 05:07:45 alm Exp $
|
||||
* $Id: trap.c,v 1.11 1993/12/12 12:22:57 davidg Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -59,6 +59,7 @@
|
||||
#include "vm/vm_param.h"
|
||||
#include "vm/pmap.h"
|
||||
#include "vm/vm_map.h"
|
||||
#include "vm/vm_user.h"
|
||||
#include "sys/vmmeter.h"
|
||||
|
||||
#include "machine/trap.h"
|
||||
@ -70,7 +71,7 @@
|
||||
* we omit the size from the mov instruction to avoid nonfatal bugs in gas.
|
||||
*/
|
||||
#define read_gs() ({ u_short gs; __asm("mov %%gs,%0" : "=r" (gs)); gs; })
|
||||
#define write_gs(gs) __asm("mov %0,%%gs" : : "r" ((u_short) gs))
|
||||
#define write_gs(newgs) __asm("mov %0,%%gs" : : "r" ((u_short) newgs))
|
||||
|
||||
#else /* not __GNUC__ */
|
||||
|
||||
@ -81,7 +82,6 @@ void write_gs __P((/* promoted u_short */ int gs));
|
||||
|
||||
struct sysent sysent[];
|
||||
int nsysent;
|
||||
unsigned rcr2();
|
||||
extern short cpl;
|
||||
|
||||
#define MAX_TRAP_MSG 27
|
||||
@ -353,7 +353,8 @@ if(curpcb == 0 || curproc == 0) goto we_re_toast;
|
||||
v = vm->vm_maxsaddr;
|
||||
grow_amount = MAXSSIZ - (vm->vm_ssize << PGSHIFT);
|
||||
}
|
||||
if (vm_allocate(&vm->vm_map, &v, grow_amount, FALSE) !=
|
||||
if (vm_allocate(&vm->vm_map, (vm_offset_t *)&v,
|
||||
grow_amount, FALSE) !=
|
||||
KERN_SUCCESS) {
|
||||
goto nogo;
|
||||
}
|
||||
@ -363,10 +364,11 @@ if(curpcb == 0 || curproc == 0) goto we_re_toast;
|
||||
/* check if page table is mapped, if not, fault it first */
|
||||
if (!pde_v(va)) {
|
||||
v = (char *)trunc_page(vtopte(va));
|
||||
rv = vm_fault(map, v, ftype, FALSE);
|
||||
rv = vm_fault(map, (vm_offset_t)v, ftype, FALSE);
|
||||
if (rv != KERN_SUCCESS) goto nogo;
|
||||
/* check if page table fault, increment wiring */
|
||||
vm_map_pageable(map, v, round_page(v+1), FALSE);
|
||||
vm_map_pageable(map, (vm_offset_t)v,
|
||||
round_page(v+1), FALSE);
|
||||
} else v=0;
|
||||
rv = vm_fault(map, va, ftype, FALSE);
|
||||
if (rv == KERN_SUCCESS) {
|
||||
@ -543,8 +545,9 @@ int trapwrite(addr)
|
||||
v = vm->vm_maxsaddr;
|
||||
grow_amount = MAXSSIZ - (vm->vm_ssize << PGSHIFT);
|
||||
}
|
||||
if (vm_allocate(&vm->vm_map, &v, grow_amount, FALSE) !=
|
||||
KERN_SUCCESS) {
|
||||
if (vm_allocate(&vm->vm_map, (vm_offset_t *)&v,
|
||||
grow_amount, FALSE)
|
||||
!= KERN_SUCCESS) {
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
@ -613,13 +616,13 @@ syscall(frame)
|
||||
frame.sf_eflags |= PSL_C; /* carry bit */
|
||||
#ifdef KTRACE
|
||||
if (KTRPOINT(p, KTR_SYSCALL))
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, &args);
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, args);
|
||||
#endif
|
||||
goto done;
|
||||
}
|
||||
#ifdef KTRACE
|
||||
if (KTRPOINT(p, KTR_SYSCALL))
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, &args);
|
||||
ktrsyscall(p->p_tracep, code, callp->sy_narg, args);
|
||||
#endif
|
||||
rval[0] = 0;
|
||||
rval[1] = frame.sf_edx;
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
|
||||
*
|
||||
* $Id: cd.c,v 1.12 1993/11/18 05:02:46 rgrimes Exp $
|
||||
* $Id: cd.c,v 1.13 1993/11/25 01:37:28 wollman Exp $
|
||||
*/
|
||||
|
||||
#define SPLCD splbio
|
||||
@ -40,11 +40,18 @@
|
||||
#include <scsi/scsi_disk.h> /* rw_big and start_stop come from there */
|
||||
#include <scsi/scsiconf.h>
|
||||
|
||||
/* static function prototypes */
|
||||
static errval cd_get_parms(int, int);
|
||||
static errval cd_get_mode(u_int32, struct cd_mode_data *, u_int32);
|
||||
static errval cd_set_mode(u_int32 unit, struct cd_mode_data *);
|
||||
static errval cd_read_toc(u_int32, u_int32, u_int32, struct cd_toc_entry *,
|
||||
u_int32);
|
||||
|
||||
|
||||
int32 cdstrats, cdqueues;
|
||||
|
||||
#include <ddb.h>
|
||||
#if NDDB > 0
|
||||
int Debugger();
|
||||
#else /* NDDB > 0 */
|
||||
#define Debugger()
|
||||
#endif /* NDDB > 0 */
|
||||
@ -59,7 +66,6 @@ int Debugger();
|
||||
#define RAW_PART 3
|
||||
#define UNIT(z) ( (minor(z) >> UNITSHIFT) )
|
||||
|
||||
extern int hz;
|
||||
errval cdstrategy();
|
||||
|
||||
void cdstart();
|
||||
@ -509,7 +515,7 @@ cdstart(unit)
|
||||
*/
|
||||
bzero(&cmd, sizeof(cmd));
|
||||
cmd.op_code = READ_BIG;
|
||||
cmd.addr_3 = (blkno & 0xff000000) >> 24;
|
||||
cmd.addr_3 = (blkno & 0xff000000UL) >> 24;
|
||||
cmd.addr_2 = (blkno & 0xff0000) >> 16;
|
||||
cmd.addr_1 = (blkno & 0xff00) >> 8;
|
||||
cmd.addr_0 = blkno & 0xff;
|
||||
@ -680,12 +686,14 @@ cdioctl(dev_t dev, int cmd, caddr_t addr, int flag)
|
||||
}
|
||||
break;
|
||||
case CDIOREADTOCHEADER:
|
||||
{
|
||||
{ /* ??? useless bcopy? XXX */
|
||||
struct ioc_toc_header th;
|
||||
if (error = cd_read_toc(unit, 0, 0, &th, sizeof(th)))
|
||||
if (error = cd_read_toc(unit, 0, 0,
|
||||
(struct cd_toc_entry *)&th,
|
||||
sizeof th))
|
||||
break;
|
||||
th.len = (th.len & 0xff) << 8 + ((th.len >> 8) & 0xff);
|
||||
bcopy(&th, addr, sizeof(th));
|
||||
bcopy(&th, addr, sizeof th);
|
||||
}
|
||||
break;
|
||||
case CDIOREADTOCENTRYS:
|
||||
@ -971,7 +979,7 @@ cd_size(unit, flags)
|
||||
/*
|
||||
* Get the requested page into the buffer given
|
||||
*/
|
||||
errval
|
||||
static errval
|
||||
cd_get_mode(unit, data, page)
|
||||
u_int32 unit;
|
||||
struct cd_mode_data *data;
|
||||
@ -1218,10 +1226,11 @@ cd_read_subchannel(unit, mode, format, track, data, len)
|
||||
/*
|
||||
* Read table of contents
|
||||
*/
|
||||
errval
|
||||
static errval
|
||||
cd_read_toc(unit, mode, start, data, len)
|
||||
u_int32 unit, mode, start, len;
|
||||
u_int32 unit, mode, start;
|
||||
struct cd_toc_entry *data;
|
||||
u_int32 len;
|
||||
{
|
||||
struct scsi_read_toc scsi_cmd;
|
||||
errval error;
|
||||
@ -1256,7 +1265,7 @@ cd_read_toc(unit, mode, start, data, len)
|
||||
* Get the scsi driver to send a full inquiry to the device and use the
|
||||
* results to fill out the disk parameter structure.
|
||||
*/
|
||||
errval
|
||||
static errval
|
||||
cd_get_parms(unit, flags)
|
||||
int unit;
|
||||
int flags;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Written by grefen@?????
|
||||
* Based on scsi drivers by Julian Elischer (julian@tfs.com)
|
||||
*
|
||||
* $Id: ch.c,v 1.5 1993/11/18 05:02:48 rgrimes Exp $
|
||||
* $Id: ch.c,v 1.6 1993/11/25 01:37:31 wollman Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -22,6 +22,8 @@
|
||||
#include <scsi/scsi_changer.h>
|
||||
#include <scsi/scsiconf.h>
|
||||
|
||||
static errval ch_mode_sense(u_int32, u_int32);
|
||||
|
||||
struct scsi_xfer ch_scsi_xfer[NCH];
|
||||
u_int32 ch_xfer_block_wait[NCH];
|
||||
|
||||
@ -233,7 +235,7 @@ chioctl(dev, cmd, arg, mode)
|
||||
unit = UNIT(dev);
|
||||
sc_link = ch_data[unit].sc_link;
|
||||
|
||||
switch (cmd) {
|
||||
switch ((int)cmd) {
|
||||
case CHIOOP:{
|
||||
struct chop *ch = (struct chop *) arg;
|
||||
SC_DEBUG(sc_link, SDEV_DB2,
|
||||
@ -384,7 +386,7 @@ ch_position(unit, stat, chm, to, flags)
|
||||
* device and use the results to fill out the global
|
||||
* parameter structure.
|
||||
*/
|
||||
errval
|
||||
static errval
|
||||
ch_mode_sense(unit, flags)
|
||||
u_int32 unit, flags;
|
||||
{
|
||||
@ -449,7 +451,7 @@ ch_mode_sense(unit, flags)
|
||||
u_int32 pc = (*b++) & 0x3f;
|
||||
u_int32 pl = *b++;
|
||||
u_char *bb = b;
|
||||
switch (pc) {
|
||||
switch ((int)pc) {
|
||||
case 0x1d:
|
||||
ch_data[unit].chmo = p2copy(bb);
|
||||
ch_data[unit].chms = p2copy(bb);
|
||||
|
@ -8,13 +8,13 @@
|
||||
* file.
|
||||
*
|
||||
* Written by Julian Elischer (julian@dialix.oz.au)
|
||||
* $Id: scsi_base.c,v 1.1 1993/11/18 05:02:51 rgrimes Exp $
|
||||
* $Id: scsi_base.c,v 1.2 1993/11/25 06:30:58 davidg Exp $
|
||||
*/
|
||||
|
||||
#define SPLSD splbio
|
||||
#define ESUCCESS 0
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include "systm.h"
|
||||
#include <sys/buf.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -23,6 +23,9 @@
|
||||
#include <scsi/scsi_disk.h>
|
||||
#include <scsi/scsiconf.h>
|
||||
|
||||
static errval sc_err1(struct scsi_xfer *);
|
||||
static errval scsi_interpret_sense(struct scsi_xfer *);
|
||||
|
||||
#ifdef NetBSD
|
||||
#ifdef DDB
|
||||
int Debugger();
|
||||
@ -30,9 +33,8 @@ int Debugger();
|
||||
#define Debugger()
|
||||
#endif /* DDB */
|
||||
#else /* NetBSD */
|
||||
#include <ddb.h>
|
||||
#include "ddb.h"
|
||||
#if NDDB > 0
|
||||
int Debugger();
|
||||
#else /* NDDB > 0 */
|
||||
#define Debugger()
|
||||
#endif /* NDDB > 0 */
|
||||
@ -70,7 +72,7 @@ get_xs(sc_link, flags)
|
||||
return 0;
|
||||
}
|
||||
sc_link->flags |= SDEV_WAITING;
|
||||
sleep(sc_link, PRIBIO);
|
||||
tsleep((caddr_t)sc_link, PRIBIO, "scsiget", 0);
|
||||
}
|
||||
sc_link->opennings--;
|
||||
if (xs = next_free_xs) {
|
||||
@ -110,7 +112,7 @@ free_xs(xs, sc_link, flags)
|
||||
/* if was 0 and someone waits, wake them up */
|
||||
if ((!sc_link->opennings++) && (sc_link->flags & SDEV_WAITING)) {
|
||||
sc_link->flags &= ~SDEV_WAITING;
|
||||
wakeup(sc_link); /* remember, it wakes them ALL up */
|
||||
wakeup((caddr_t)sc_link); /* remember, it wakes them ALL up */
|
||||
} else {
|
||||
if (sc_link->device->start) {
|
||||
SC_DEBUG(sc_link, SDEV_DB2, ("calling private start()\n"));
|
||||
@ -347,7 +349,7 @@ scsi_done(xs)
|
||||
* the upper level code to handle error checking
|
||||
* rather than doing it here at interrupt time
|
||||
*/
|
||||
wakeup(xs);
|
||||
wakeup((caddr_t)xs);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
@ -409,7 +411,7 @@ scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen,
|
||||
xs->resid = datalen;
|
||||
xs->bp = bp;
|
||||
/*XXX*/ /*use constant not magic number */
|
||||
if (datalen && ((caddr_t) data_addr < (caddr_t) 0xfe000000)) {
|
||||
if (datalen && ((caddr_t) data_addr < (caddr_t) 0xfe000000UL)) {
|
||||
if (bp) {
|
||||
printf("Data buffered space not in kernel context\n");
|
||||
#ifdef SCSIDEBUG
|
||||
@ -420,7 +422,7 @@ scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen,
|
||||
}
|
||||
xs->data = malloc(datalen, M_TEMP, M_WAITOK);
|
||||
/* I think waiting is ok *//*XXX */
|
||||
switch (flags & (SCSI_DATA_IN | SCSI_DATA_OUT)) {
|
||||
switch ((int)(flags & (SCSI_DATA_IN | SCSI_DATA_OUT))) {
|
||||
case 0:
|
||||
printf("No direction flags, assuming both\n");
|
||||
#ifdef SCSIDEBUG
|
||||
@ -466,8 +468,9 @@ scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen,
|
||||
if (bp)
|
||||
return retval; /* will sleep (or not) elsewhere */
|
||||
s = splbio();
|
||||
while (!(xs->flags & ITSDONE))
|
||||
sleep(xs, PRIBIO + 1);
|
||||
while (!(xs->flags & ITSDONE)) {
|
||||
tsleep((caddr_t)xs, PRIBIO + 1, "scsicmd", 0);
|
||||
}
|
||||
splx(s);
|
||||
/* fall through to check success of completed command */
|
||||
case COMPLETE: /* Polling command completed ok */
|
||||
@ -493,7 +496,7 @@ scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen,
|
||||
* and free the memory buffer
|
||||
*/
|
||||
if (datalen && (xs->data != data_addr)) {
|
||||
switch (flags & (SCSI_DATA_IN | SCSI_DATA_OUT)) {
|
||||
switch ((int)(flags & (SCSI_DATA_IN | SCSI_DATA_OUT))) {
|
||||
case 0:
|
||||
case SCSI_DATA_IN | SCSI_DATA_OUT: /* weird */
|
||||
case SCSI_DATA_IN:
|
||||
@ -516,7 +519,7 @@ scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen,
|
||||
return (retval);
|
||||
}
|
||||
|
||||
errval
|
||||
static errval
|
||||
sc_err1(xs)
|
||||
struct scsi_xfer *xs;
|
||||
{
|
||||
@ -531,7 +534,7 @@ sc_err1(xs)
|
||||
* errors at inetrrupt time. We have probably
|
||||
* been called by scsi_done()
|
||||
*/
|
||||
switch (xs->error) {
|
||||
switch ((int)xs->error) {
|
||||
case XS_NOERROR: /* nearly always hit this one */
|
||||
retval = ESUCCESS;
|
||||
if (bp) {
|
||||
@ -560,6 +563,8 @@ sc_err1(xs)
|
||||
|
||||
case XS_BUSY:
|
||||
/*should somehow arange for a 1 sec delay here (how?) */
|
||||
/* XXX tsleep(&localvar, priority, "foo", hz);
|
||||
that's how! */
|
||||
case XS_TIMEOUT:
|
||||
/*
|
||||
* If we can, resubmit it to the adapter.
|
||||
@ -593,7 +598,7 @@ sc_err1(xs)
|
||||
*
|
||||
* THIS IS THE DEFAULT ERROR HANDLER
|
||||
*/
|
||||
errval
|
||||
static errval
|
||||
scsi_interpret_sense(xs)
|
||||
struct scsi_xfer *xs;
|
||||
{
|
||||
@ -680,7 +685,7 @@ scsi_interpret_sense(xs)
|
||||
sc_print_addr(sc_link);
|
||||
printf("%s", error_mes[key - 1]);
|
||||
if (sense->error_code & SSD_ERRCODE_VALID) {
|
||||
switch (key) {
|
||||
switch ((int)key) {
|
||||
case 0x2: /* NOT READY */
|
||||
case 0x5: /* ILLEGAL REQUEST */
|
||||
case 0x6: /* UNIT ATTENTION */
|
||||
@ -696,7 +701,7 @@ scsi_interpret_sense(xs)
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
switch (key) {
|
||||
switch ((int)key) {
|
||||
case 0x0: /* NO SENSE */
|
||||
case 0x1: /* RECOVERED ERROR */
|
||||
if (xs->resid == xs->datalen)
|
||||
|
@ -6,9 +6,9 @@
|
||||
*
|
||||
*
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/param.h>
|
||||
#include "systm.h"
|
||||
#include <sys/errno.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/buf.h>
|
||||
#define b_screq b_driver1 /* a patch in buf.h */
|
||||
@ -57,7 +57,7 @@ struct scsi_xfer *xs;
|
||||
SC_DEBUG(xs->sc_link,SDEV_DB2,("user-done\n"));
|
||||
screq->retsts = 0;
|
||||
screq->status = xs->status;
|
||||
switch(xs->error) {
|
||||
switch((int)xs->error) {
|
||||
case XS_NOERROR:
|
||||
SC_DEBUG(xs->sc_link,SDEV_DB3,("no error\n"));
|
||||
screq->datalen_used = xs->datalen - xs->resid; /* probably rubbish */
|
||||
@ -238,7 +238,7 @@ errval scsi_do_ioctl(struct scsi_link *sc_link, int cmd, caddr_t addr, int f)
|
||||
caddr_t d_addr;
|
||||
int len;
|
||||
|
||||
if((unsigned int)screq < (unsigned int)0xfe000000)
|
||||
if((unsigned int)screq < (unsigned int)0xfe000000UL)
|
||||
{
|
||||
screq = malloc(sizeof(scsireq_t),M_TEMP,M_WAITOK);
|
||||
bcopy(screq2,screq,sizeof(scsireq_t));
|
||||
@ -269,7 +269,7 @@ errval scsi_do_ioctl(struct scsi_link *sc_link, int cmd, caddr_t addr, int f)
|
||||
ret = bp->b_error;
|
||||
}
|
||||
free(bp,M_TEMP);
|
||||
if((unsigned int)screq2 < (unsigned int)0xfe000000)
|
||||
if((unsigned int)screq2 < (unsigned int)0xfe000000UL)
|
||||
{
|
||||
bcopy(screq,screq2,sizeof(scsireq_t));
|
||||
free(screq,M_TEMP);
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
|
||||
*
|
||||
* $Id: scsiconf.c,v 2.6 93/10/24 12:43:51 julian Exp Locker: julian $
|
||||
* $Id: scsiconf.c,v 1.7 1993/11/18 05:02:58 rgrimes Exp $
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -485,7 +485,7 @@ scsi_probedev(sc_link, maybe_more)
|
||||
* is vendor specific and won't match in this switch.
|
||||
*/
|
||||
|
||||
switch (qualifier) {
|
||||
switch ((int)qualifier) {
|
||||
case SID_QUAL_LU_OK:
|
||||
qtype = "";
|
||||
break;
|
||||
@ -517,7 +517,7 @@ scsi_probedev(sc_link, maybe_more)
|
||||
break;
|
||||
}
|
||||
if (dtype == 0) {
|
||||
switch (type) {
|
||||
switch ((int)type) {
|
||||
case T_DIRECT:
|
||||
dtype = "direct";
|
||||
break;
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
|
||||
*
|
||||
* $Id: scsiconf.h,v 2.4 93/10/16 00:59:13 julian Exp Locker: julian $
|
||||
* $Id: scsiconf.h,v 1.7 1993/11/18 05:02:59 rgrimes Exp $
|
||||
*/
|
||||
#ifndef SCSI_SCSICONF_H
|
||||
#define SCSI_SCSICONF_H 1
|
||||
@ -242,5 +242,7 @@ void show_mem(unsigned char * , u_int32);
|
||||
void lto3b __P((int val, u_char *bytes));
|
||||
int _3btol __P((u_char *bytes));
|
||||
|
||||
extern void sc_print_addr(struct scsi_link *);
|
||||
|
||||
#endif /*SCSI_SCSICONF_H*/
|
||||
/* END OF FILE */
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
|
||||
*
|
||||
* $Id: sd.c,v 1.12 1993/11/18 05:03:02 rgrimes Exp $
|
||||
* $Id: sd.c,v 1.13 1993/11/25 01:37:34 wollman Exp $
|
||||
*/
|
||||
|
||||
#define SPLSD splbio
|
||||
@ -48,9 +48,8 @@ int Debugger();
|
||||
#else /* NetBSD */
|
||||
#include <ddb.h>
|
||||
#if NDDB > 0
|
||||
int Debugger();
|
||||
#else /* NDDB > 0 */
|
||||
#define Debugger()
|
||||
#define Debugger(s)
|
||||
#endif /* NDDB > 0 */
|
||||
#endif
|
||||
|
||||
@ -271,7 +270,7 @@ sdopen(dev)
|
||||
if (sd->params.secsiz != SECSIZE) { /* XXX One day... */
|
||||
printf("sd%d: Can't deal with %d bytes logical blocks\n",
|
||||
unit, sd->params.secsiz);
|
||||
Debugger();
|
||||
Debugger("sd");
|
||||
errcode = ENXIO;
|
||||
goto bad;
|
||||
}
|
||||
@ -516,7 +515,7 @@ sdstart(unit)
|
||||
bzero(&cmd, sizeof(cmd));
|
||||
cmd.op_code = (bp->b_flags & B_READ)
|
||||
? READ_BIG : WRITE_BIG;
|
||||
cmd.addr_3 = (blkno & 0xff000000) >> 24;
|
||||
cmd.addr_3 = (blkno & 0xff000000UL) >> 24;
|
||||
cmd.addr_2 = (blkno & 0xff0000) >> 16;
|
||||
cmd.addr_1 = (blkno & 0xff00) >> 8;
|
||||
cmd.addr_0 = blkno & 0xff;
|
||||
|
@ -21,13 +21,13 @@
|
||||
* 16 Feb 93 Julian Elischer ADDED for SCSI system
|
||||
* 1.15 is the last version to support MACH and OSF/1
|
||||
*/
|
||||
/* $Revision: 2.6 $ */
|
||||
/* $Revision: 1.13 $ */
|
||||
|
||||
/*
|
||||
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
|
||||
* major changes by Julian Elischer (julian@jules.dialix.oz.au) May 1993
|
||||
*
|
||||
* $Id: st.c,v 2.6 93/10/21 03:24:38 julian Exp Locker: julian $
|
||||
* $Id: st.c,v 1.13 1993/11/18 05:03:05 rgrimes Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -736,7 +736,7 @@ st_decide_mode(unit, first_read)
|
||||
*
|
||||
* Our first shot at a method is, "The quirks made me do it!"
|
||||
*/
|
||||
switch (st->quirks & (ST_Q_FORCE_FIXED_MODE | ST_Q_FORCE_VAR_MODE)) {
|
||||
switch ((int)(st->quirks & (ST_Q_FORCE_FIXED_MODE | ST_Q_FORCE_VAR_MODE))) {
|
||||
case (ST_Q_FORCE_FIXED_MODE | ST_Q_FORCE_VAR_MODE):
|
||||
printf("st%d: bad quirks\n", unit);
|
||||
return (EINVAL);
|
||||
@ -772,7 +772,7 @@ st_decide_mode(unit, first_read)
|
||||
* If the tape density mandates (or even suggests) use of fixed
|
||||
* or variable-length blocks, comply.
|
||||
*/
|
||||
switch (st->density) {
|
||||
switch ((int)st->density) {
|
||||
case HALFINCH_800:
|
||||
case HALFINCH_1600:
|
||||
case HALFINCH_6250:
|
||||
@ -833,7 +833,7 @@ st_decide_mode(unit, first_read)
|
||||
* first read.
|
||||
* (I think this should be a by-product of fixed/variable..julian)
|
||||
*/
|
||||
switch (st->density) {
|
||||
switch ((int)st->density) {
|
||||
/* case 8 mm: What is the SCSI density code for 8 mm, anyway? */
|
||||
case QIC_11:
|
||||
case QIC_24:
|
||||
@ -1517,7 +1517,7 @@ st_space(unit, number, what, flags)
|
||||
struct scsi_space scsi_cmd;
|
||||
struct st_data *st = st_data[unit];
|
||||
|
||||
switch (what) {
|
||||
switch ((int)what) {
|
||||
case SP_BLKS:
|
||||
if (st->flags & ST_PER_ACTION) {
|
||||
if (number > 0) {
|
||||
@ -1597,7 +1597,7 @@ st_write_filemarks(unit, number, flags)
|
||||
if (number < 0) {
|
||||
return EINVAL;
|
||||
}
|
||||
switch (number) {
|
||||
switch ((int)number) {
|
||||
case 0: /* really a command to sync the drive's buffers */
|
||||
break;
|
||||
case 1:
|
||||
@ -1643,7 +1643,7 @@ st_chkeod(unit, position, nmarks, flags)
|
||||
errval error;
|
||||
struct st_data *st = st_data[unit];
|
||||
|
||||
switch (st->flags & (ST_WRITTEN | ST_FM_WRITTEN | ST_2FM_AT_EOD)) {
|
||||
switch ((int)(st->flags & (ST_WRITTEN | ST_FM_WRITTEN | ST_2FM_AT_EOD))) {
|
||||
default:
|
||||
*nmarks = 0;
|
||||
return (ESUCCESS);
|
||||
@ -1904,7 +1904,7 @@ st_touch_tape(unit)
|
||||
}
|
||||
st->blksiz = 1024;
|
||||
do {
|
||||
switch (st->blksiz) {
|
||||
switch ((int)st->blksiz) {
|
||||
case 512:
|
||||
case 1024:
|
||||
readsiz = st->blksiz;
|
||||
|
@ -2,12 +2,11 @@
|
||||
* Dummy driver for a device we can't identify.
|
||||
* by Julian Elischer (julian@tfs.com)
|
||||
*
|
||||
* $Id: uk.c,v 1.1 1993/11/18 05:03:13 rgrimes Exp $
|
||||
* $Id: uk.c,v 1.2 1993/11/25 01:37:35 wollman Exp $
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include "systm.h"
|
||||
#include <sys/errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <scsi/scsi_all.h>
|
||||
|
Loading…
Reference in New Issue
Block a user