diff options
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/autoconf.c | 10 | ||||
-rw-r--r-- | sys/amd64/amd64/db_disasm.c | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/db_interface.c | 13 | ||||
-rw-r--r-- | sys/amd64/amd64/machdep.c | 47 | ||||
-rw-r--r-- | sys/amd64/amd64/mem.c | 5 | ||||
-rw-r--r-- | sys/amd64/amd64/pmap.c | 12 | ||||
-rw-r--r-- | sys/amd64/amd64/trap.c | 4 | ||||
-rw-r--r-- | sys/amd64/amd64/tsc.c | 19 | ||||
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 15 | ||||
-rw-r--r-- | sys/amd64/include/cpufunc.h | 40 | ||||
-rw-r--r-- | sys/amd64/isa/clock.c | 19 | ||||
-rw-r--r-- | sys/amd64/isa/isa.c | 59 |
12 files changed, 172 insertions, 75 deletions
diff --git a/sys/amd64/amd64/autoconf.c b/sys/amd64/amd64/autoconf.c index 9f06f75..372dd26 100644 --- a/sys/amd64/amd64/autoconf.c +++ b/sys/amd64/amd64/autoconf.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91 - * $Id$ + * $Id: autoconf.c,v 1.4 1993/10/16 14:14:48 rgrimes Exp $ */ /* @@ -55,6 +55,9 @@ #include "machine/pte.h" +static void swapconf(void); +static void setroot(void); + /* * The following several variables are related to * the configuration process, and are used in initializing @@ -66,6 +69,7 @@ extern int cold; /* cold start flag initialized in locore.s */ /* * Determine i/o configuration for a machine. */ +void configure() { @@ -92,6 +96,7 @@ configure() /* * Configure swap space and related parameters. */ +static void swapconf() { register struct swdevt *swp; @@ -140,10 +145,11 @@ static char devname[][2] = { * If we can do so, and not instructed not to do so, * change rootdev to correspond to the load device. */ +static void setroot() { int majdev, mindev, unit, part, adaptor; - dev_t temp, orootdev; + dev_t temp = 0, orootdev; struct swdevt *swp; /*printf("howto %x bootdev %x ", boothowto, bootdev);*/ diff --git a/sys/amd64/amd64/db_disasm.c b/sys/amd64/amd64/db_disasm.c index a8b98da..4793e40 100644 --- a/sys/amd64/amd64/db_disasm.c +++ b/sys/amd64/amd64/db_disasm.c @@ -23,7 +23,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id$ + * $Id: db_disasm.c,v 1.3 1993/10/16 14:14:52 rgrimes Exp $ */ /* @@ -1067,7 +1067,7 @@ db_disasm(loc, altfmt) char * i_name; int i_size; int i_mode; - int regmodrm; + int regmodrm = 0; boolean_t first; int displ; int prefix; diff --git a/sys/amd64/amd64/db_interface.c b/sys/amd64/amd64/db_interface.c index fe36fc3..9f504d4 100644 --- a/sys/amd64/amd64/db_interface.c +++ b/sys/amd64/amd64/db_interface.c @@ -23,22 +23,23 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: db_interface.c,v 1.2 1993/10/16 14:14:55 rgrimes Exp $ + * $Id: db_interface.c,v 1.3 1993/11/07 17:41:34 wollman Exp $ */ /* * Interface to new debugger. */ #include "param.h" +#include "systm.h" #include "proc.h" -#include <machine/db_machdep.h> +#include "ddb/ddb.h" #include <sys/reboot.h> #include <vm/vm_statistics.h> #include <vm/pmap.h> #include <setjmp.h> -#include <sys/systm.h> /* just for boothowto --eichin */ + int db_active = 0; db_regs_t ddb_regs; @@ -46,6 +47,7 @@ db_regs_t ddb_regs; /* * Received keyboard interrupt sequence. */ +void kdb_kbd_trap(regs) struct i386_saved_state *regs; { @@ -61,6 +63,7 @@ kdb_kbd_trap(regs) static jmp_buf *db_nofault = 0; +int kdb_trap(type, code, regs) int type, code; register struct i386_saved_state *regs; @@ -142,6 +145,7 @@ kdb_trap(type, code, regs) /* * Print trap reason. */ +void kdbprinttrap(type, code) int type, code; { @@ -229,8 +233,9 @@ db_write_bytes(addr, size, data) } } +void Debugger (msg) -char *msg; + char *msg; { asm ("int $3"); } diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 193a9c9..e926d0e 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.17 1993/11/16 09:54:47 davidg Exp $ + * $Id: machdep.c,v 1.18 1993/11/17 23:24:56 wollman Exp $ */ #include "npx.h" @@ -89,6 +89,8 @@ static unsigned int avail_remaining; #include "i386/isa/isa.h" #include "i386/isa/rtc.h" +static void identifycpu(void); +static void initcpu(void); #define EXPECT_BASEMEM 640 /* The expected base memory*/ #define INFORM_WAIT 1 /* Set to pause berfore crash in weird cases*/ @@ -144,7 +146,7 @@ cpu_startup() int maxbufs, base, residual; extern long Usrptsize; vm_offset_t minaddr, maxaddr; - vm_size_t size; + vm_size_t size = 0; int firstaddr; /* @@ -315,6 +317,7 @@ struct cpu_nameclass i386_cpus[] = { { "i586", CPUCLASS_586 }, /* CPU_586 */ }; +static void identifycpu() /* translated from hp300 -- cgd */ { printf("CPU: "); @@ -505,6 +508,7 @@ struct sigreturn_args { struct sigcontext *sigcntxp; }; +int sigreturn(p, uap, retval) struct proc *p; struct sigreturn_args *uap; @@ -729,6 +733,7 @@ microtime(tvp) } #endif /* HZ */ +void physstrat(bp, strat, prio) struct buf *bp; int (*strat)(), prio; @@ -736,15 +741,6 @@ physstrat(bp, strat, prio) register int s; caddr_t baddr; - /* - * vmapbuf clobbers b_addr so we must remember it so that it - * can be restored after vunmapbuf. This is truely rude, we - * should really be storing this in a field in the buf struct - * but none are available and I didn't want to add one at - * this time. Note that b_addr for dirty page pushes is - * restored in vunmapbuf. (ugh!) - */ - baddr = bp->b_un.b_addr; vmapbuf(bp); (*strat)(bp); /* pageout daemon doesn't wait for pushed pages */ @@ -755,9 +751,9 @@ physstrat(bp, strat, prio) tsleep((caddr_t)bp, prio, "physstr", 0); splx(s); vunmapbuf(bp); - bp->b_un.b_addr = baddr; } +static void initcpu() { } @@ -932,7 +928,13 @@ struct soft_segment_descriptor ldt_segs[] = { 1, /* default 32 vs 16 bit size */ 1 /* limit granularity (byte/page units)*/ } }; -setidt(idx, func, typ, dpl) char *func; { +void +setidt(idx, func, typ, dpl) + int idx; + caddr_t func; + int typ; + int dpl; +{ struct gate_descriptor *ip = idt + idx; ip->gd_looffset = (int)func; @@ -958,7 +960,9 @@ extern IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl), int lcr0(), lcr3(), rcr0(), rcr2(); int _gsel_tss; +void init386(first) + int first; { extern ssdtosd(), lgdt(), lidt(), lldt(), etext; int x, *pi; @@ -1170,7 +1174,10 @@ extern caddr_t CADDR1, CADDR2; * zero out physical memory * specified in relocation units (NBPG bytes) */ -clearseg(n) { +void +clearseg(n) + int n; +{ *(int *)CMAP2 = PG_V | PG_KW | ctob(n); load_cr3(rcr3()); @@ -1185,7 +1192,10 @@ clearseg(n) { * specified in relocation units (NBPG bytes) */ void -copyseg(frm, n) { +copyseg(frm, n) + int frm; + int n; +{ *(int *)CMAP2 = PG_V | PG_KW | ctob(n); load_cr3(rcr3()); @@ -1197,7 +1207,10 @@ copyseg(frm, n) { * specified in relocation units (NBPG bytes) */ void -physcopyseg(frm, to) { +physcopyseg(frm, to) + int frm; + int to; +{ *(int *)CMAP1 = PG_V | PG_KW | ctob(frm); *(int *)CMAP2 = PG_V | PG_KW | ctob(to); @@ -1218,6 +1231,7 @@ setsoftclock() { * insert an element into a queue */ #undef insque +void /* XXX replace with inline FIXME! */ _insque(element, head) register struct prochd *element, *head; { @@ -1231,6 +1245,7 @@ _insque(element, head) * remove an element from a queue */ #undef remque +void /* XXX replace with inline FIXME! */ _remque(element) register struct prochd *element; { diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index 0caf00c..1113eb2 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -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.3 1993/10/16 14:15:06 rgrimes Exp $ + * $Id: mem.c,v 1.4 1993/11/22 09:46:45 davidg Exp $ */ /* @@ -64,6 +64,7 @@ extern char *vmmap; /* poor name! */ /*ARGSUSED*/ +int mmclose(dev, uio, flags) dev_t dev; struct uio *uio; @@ -82,6 +83,7 @@ mmclose(dev, uio, flags) return(0); } /*ARGSUSED*/ +int mmopen(dev, uio, flags) dev_t dev; struct uio *uio; @@ -100,6 +102,7 @@ mmopen(dev, uio, flags) return(0); } /*ARGSUSED*/ +int mmrw(dev, uio, flags) dev_t dev; struct uio *uio; diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index ed8ff6a..85838ad 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 - * $Id: pmap.c,v 1.7 1993/10/15 10:34:25 rgrimes Exp $ + * $Id: pmap.c,v 1.8 1993/11/13 02:25:03 davidg Exp $ */ /* @@ -79,6 +79,7 @@ */ #include "param.h" +#include "systm.h" #include "proc.h" #include "malloc.h" #include "user.h" @@ -90,6 +91,9 @@ #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 * and not yet converted. XXX. @@ -219,7 +223,6 @@ pmap_bootstrap(firstaddr, loadaddr) vm_offset_t va; struct pte *pte; #endif - extern vm_offset_t maxmem, physmem; extern int IdlePTD; avail_start = firstaddr + 8 * NBPG; @@ -1313,6 +1316,7 @@ pmap_kernel() * bzero to clear its contents, one machine dependent page * at a time. */ +void pmap_zero_page(phys) register vm_offset_t phys; { @@ -1335,6 +1339,7 @@ pmap_zero_page(phys) * bcopy to copy the page, one machine dependent page at a * time. */ +void pmap_copy_page(src, dst) register vm_offset_t src, dst; { @@ -1367,6 +1372,7 @@ pmap_copy_page(src, dst) * will specify that these pages are to be wired * down (or not) as appropriate. */ +void pmap_pageable(pmap, sva, eva, pageable) pmap_t pmap; vm_offset_t sva, eva; @@ -1509,6 +1515,7 @@ pmap_phys_address(ppn) * Miscellaneous support routines follow */ +static void i386_protection_init() { register int *kp, prot; @@ -1575,6 +1582,7 @@ pmap_testbit(pa, bit) return(FALSE); } +void pmap_changebit(pa, bit, setem) register vm_offset_t pa; int bit; diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 92247dd..e967477 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.6 1993/11/04 15:05:41 davidg Exp $ + * $Id: trap.c,v 1.7 1993/11/13 02:25:08 davidg Exp $ */ /* @@ -128,6 +128,7 @@ char *trap_msg[] = { */ /*ARGSUSED*/ +void trap(frame) struct trapframe frame; { @@ -499,6 +500,7 @@ int trapwrite(addr) * Like trap(), argument is call by reference. */ /*ARGSUSED*/ +void syscall(frame) volatile struct syscframe frame; { diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index 133f2d1..836bff0 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.2 1993/10/16 13:45:44 rgrimes Exp $ + * $Id: clock.c,v 1.3 1993/11/04 01:56:31 ache Exp $ */ /* @@ -56,7 +56,11 @@ #define TIMER_FREQ 1193182 /* XXX - should be in isa.h */ #endif -startrtclock() { +static void findcpuspeed(void); + +void +startrtclock() +{ int s; findcpuspeed(); /* use the clock (while it's free) @@ -84,6 +88,7 @@ startrtclock() { unsigned int delaycount; /* calibrated loop variable (1 millisecond) */ #define FIRST_GUESS 0x2000 +static void findcpuspeed() { unsigned char low; @@ -107,8 +112,9 @@ findcpuspeed() /* convert 2 digit BCD number */ +int bcd(i) -int i; + int i; { return ((i/16)*10 + (i%16)); } @@ -157,6 +163,7 @@ int m,leap; * Initialize the time of day register, based on the time base which is, e.g. * from a filesystem. */ +void inittodr(base) time_t base; { @@ -217,6 +224,7 @@ test_inittodr(base) /* * Restart the clock. */ +void resettodr() { } @@ -226,7 +234,10 @@ resettodr() */ #define V(s) __CONCAT(V, s) extern V(clk)(); -enablertclock() { + +void +enablertclock() +{ setidt(ICU_OFFSET+0, &V(clk), SDT_SYS386IGT, SEL_KPL); INTREN(IRQ0); } diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 3807721..773cf21 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -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$ + * $Id: vm_machdep.c,v 1.6 1993/10/15 10:34:29 rgrimes Exp $ */ #include "npx.h" @@ -62,6 +62,7 @@ * address in each process; in the future we will probably relocate * the frame pointers on the stack after copying. */ +int cpu_fork(p1, p2) register struct proc *p1, *p2; { @@ -177,7 +178,10 @@ cpu_exit(p) panic("cpu_exit"); } -cpu_wait(p) struct proc *p; { +void +cpu_wait(p) + struct proc *p; +{ /* drop per-process resources */ vmspace_free(p->p_vmspace); @@ -188,6 +192,7 @@ cpu_wait(p) struct proc *p; { /* * Set a red zone in the kernel stack after the u. area. */ +void setredzone(pte, vaddr) u_short *pte; caddr_t vaddr; @@ -207,6 +212,7 @@ setredzone(pte, vaddr) * Both addresses are assumed to reside in the Sysmap, * and size must be a multiple of CLSIZE. */ +void pagemove(from, to, size) register caddr_t from, to; int size; @@ -230,6 +236,7 @@ pagemove(from, to, size) /* * Convert kernel VA to physical address */ +int kvtop(addr) register caddr_t addr; { @@ -351,6 +358,7 @@ extern vm_map_t phys_map; * All requests are (re)mapped into kernel VA space via the useriomap * (a name with only slightly more meaning than "kernelmap") */ +void vmapbuf(bp) register struct buf *bp; { @@ -385,6 +393,7 @@ vmapbuf(bp) * Free the io map PTEs associated with this IO operation. * We also invalidate the TLB entries and restore the original b_addr. */ +void vunmapbuf(bp) register struct buf *bp; { @@ -404,6 +413,7 @@ vunmapbuf(bp) /* * Force reset the processor by invalidating the entire address space! */ +void /* XXX should be __dead too */ cpu_reset() { /* force a shutdown by unmapping entire address space ! */ @@ -412,4 +422,5 @@ cpu_reset() { /* "good night, sweet prince .... <THUNK!>" */ tlbflush(); /* NOTREACHED */ + while(1); /* to fool compiler... */ } diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index b105543..adaa70c 100644 --- a/sys/amd64/include/cpufunc.h +++ b/sys/amd64/include/cpufunc.h @@ -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.3 1993/10/16 14:39:08 rgrimes Exp $ + * $Id: cpufunc.h,v 1.4 1993/11/07 17:42:47 wollman Exp $ */ #ifndef _MACHINE_CPUFUNC_H_ @@ -13,7 +13,7 @@ #ifdef __GNUC__ -static __inline int bdb(void) +static inline int bdb(void) { extern int bdb_exists; @@ -23,13 +23,13 @@ static __inline int bdb(void) return (1); } -static __inline void +static inline void disable_intr(void) { __asm __volatile("cli"); } -static __inline void +static inline void enable_intr(void) { __asm __volatile("sti"); @@ -41,7 +41,7 @@ enable_intr(void) */ #define inb(port) ((u_char) u_int_inb(port)) -static __inline u_int +static inline u_int u_int_inb(u_int port) { u_char data; @@ -54,7 +54,7 @@ u_int_inb(u_int port) return data; } -static __inline void +static inline void outb(u_int port, u_char data) { register u_char al asm("ax"); @@ -63,7 +63,8 @@ outb(u_int port, u_char data) __asm __volatile("outb %0,%%dx" : : "a" (al), "d" (port)); } -static __inline__ +static inline +int imin(a, b) int a, b; { @@ -71,7 +72,8 @@ imin(a, b) return (a < b ? a : b); } -static __inline__ +static inline +int imax(a, b) int a, b; { @@ -79,7 +81,7 @@ imax(a, b) return (a > b ? a : b); } -static __inline__ +static inline unsigned int min(a, b) unsigned int a, b; @@ -88,7 +90,7 @@ min(a, b) return (a < b ? a : b); } -static __inline__ +static inline unsigned int max(a, b) unsigned int a, b; @@ -97,7 +99,7 @@ max(a, b) return (a > b ? a : b); } -static __inline__ +static inline long lmin(a, b) long a, b; @@ -106,7 +108,7 @@ lmin(a, b) return (a < b ? a : b); } -static __inline__ +static inline long lmax(a, b) long a, b; @@ -115,7 +117,7 @@ lmax(a, b) return (a > b ? a : b); } -static __inline__ +static inline unsigned long ulmin(a, b) unsigned long a, b; @@ -124,7 +126,7 @@ ulmin(a, b) return (a < b ? a : b); } -static __inline__ +static inline unsigned long ulmax(a, b) unsigned long a, b; @@ -133,7 +135,8 @@ ulmax(a, b) return (a > b ? a : b); } -static __inline__ +static inline +int ffs(mask) register long mask; { @@ -148,7 +151,8 @@ ffs(mask) } } -static __inline__ +static inline +int bcmp(v1, v2, len) void *v1, *v2; register unsigned len; @@ -161,10 +165,10 @@ bcmp(v1, v2, len) return (0); } -static __inline__ +static inline size_t strlen(s1) - register __const__ char *s1; + register const char *s1; { register size_t len; diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index 133f2d1..836bff0 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $Id: clock.c,v 1.2 1993/10/16 13:45:44 rgrimes Exp $ + * $Id: clock.c,v 1.3 1993/11/04 01:56:31 ache Exp $ */ /* @@ -56,7 +56,11 @@ #define TIMER_FREQ 1193182 /* XXX - should be in isa.h */ #endif -startrtclock() { +static void findcpuspeed(void); + +void +startrtclock() +{ int s; findcpuspeed(); /* use the clock (while it's free) @@ -84,6 +88,7 @@ startrtclock() { unsigned int delaycount; /* calibrated loop variable (1 millisecond) */ #define FIRST_GUESS 0x2000 +static void findcpuspeed() { unsigned char low; @@ -107,8 +112,9 @@ findcpuspeed() /* convert 2 digit BCD number */ +int bcd(i) -int i; + int i; { return ((i/16)*10 + (i%16)); } @@ -157,6 +163,7 @@ int m,leap; * Initialize the time of day register, based on the time base which is, e.g. * from a filesystem. */ +void inittodr(base) time_t base; { @@ -217,6 +224,7 @@ test_inittodr(base) /* * Restart the clock. */ +void resettodr() { } @@ -226,7 +234,10 @@ resettodr() */ #define V(s) __CONCAT(V, s) extern V(clk)(); -enablertclock() { + +void +enablertclock() +{ setidt(ICU_OFFSET+0, &V(clk), SDT_SYS386IGT, SEL_KPL); INTREN(IRQ0); } diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c index 7a16d42..b40ce6e 100644 --- a/sys/amd64/isa/isa.c +++ b/sys/amd64/isa/isa.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: isa.c,v 1.8 1993/11/14 23:53:32 ache Exp $ + * $Id: isa.c,v 1.9 1993/11/17 00:21:03 ache Exp $ */ /* @@ -48,7 +48,8 @@ */ #include "param.h" -#include "systm.h" +#include "systm.h" /* isn't it a joy */ +#include "kernel.h" /* to have three of these */ #include "conf.h" #include "file.h" #include "buf.h" @@ -80,7 +81,7 @@ #define DMA2_MODE (IO_DMA2 + 2*11) /* mode register */ #define DMA2_FFC (IO_DMA2 + 2*12) /* clear first/last FF */ -int config_isadev __P((struct isa_device *, u_int *)); +void config_isadev __P((struct isa_device *, u_int *)); /* * print a conflict message @@ -250,6 +251,7 @@ isa_configure() { /* * Configure an ISA device. */ +void config_isadev(isdp, mp) struct isa_device *isdp; u_int *mp; @@ -338,7 +340,9 @@ extern IDTVEC(intrdefault); * Fill in default interrupt table (in case of spuruious interrupt * during configuration of kernel, setup interrupt control unit */ -isa_defaultirq() { +void +isa_defaultirq() +{ int i; /* icu vectors */ @@ -505,6 +509,7 @@ void isa_dmadone(int flags, caddr_t addr, int nbytes, int chan) * Return true if special handling needed. */ +int isa_dmarangecheck(caddr_t va, unsigned length, unsigned chan) { vm_offset_t phys, priorpage = 0, endva; u_int dma_pgmsk = (chan & 4) ? ~(128*1024-1) : ~(64*1024-1); @@ -548,7 +553,7 @@ isa_allocphysmem(caddr_t va, unsigned length, void (*func)()) { isaphysmemunblock = func; while (isaphysmemflag & B_BUSY) { isaphysmemflag |= B_WANTED; - tsleep(&isaphysmemflag, PRIBIO, "isaphys", 0); + tsleep((caddr_t)&isaphysmemflag, PRIBIO, "isaphys", 0); } isaphysmemflag |= B_BUSY; @@ -565,7 +570,7 @@ isa_freephysmem(caddr_t va, unsigned length) { isaphysmemflag &= ~B_BUSY; if (isaphysmemflag & B_WANTED) { isaphysmemflag &= B_WANTED; - wakeup(&isaphysmemflag); + wakeup((caddr_t)&isaphysmemflag); if (isaphysmemunblock) (*isaphysmemunblock)(); } @@ -575,7 +580,10 @@ isa_freephysmem(caddr_t va, unsigned length) { * Handle a NMI, possibly a machine check. * return true to panic system, false to ignore. */ -isa_nmi(cd) { +int +isa_nmi(cd) + int cd; +{ log(LOG_CRIT, "\nNMI port 61 %x, port 70 %x\n", inb(0x61), inb(0x70)); return(0); @@ -584,7 +592,10 @@ isa_nmi(cd) { /* * Caught a stray interrupt, notify */ -isa_strayintr(d) { +void +isa_strayintr(d) + int d; +{ /* DON'T BOTHER FOR NOW! */ /* for some reason, we get bursts of intr #7, even if not enabled! */ @@ -616,9 +627,8 @@ isa_strayintr(d) { #define CF (1 * TIMER_FREQ) #define TIMER_FREQ 1193182 /* XXX - should be elsewhere */ -extern int hz; /* XXX - should be elsewhere */ - -int DELAY(n) +void +DELAY(n) int n; { int counter_limit; @@ -683,7 +693,11 @@ int DELAY(n) #endif } -getit(unit, timer) { +int +getit(unit, timer) + int unit; + int timer; +{ int high; int low; @@ -710,19 +724,23 @@ getit(unit, timer) { return ((high << 8) | low); } -static beeping; -static -sysbeepstop(f) +static int beeping; + +static void +sysbeepstop(f, dummy) + caddr_t f; + int dummy; { /* disable counter 2 */ outb(0x61, inb(0x61) & 0xFC); if (f) - timeout(sysbeepstop, 0, f); + timeout(sysbeepstop, (caddr_t)0, (int)f); else beeping = 0; } -void sysbeep(int pitch, int period) +void +sysbeep(int pitch, int period) { outb(0x61, inb(0x61) | 3); /* enable counter 2 */ @@ -739,14 +757,17 @@ void sysbeep(int pitch, int period) if (!beeping) { beeping = period; - timeout(sysbeepstop, period/2, period); + timeout(sysbeepstop, (caddr_t)(period/2), period); } } /* * Pass command to keyboard controller (8042) */ -unsigned kbc_8042cmd(val) { +unsigned +kbc_8042cmd(val) + int val; +{ while (inb(KBSTATP)&KBS_IBF); if (val) outb(KBCMDP, val); |