compile cleanly with:

-Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual
This commit is contained in:
cgd 1996-11-13 21:13:04 +00:00
parent 750ee83e95
commit 6c9cb4aa9b
48 changed files with 618 additions and 557 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.15 1996/11/12 05:14:27 cgd Exp $ */
/* $NetBSD: autoconf.c,v 1.16 1996/11/13 21:13:04 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
@ -51,6 +51,7 @@
#include <sys/conf.h>
#include <sys/reboot.h>
#include <sys/device.h>
#include <dev/cons.h>
#include <machine/autoconf.h>
#include <machine/prom.h>
@ -74,6 +75,9 @@ static int findblkmajor __P((struct device *dv));
static char *findblkname __P((int));
static int getstr __P((char *cp, int size));
void setroot __P((void));
void swapconf __P((void));
/*
* configure:
* called at boot time, configure all devices on system
@ -81,7 +85,6 @@ static int getstr __P((char *cp, int size));
void
configure()
{
extern int cold;
parse_prom_bootdev();
@ -101,6 +104,7 @@ configure()
/*
* Configure swap space and related parameters.
*/
void
swapconf()
{
struct swdevt *swp;
@ -255,6 +259,7 @@ gotdisk:
* (ie. DV_DISK or DV_IFNET) because of how (*mountroot) is written.
* That should be fixed.
*/
void
setroot()
{
struct swdevt *swp;
@ -308,7 +313,7 @@ setroot()
buf[--len] = '\0';
dv = getdisk(buf, len, 1, &nrootdev);
if (dv != NULL) {
rootdv = dv;
rootdv = swapdv = dv;
nswapdev = nrootdev;
goto gotswap;
}
@ -571,7 +576,6 @@ atoi(s)
char *s;
{
int n, neg;
char c;
n = 0;
neg = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: disksubr.c,v 1.8 1996/10/13 02:59:35 christos Exp $ */
/* $NetBSD: disksubr.c,v 1.9 1996/11/13 21:13:05 cgd Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -76,7 +76,7 @@ dk_establish(dk, dev)
char *
readdisklabel(dev, strat, lp, clp)
dev_t dev;
void (*strat)();
void (*strat) __P((struct buf *));
struct disklabel *lp;
struct cpu_disklabel *clp;
{
@ -189,13 +189,13 @@ setdisklabel(olp, nlp, openmask, clp)
int
writedisklabel(dev, strat, lp, clp)
dev_t dev;
void (*strat)();
void (*strat) __P((struct buf *));
register struct disklabel *lp;
struct cpu_disklabel *clp;
{
struct buf *bp;
struct disklabel *dlp;
int error = 0, cyl, i;
int error = 0;
bp = geteblk((int)lp->d_secsize);
bp->b_dev = dev;
@ -204,7 +204,7 @@ writedisklabel(dev, strat, lp, clp)
bp->b_bcount = lp->d_secsize;
bp->b_flags = B_READ; /* get current label */
(*strat)(bp);
if (error = biowait(bp))
if ((error = biowait(bp)) != 0)
goto done;
dlp = (struct disklabel *)(bp->b_un.b_addr + LABELOFFSET);

View File

@ -1,4 +1,4 @@
/* $NetBSD: in_cksum.c,v 1.3 1996/05/30 23:08:36 cgd Exp $ */
/* $NetBSD: in_cksum.c,v 1.4 1996/11/13 21:13:06 cgd Exp $ */
/*
* Copyright (c) 1988, 1992, 1993
@ -82,6 +82,8 @@ union q_util {
u_int64_t q;
};
u_int64_t in_cksumdata __P((caddr_t buf, int len));
u_int64_t
in_cksumdata(buf, len)
register caddr_t buf;
@ -92,7 +94,6 @@ in_cksumdata(buf, len)
u_int64_t prefilled;
int offset;
union q_util q_util;
union l_util l_util;
if ((3 & (long) lw) == 0 && len == 20) {
sum = (u_int64_t) lw[0] + lw[1] + lw[2] + lw[3] + lw[4];

View File

@ -1,4 +1,4 @@
/* $NetBSD: interrupt.c,v 1.12 1996/10/13 19:57:49 cgd Exp $ */
/* $NetBSD: interrupt.c,v 1.13 1996/11/13 21:13:07 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -49,9 +49,10 @@ struct logout {
/* Unspecified. */
};
void machine_check __P((struct trapframe *, unsigned long,
static void machine_check __P((struct trapframe *, unsigned long,
unsigned long));
static void nullintr __P((void *, unsigned long));
static void real_clockintr __P((void *, unsigned long));
static void (*iointr) __P((void *, unsigned long)) = nullintr;
static void (*clockintr) __P((void *, unsigned long)) = nullintr;
@ -128,7 +129,7 @@ set_iointr(niointr)
iointr = niointr;
}
void
static void
machine_check(framep, vector, param)
struct trapframe *framep;
unsigned long vector, param;
@ -179,7 +180,6 @@ badaddr(addr, size)
void *addr;
size_t size;
{
int rv;
long rcpt;
/* Get rid of any stale machine checks that have been waiting. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.54 1996/11/12 05:14:37 cgd Exp $ */
/* $NetBSD: machdep.c,v 1.55 1996/11/13 21:13:08 cgd Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -92,6 +92,14 @@
#include <netiso/iso.h>
#include <netiso/clnp.h>
#endif
#ifdef CCITT
#include <netccitt/x25.h>
#include <netccitt/pk.h>
#include <netccitt/pk_extern.h>
#endif
#ifdef NATM
#include <netnatm/natm.h>
#endif
#include "ppp.h"
#if NPPP > 0
#include <net/ppp_defs.h>
@ -102,8 +110,6 @@
vm_map_t buffer_map;
void dumpsys __P((void));
/*
* Declare these as initialized data so we can patch them.
*/
@ -150,9 +156,6 @@ u_int64_t cycles_per_usec;
/* some memory areas for device DMA. "ick." */
caddr_t le_iomem; /* XXX iomem for LANCE DMA */
/* Interrupt vectors (in locore) */
extern int XentInt(), XentArith(), XentMM(), XentIF(), XentUna(), XentSys();
/* number of cpus in the box. really! */
int ncpus;
@ -164,9 +167,14 @@ int alpha_unaligned_print = 1; /* warn about unaligned accesses */
int alpha_unaligned_fix = 1; /* fix up unaligned accesses */
int alpha_unaligned_sigbus = 0; /* don't SIGBUS on fixed-up accesses */
void identifycpu();
int cpu_dump __P((void));
int cpu_dumpsize __P((void));
void dumpsys __P((void));
void identifycpu __P((void));
void netintr __P((void));
void printregs __P((struct reg *));
int
void
alpha_init(pfn, ptb)
u_long pfn; /* first free PFN number */
u_long ptb; /* PFN of current level 1 page table */
@ -567,8 +575,6 @@ unknown_cputype:
if ((pcsp->pcs_flags & PCS_PP) != 0)
ncpus++;
}
return (0);
}
void
@ -687,7 +693,7 @@ cpu_startup()
* Note that bootstrapping is finished, and set the HWRPB up
* to do restarts.
*/
hwrbp_restart_setup();
hwrpb_restart_setup();
}
void
@ -1550,6 +1556,9 @@ delay(n)
}
#if defined(COMPAT_OSF1) || 1 /* XXX */
void cpu_exec_ecoff_setregs __P((struct proc *, struct exec_package *,
u_long, register_t *));
void
cpu_exec_ecoff_setregs(p, epp, stack, retval)
struct proc *p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mainbus.c,v 1.13 1996/11/12 05:14:38 cgd Exp $ */
/* $NetBSD: mainbus.c,v 1.14 1996/11/13 21:13:09 cgd Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -89,7 +89,7 @@ mbattach(parent, self, aux)
struct confargs nca;
struct pcs *pcsp;
int i, cpuattachcnt;
extern int cputype, ncpus;
extern int ncpus;
extern const struct cpusw *cpu_fn_switch;
printf("\n");
@ -106,7 +106,6 @@ mbattach(parent, self, aux)
*/
cpuattachcnt = 0;
for (i = 0; i < hwrpb->rpb_pcs_cnt; i++) {
struct pcs *pcsp;
pcsp = (struct pcs *)((char *)hwrpb + hwrpb->rpb_pcs_off +
(i * hwrpb->rpb_pcs_size));

View File

@ -1,4 +1,4 @@
/* $NetBSD: mem.c,v 1.9 1996/08/20 23:00:25 cgd Exp $ */
/* $NetBSD: mem.c,v 1.10 1996/11/13 21:13:10 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -55,14 +55,19 @@
#include <vm/vm.h>
#define mmread mmrw
#define mmwrite mmrw
cdev_decl(mm);
caddr_t zeropage;
extern int firstusablepage, lastusablepage;
/*ARGSUSED*/
int
mmopen(dev, flag, mode)
mmopen(dev, flag, mode, p)
dev_t dev;
int flag, mode;
struct proc *p;
{
return (0);
@ -70,15 +75,17 @@ mmopen(dev, flag, mode)
/*ARGSUSED*/
int
mmclose(dev, flag, mode)
mmclose(dev, flag, mode, p)
dev_t dev;
int flag, mode;
struct proc *p;
{
return (0);
}
/*ARGSUSED*/
int
mmrw(dev, uio, flags)
dev_t dev;
struct uio *uio;
@ -181,7 +188,7 @@ kmemphys:
int
mmmmap(dev, off, prot)
dev_t dev;
vm_offset_t off;
int off; /* XXX */
int prot;
{
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.old.c,v 1.13 1996/10/13 02:59:44 christos Exp $ */
/* $NetBSD: pmap.old.c,v 1.14 1996/11/13 21:13:10 cgd Exp $ */
/*
* Copyright (c) 1991, 1993
@ -445,7 +445,6 @@ pmap_bootstrap(firstaddr, ptaddr)
void
pmap_unmap_prom()
{
int i;
extern int prom_mapped;
extern pt_entry_t *rom_ptep, rom_pte;
@ -485,7 +484,7 @@ pmap_bootstrap_alloc(size)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_BOOTSTRAP))
printf("pmap_bootstrap_alloc(%lx)\n", size);
printf("pmap_bootstrap_alloc(%x)\n", size);
#endif
if (vm_page_startup_initialized)
panic("pmap_bootstrap_alloc: called after startup initialized");
@ -512,7 +511,7 @@ pmap_init(phys_start, phys_end)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_init(%x, %x)\n", phys_start, phys_end);
printf("pmap_init(%lx, %lx)\n", phys_start, phys_end);
#endif
/* initialize protection array */
@ -558,7 +557,7 @@ pmap_map(virt, start, end, prot)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_map(%lx, %lx, %lx, %lx)\n", virt, start, end, prot);
printf("pmap_map(%lx, %lx, %lx, %x)\n", virt, start, end, prot);
#endif
while (start < end) {
pmap_enter(pmap_kernel(), virt, start, prot, FALSE);
@ -618,7 +617,7 @@ pmap_pinit(pmap)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_CREATE))
printf("pmap_pinit(%lx)\n", pmap);
printf("pmap_pinit(%p)\n", pmap);
#endif
/*
* No need to allocate page table space yet but we do need a
@ -646,7 +645,7 @@ pmap_destroy(pmap)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_destroy(%lx)\n", pmap);
printf("pmap_destroy(%p)\n", pmap);
#endif
if (pmap == NULL)
return;
@ -672,7 +671,7 @@ pmap_release(pmap)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_release(%lx)\n", pmap);
printf("pmap_release(%p)\n", pmap);
#endif
#ifdef notdef /* DIAGNOSTIC */
/* count would be 0 from pmap_destroy... */
@ -697,7 +696,7 @@ pmap_reference(pmap)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_reference(%lx)\n", pmap);
printf("pmap_reference(%p)\n", pmap);
#endif
if (pmap != NULL) {
simple_lock(&pmap->pm_lock);
@ -724,7 +723,7 @@ pmap_remove(pmap, sva, eva)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_REMOVE|PDB_PROTECT))
printf("pmap_remove(%lx, %lx, %lx)\n", pmap, sva, eva);
printf("pmap_remove(%p, %lx, %lx)\n", pmap, sva, eva);
#endif
if (pmap == NULL)
@ -783,8 +782,8 @@ pmap_page_protect(pa, prot)
#ifdef DEBUG
if ((pmapdebug & (PDB_FOLLOW|PDB_PROTECT)) ||
prot == VM_PROT_NONE && (pmapdebug & PDB_REMOVE))
printf("pmap_page_protect(%lx, %lx)\n", pa, prot);
(prot == VM_PROT_NONE && (pmapdebug & PDB_REMOVE)))
printf("pmap_page_protect(%lx, %x)\n", pa, prot);
#endif
if (!PAGE_IS_MANAGED(pa))
return;
@ -844,7 +843,7 @@ pmap_protect(pmap, sva, eva, prot)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_PROTECT))
printf("pmap_protect(%lx, %lx, %lx, %lx)\n", pmap, sva, eva, prot);
printf("pmap_protect(%p, %lx, %lx, %x)\n", pmap, sva, eva, prot);
#endif
if (pmap == NULL)
@ -931,7 +930,7 @@ pmap_enter(pmap, va, pa, prot, wired)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_ENTER))
printf("pmap_enter(%lx, %lx, %lx, %lx, %lx)\n",
printf("pmap_enter(%p, %lx, %lx, %x, %x)\n",
pmap, va, pa, prot, wired);
#endif
if (pmap == NULL)
@ -960,7 +959,7 @@ pmap_enter(pmap, va, pa, prot, wired)
opa = pmap_pte_pa(pte);
#ifdef DEBUG
if (pmapdebug & PDB_ENTER)
printf("enter: pte %lx, *pte %lx\n", pte, *pte);
printf("enter: pte %p, *pte %lx\n", pte, *pte);
#endif
/*
@ -979,7 +978,7 @@ pmap_enter(pmap, va, pa, prot, wired)
if (pmap_pte_w_chg(pte, wired ? PG_WIRED : 0)) {
#ifdef DEBUG
if (pmapdebug & PDB_ENTER)
printf("enter: wiring change -> %lx\n", wired);
printf("enter: wiring change -> %x\n", wired);
#endif
if (wired)
pmap->pm_stats.wired_count++;
@ -1043,7 +1042,7 @@ pmap_enter(pmap, va, pa, prot, wired)
s = splimp();
#ifdef DEBUG
if (pmapdebug & PDB_ENTER)
printf("enter: pv at %lx: %lx/%lx/%lx\n",
printf("enter: pv at %p: %lx/%p/%p\n",
pv, pv->pv_va, pv->pv_pmap, pv->pv_next);
#endif
/*
@ -1152,7 +1151,7 @@ pmap_change_wiring(pmap, va, wired)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_change_wiring(%lx, %lx, %lx)\n", pmap, va, wired);
printf("pmap_change_wiring(%p, %lx, %x)\n", pmap, va, wired);
#endif
if (pmap == NULL)
return;
@ -1209,7 +1208,7 @@ pmap_extract(pmap, va)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_extract(%lx, %lx) -> ", pmap, va);
printf("pmap_extract(%p, %lx) -> ", pmap, va);
#endif
pa = 0;
if (pmap && pmap_ste_v(pmap, va)) {
@ -1241,7 +1240,7 @@ void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_copy(%lx, %lx, %lx, %lx, %lx)\n",
printf("pmap_copy(%p, %p, %lx, %lx, %lx)\n",
dst_pmap, src_pmap, dst_addr, len, src_addr);
#endif
}
@ -1286,14 +1285,14 @@ pmap_collect(pmap)
#ifdef DEBUG
pt_entry_t *ste;
int opmapdebug;
int opmapdebug = 0;
#endif
if (pmap != pmap_kernel())
return;
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_collect(%lx)\n", pmap);
printf("pmap_collect(%p)\n", pmap);
#endif
#ifdef PMAPSTATS
kpt_stats.collectscans++;
@ -1312,7 +1311,7 @@ pmap_collect(pmap)
do {
if (pv->pv_ptpte && pv->pv_ptpmap == pmap_kernel())
break;
} while (pv = pv->pv_next);
} while ((pv = pv->pv_next) != NULL);
if (pv == NULL)
continue;
#ifdef DEBUG
@ -1333,7 +1332,7 @@ ok:
#ifdef DEBUG
if (pmapdebug & (PDB_PTPAGE|PDB_COLLECT)) {
printf("collect: freeing KPT page at %lx (ste %lx@%lx)\n",
printf("collect: freeing KPT page at %lx (ste %lx@%p)\n",
pv->pv_va, *pv->pv_ptpte, pv->pv_ptpte);
opmapdebug = pmapdebug;
pmapdebug |= PDB_PTPAGE;
@ -1378,11 +1377,11 @@ ok:
pmapdebug = opmapdebug;
if (*ste)
printf("collect: kernel STE at %lx still valid (%lx)\n",
printf("collect: kernel STE at %p still valid (%lx)\n",
ste, *ste);
ste = &Sysptmap[(pt_entry_t *)ste-pmap_ste(pmap_kernel(), 0)];
if (*ste)
printf("collect: kernel PTmap at %lx still valid (%lx)\n",
printf("collect: kernel PTmap at %p still valid (%lx)\n",
ste, *ste);
#endif
}
@ -1397,7 +1396,7 @@ pmap_activate(pmap)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_SEGTAB))
printf("pmap_activate(%lx)\n", pmap);
printf("pmap_activate(%p)\n", pmap);
#endif
iscurproc = curproc != NULL && pmap == curproc->p_vmspace->vm_map.pmap;
@ -1467,7 +1466,7 @@ pmap_pageable(pmap, sva, eva, pageable)
{
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_pageable(%lx, %lx, %lx, %lx)\n",
printf("pmap_pageable(%p, %lx, %lx, %x)\n",
pmap, sva, eva, pageable);
#endif
/*
@ -1484,7 +1483,7 @@ pmap_pageable(pmap, sva, eva, pageable)
#ifdef DEBUG
if ((pmapdebug & (PDB_FOLLOW|PDB_PTPAGE)) == PDB_PTPAGE)
printf("pmap_pageable(%lx, %lx, %lx, %lx)\n",
printf("pmap_pageable(%p, %lx, %lx, %x)\n",
pmap, sva, eva, pageable);
#endif
if (!pmap_ste_v(pmap, sva))
@ -1497,7 +1496,7 @@ pmap_pageable(pmap, sva, eva, pageable)
return;
#ifdef DEBUG
if (pv->pv_va != sva || pv->pv_next) {
printf("pmap_pageable: bad PT page va %lx next %lx\n",
printf("pmap_pageable: bad PT page va %lx next %p\n",
pv->pv_va, pv->pv_next);
return;
}
@ -1508,7 +1507,7 @@ pmap_pageable(pmap, sva, eva, pageable)
pmap_clear_modify(pa);
#ifdef DEBUG
if ((PHYS_TO_VM_PAGE(pa)->flags & PG_CLEAN) == 0) {
printf("pa %lx: flags=%lx: not clean\n",
printf("pa %lx: flags=%x: not clean\n",
pa, PHYS_TO_VM_PAGE(pa)->flags);
PHYS_TO_VM_PAGE(pa)->flags |= PG_CLEAN;
}
@ -1682,7 +1681,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
pt_entry_t opte;
if (pmapdebug & (PDB_FOLLOW|PDB_REMOVE|PDB_PROTECT))
printf("pmap_remove_mapping(%lx, %lx, %lx, %lx)\n",
printf("pmap_remove_mapping(%p, %lx, %p, %x)\n",
pmap, va, pte, flags);
#endif
@ -1713,7 +1712,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
*/
#ifdef DEBUG
if (pmapdebug & PDB_REMOVE)
printf("remove: invalidating pte at %lx\n", pte);
printf("remove: invalidating pte at %p\n", pte);
#endif
*pte = PG_NV;
if ((flags & PRM_TFLUSH) && active_pmap(pmap))
@ -1793,7 +1792,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
#endif
#ifdef DEBUG
if (pmapdebug & (PDB_REMOVE|PDB_PTPAGE))
printf("remove: ste was %lx@%lx pte was %lx@%lx\n",
printf("remove: ste was %lx@%p pte was %lx@%p\n",
*ste, ste, opte, pmap_pte(pmap, va));
#endif
*ste = PG_NV;
@ -1805,7 +1804,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
if (ptpmap != pmap_kernel()) {
#ifdef DEBUG
if (pmapdebug & (PDB_REMOVE|PDB_SEGTAB))
printf("remove: stab %lx, refcnt %d\n",
printf("remove: stab %p, refcnt %d\n",
ptpmap->pm_stab, ptpmap->pm_sref - 1);
if ((pmapdebug & PDB_PARANOIA) &&
ptpmap->pm_stab != (pt_entry_t *)trunc_page(ste))
@ -1814,7 +1813,7 @@ pmap_remove_mapping(pmap, va, pte, flags)
if (--(ptpmap->pm_sref) == 0) {
#ifdef DEBUG
if (pmapdebug&(PDB_REMOVE|PDB_SEGTAB))
printf("remove: free stab %lx\n",
printf("remove: free stab %p\n",
ptpmap->pm_stab);
#endif
kmem_free_wakeup(st_map,
@ -1865,7 +1864,6 @@ pmap_changebit(pa, bit, setem)
register pt_entry_t *pte, npte;
vm_offset_t va;
int s;
boolean_t firstpage = TRUE;
#ifdef PMAPSTATS
struct chgstats *chgp;
#endif
@ -1953,7 +1951,7 @@ pmap_enter_ptpage(pmap, va)
#ifdef DEBUG
if (pmapdebug & (PDB_FOLLOW|PDB_ENTER|PDB_PTPAGE))
printf("pmap_enter_ptpage: pmap %lx, va %lx\n", pmap, va);
printf("pmap_enter_ptpage: pmap %p, va %lx\n", pmap, va);
#endif
#ifdef PMAPSTATS
enter_stats.ptpneeded++;
@ -1978,7 +1976,7 @@ pmap_enter_ptpage(pmap, va)
PMAP_ACTIVATE(pmap, 1);
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
printf("enter: pmap %lx stab %lx(%lx)\n",
printf("enter: pmap %p stab %p(%lx)\n",
pmap, pmap->pm_stab, pmap->pm_stpte);
#endif
}
@ -2070,7 +2068,7 @@ pmap_enter_ptpage(pmap, va)
do {
if (pv->pv_pmap == pmap_kernel() && pv->pv_va == va)
break;
} while (pv = pv->pv_next);
} while ((pv = pv->pv_next) != NULL);
}
#ifdef DEBUG
if (pv == NULL)
@ -2080,7 +2078,7 @@ pmap_enter_ptpage(pmap, va)
pv->pv_ptpmap = pmap;
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE))
printf("enter: new PT page at PA %lx, ste at %lx\n", ptpa, ste);
printf("enter: new PT page at PA 0x%lx, ste at %p\n", ptpa, ste);
#endif
/*
@ -2096,7 +2094,7 @@ pmap_enter_ptpage(pmap, va)
if (pmap != pmap_kernel()) {
#ifdef DEBUG
if (pmapdebug & (PDB_ENTER|PDB_PTPAGE|PDB_SEGTAB))
printf("enter: stab %lx refcnt %d\n",
printf("enter: stab %p refcnt %d\n",
pmap->pm_stab, pmap->pm_sref);
#endif
}
@ -2129,7 +2127,7 @@ pmap_emulate_reference(p, v, user, write)
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW)
printf("pmap_emulate_reference: 0x%lx, 0x%lx, %d, %d\n",
printf("pmap_emulate_reference: %p, 0x%lx, %d, %d\n",
p, v, user, write);
#endif
@ -2151,7 +2149,7 @@ pmap_emulate_reference(p, v, user, write)
}
#ifdef DEBUG
if (pmapdebug & PDB_FOLLOW) {
printf("\tpte = 0x%lx, ", pte);
printf("\tpte = %p, ", pte);
printf("*pte = 0x%lx\n", *pte);
}
#endif
@ -2185,7 +2183,7 @@ pmap_emulate_reference(p, v, user, write)
#endif
#ifdef DIAGNOSTIC
if (!PAGE_IS_MANAGED(pa))
printf("WARNING: pmap_emulate_reference(0x%lx, 0x%lx, %d, %d): pa 0x%lx not managed\n", p, v, user, write, pa);
printf("WARNING: pmap_emulate_reference(%p, 0x%lx, %d, %d): pa 0x%lx not managed\n", p, v, user, write, pa);
#endif
/*
@ -2227,7 +2225,7 @@ pmap_pvdump(pa)
printf("pa %lx", pa);
for (pv = pa_to_pvh(pa); pv; pv = pv->pv_next)
printf(" -> pmap %lx, va %lx, stpte %lx, ptpmap %lx, flags %lx",
printf(" -> pmap %p, va %lx, stpte %p, ptpmap %p, flags %x",
pv->pv_pmap, pv->pv_va, pv->pv_ptpte, pv->pv_ptpmap,
pv->pv_flags);
printf("\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: prom.c,v 1.11 1996/10/16 00:00:40 cgd Exp $ */
/* $NetBSD: prom.c,v 1.12 1996/11/13 21:13:11 cgd Exp $ */
/*
* Copyright (c) 1992, 1994, 1995, 1996 Carnegie Mellon University
@ -26,6 +26,7 @@
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
#include <sys/user.h>
@ -39,8 +40,6 @@
#include <dev/cons.h>
/* XXX this is to fake out the console routines, while booting. */
void promcnputc __P((dev_t, int));
int promcngetc __P((dev_t));
struct consdev promcons = { NULL, NULL, promcngetc, promcnputc,
nullcnpollc, makedev(23,0), 1 };
@ -65,7 +64,7 @@ init_prom_interface()
c = (struct crb*)((char*)hwrpb + hwrpb->rpb_crb_off);
prom_dispatch_v.routine_arg = c->crb_v_dispatch;
prom_dispatch_v.routine = c->crb_v_dispatch->code;
prom_dispatch_v.routine = c->crb_v_dispatch->entry_va;
prom_getenv(PROM_E_TTY_DEV, buf, 4);
alpha_console = buf[0] - '0';
@ -107,7 +106,7 @@ promcnputc(dev, c)
*to = c;
do {
ret.bits = prom_dispatch(PROM_R_PUTS, alpha_console, to, 1);
ret.bits = prom_putstr(alpha_console, to, 1);
} while ((ret.u.retval & 1) == 0);
if (!prom_mapped) { /* XXX */
@ -141,7 +140,7 @@ promcngetc(dev)
*rom_ptep = rom_pte; /* XXX */
ALPHA_TBIA(); /* XXX */
} /* XXX */
ret.bits = prom_dispatch(PROM_R_GETC, alpha_console);
ret.bits = prom_getc(alpha_console);
if (!prom_mapped) { /* XXX */
*rom_ptep = saved_pte; /* XXX */
ALPHA_TBIA(); /* XXX */
@ -176,7 +175,7 @@ promcnlookc(dev, cp)
*rom_ptep = rom_pte; /* XXX */
ALPHA_TBIA(); /* XXX */
} /* XXX */
ret.bits = prom_dispatch(PROM_R_GETC, alpha_console);
ret.bits = prom_getc(alpha_console);
if (!prom_mapped) { /* XXX */
*rom_ptep = saved_pte; /* XXX */
ALPHA_TBIA(); /* XXX */
@ -209,7 +208,7 @@ prom_getenv(id, buf, len)
*rom_ptep = rom_pte; /* XXX */
ALPHA_TBIA(); /* XXX */
} /* XXX */
ret.bits = prom_dispatch(PROM_R_GETENV, id, to, len);
ret.bits = prom_getenv_disp(id, to, len);
bcopy(to, buf, len);
if (!prom_mapped) { /* XXX */
*rom_ptep = saved_pte; /* XXX */
@ -268,10 +267,8 @@ hwrpb_checksum()
return (sum);
}
void XentRestart __P((void));
void
hwrbp_restart_setup()
hwrpb_restart_setup()
{
struct pcs *p;
@ -284,12 +281,12 @@ hwrbp_restart_setup()
hwrpb->rpb_vptb = VPTBASE;
/* when 'c'ontinuing from console halt, do a dump */
hwrpb->rpb_rest_term = (long (*)())&XentRestart;
hwrpb->rpb_rest_term = (u_int64_t)&XentRestart;
hwrpb->rpb_rest_term_val = 0x1;
#if 0
/* don't know what this is really used by, so don't mess with it. */
hwrpb->rpb_restart = (long (*)())&XentRestart;
hwrpb->rpb_restart = (u_int64_t)&XentRestart;
hwrpb->rpb_restart_val = 0x2;
#endif
@ -298,7 +295,7 @@ hwrbp_restart_setup()
p->pcs_flags |= (PCS_RC | PCS_CV);
}
long
u_int64_t
console_restart(ra, ai, pv)
u_int64_t ra, ai, pv;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: promcons.c,v 1.3 1996/05/30 18:44:30 cgd Exp $ */
/* $NetBSD: promcons.c,v 1.4 1996/11/13 21:13:12 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -42,10 +42,15 @@
#include <sys/types.h>
#include <sys/device.h>
#include <machine/prom.h>
static struct tty *prom_tty[1];
void promstart(), promtimeout();
int promparam();
cdev_decl(prom);
void promstart __P((struct tty *));
void promtimeout __P((void *));
int promparam __P((struct tty *, struct termios *));
int
promopen(dev, flag, mode, p)
@ -54,7 +59,6 @@ promopen(dev, flag, mode, p)
struct proc *p;
{
int unit = minor(dev);
u_short iobase;
struct tty *tp;
int s;
int error = 0, setuptimeout = 0;
@ -206,9 +210,10 @@ promstop(tp, flag)
}
void
promtimeout(tp)
struct tty *tp;
promtimeout(v)
void *v;
{
struct tty *tp = v;
u_char c;
while (promcnlookc(tp->t_dev, &c)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: support.c,v 1.2 1995/11/23 02:34:32 cgd Exp $ */
/* $NetBSD: support.c,v 1.3 1996/11/13 21:13:13 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -31,6 +31,7 @@
* Some C support functions that aren't (yet) in libkern or assembly.
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/errno.h>
struct qelem {

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_machdep.c,v 1.3 1995/11/23 02:34:35 cgd Exp $ */
/* $NetBSD: sys_machdep.c,v 1.4 1996/11/13 21:13:14 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -39,10 +39,12 @@ sys_sysarch(p, v, retval)
void *v;
register_t *retval;
{
#if 0
struct sys_sysarch_args /* {
syscallarg(int) op;
syscallarg(char *) parms;
} */ *uap = v;
#endif
return (ENOSYS);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: trap.c,v 1.16 1996/10/13 02:59:48 christos Exp $ */
/* $NetBSD: trap.c,v 1.17 1996/11/13 21:13:14 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -46,11 +46,25 @@
struct proc *fpcurproc; /* current user of the FPU */
void userret __P((struct proc *, u_int64_t, u_quad_t));
unsigned long Sfloat_to_reg __P((unsigned int));
unsigned int reg_to_Sfloat __P((unsigned long));
unsigned long Tfloat_reg_cvt __P((unsigned long));
#ifdef FIX_UNALIGNED_VAX_FP
unsigned long Ffloat_to_reg __P((unsigned int));
unsigned int reg_to_Ffloat __P((unsigned long));
unsigned long Gfloat_reg_cvt __P((unsigned long));
#endif
int unaligned_fixup __P((unsigned long, unsigned long,
unsigned long, struct proc *));
/*
* Define the code needed before returning to user mode, for
* trap and syscall.
*/
static __inline void
void
userret(p, pc, oticks)
register struct proc *p;
u_int64_t pc;
@ -104,7 +118,6 @@ trap(a0, a1, a2, entry, framep)
const unsigned long a0, a1, a2, entry;
struct trapframe *framep;
{
extern char fswintr[];
register struct proc *p;
register int i;
u_int64_t ucode;
@ -114,12 +127,15 @@ trap(a0, a1, a2, entry, framep)
cnt.v_trap++;
p = curproc;
ucode = 0;
if ((framep->tf_regs[FRAME_PS] & ALPHA_PSL_USERMODE) != 0) {
user = 1;
user = (framep->tf_regs[FRAME_PS] & ALPHA_PSL_USERMODE) != 0;
if (user) {
sticks = p->p_sticks;
p->p_md.md_tf = framep;
} else
user = 0;
} else {
#ifdef DIAGNOSTIC
sticks = 0xdeadbeef; /* XXX for -Wuninitialized */
#endif
}
switch (entry) {
case ALPHA_KENTRY_UNA:
@ -257,7 +273,6 @@ panic("foo");
register vm_map_t map;
vm_prot_t ftype;
int rv;
extern int fswintrberr();
extern vm_map_t kernel_map;
#ifdef NEW_PMAP
@ -311,6 +326,10 @@ panic("foo");
case 1: /* store instruction */
ftype = VM_PROT_WRITE;
break;
#ifdef DIAGNOSTIC
default: /* XXX gcc -Wuninitialized */
goto dopanic;
#endif
}
va = trunc_page((vm_offset_t)a0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: vm_machdep.c,v 1.20 1996/10/13 02:59:50 christos Exp $ */
/* $NetBSD: vm_machdep.c,v 1.21 1996/11/13 21:13:15 cgd Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -47,6 +47,7 @@
/*
* Dump the machine specific header information at the start of a core dump.
*/
int
cpu_coredump(p, vp, cred, chdr)
struct proc *p;
struct vnode *vp;
@ -54,7 +55,6 @@ cpu_coredump(p, vp, cred, chdr)
struct core *chdr;
{
int error;
register struct user *up = p->p_addr;
struct md_coredump cpustate;
struct coreseg cseg;
extern struct proc *fpcurproc;
@ -136,7 +136,6 @@ cpu_fork(p1, p2)
pt_entry_t *ptep;
int i;
extern struct proc *fpcurproc;
extern void switch_trampoline(), exception_return(), child_return();
p2->p_md.md_tf = p1->p_md.md_tf;
p2->p_md.md_flags = p1->p_md.md_flags & MDP_FPUSED;
@ -204,7 +203,6 @@ printf("NEW PROCESS %d USP = %p\n", p2->p_pid, p2->p_addr->u_pcb.pcb_hw.apcb_usp
*/
{
struct trapframe *p2tf;
extern void exception_return();
/*
* Pick a stack pointer, leaving room for a trapframe;
@ -261,8 +259,6 @@ cpu_set_kpc(p, pc)
void (*pc) __P((struct proc *));
{
struct pcb *pcbp;
extern void switch_trampoline();
extern void exception_return();
pcbp = &p->p_addr->u_pcb;
pcbp->pcb_context[0] = (u_int64_t)pc; /* s0 - pc to invoke */

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.h,v 1.5 1996/07/14 04:12:59 cgd Exp $ */
/* $NetBSD: autoconf.h,v 1.6 1996/11/13 21:13:17 cgd Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -80,9 +80,6 @@ struct bootdev_data {
char *ctrl_dev_type;
};
void set_clockintr __P((void));
void set_iointr __P((void (*)(void *, unsigned long)));
int badaddr __P((void *, size_t));
#ifdef EVCNT_COUNTERS
extern struct evcnt clock_intr_evcnt;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.12 1996/07/14 04:15:10 cgd Exp $ */
/* $NetBSD: cpu.h,v 1.13 1996/11/13 21:13:18 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -120,4 +120,52 @@ u_int64_t want_resched; /* resched() was called */
{ "unaligned_sigbus", CTLTYPE_INT }, \
}
#ifdef _KERNEL
struct pcb;
struct proc;
struct reg;
struct rpb;
struct trapframe;
extern int cold;
extern struct proc *fpcurproc;
extern struct rpb *hwrpb;
void XentArith __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
void XentIF __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
void XentInt __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
void XentMM __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
void XentRestart __P((void)); /* MAGIC */
void XentSys __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
void XentUna __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
void alpha_init __P((u_long, u_long));
void ast __P((struct trapframe *));
int badaddr __P((void *, size_t));
void child_return __P((struct proc *p));
void configure __P((void));
u_int64_t console_restart __P((u_int64_t, u_int64_t, u_int64_t));
void do_sir __P((void));
void dumpconf __P((void));
void exception_return __P((void)); /* MAGIC */
void frametoreg __P((struct trapframe *, struct reg *));
long fswintrberr __P((void)); /* MAGIC */
void init_prom_interface __P((void));
void interrupt __P((unsigned long, unsigned long, unsigned long,
struct trapframe *));
u_int64_t hwrpb_checksum __P((void));
void hwrpb_restart_setup __P((void));
void regdump __P((struct trapframe *));
void regtoframe __P((struct reg *, struct trapframe *));
void savectx __P((struct pcb *));
void set_clockintr __P((void));
void set_iointr __P((void (*)(void *, unsigned long)));
void switch_exit __P((struct proc *)); /* MAGIC */
void switch_trampoline __P((void)); /* MAGIC */
void syscall __P((u_int64_t, struct trapframe *));
void trap __P((unsigned long, unsigned long, unsigned long, unsigned long,
struct trapframe *));
#endif /* _KERNEL */
#endif /* _ALPHA_CPU_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: param.h,v 1.14 1996/10/25 20:48:59 cgd Exp $ */
/* $NetBSD: param.h,v 1.15 1996/11/13 21:13:19 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -52,6 +52,7 @@
#define MID_MACHINE MID_ALPHA
#include <machine/alpha_cpu.h>
#include <machine/cpu.h>
/*
* Round p (pointer or byte index) up to a correctly-aligned value for all

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.old.h,v 1.5 1996/07/09 00:39:24 cgd Exp $ */
/* $NetBSD: pmap.old.h,v 1.6 1996/11/13 21:13:19 cgd Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@ -121,8 +121,11 @@ extern pt_entry_t *Sysmap;
extern char *vmmap; /* map for mem, dumps, etc. */
/* Machine-specific functions. */
void pmap_activate __P((pmap_t));
void pmap_bootstrap __P((vm_offset_t firstaddr, vm_offset_t ptaddr));
void pmap_emulate_reference __P((struct proc *p, vm_offset_t v,
int user, int write));
void pmap_unmap_prom __P((void));
#endif /* _KERNEL */
#endif /* _PMAP_MACHINE_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: prom.h,v 1.4 1996/10/15 23:52:49 cgd Exp $ */
/* $NetBSD: prom.h,v 1.5 1996/11/13 21:13:20 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -29,8 +29,8 @@
#ifndef ASSEMBLER
struct prom_vec {
int (*routine)();
struct crd *routine_arg;
u_int64_t routine;
void *routine_arg;
};
/* The return value from a prom call. */
@ -79,8 +79,26 @@ void hwrpb_restart_setup __P((void));
* either don't need to copy anything, or don't need the copy because it's
* already being done elsewhere, are defined here.
*/
#define prom_close(chan) prom_dispatch(PROM_R_CLOSE, chan)
#define prom_read(chan, len, buf, blkno) \
prom_dispatch(PROM_R_READ, chan, len, buf, blkno)
#define prom_write(chan, len, buf, blkno) \
prom_dispatch(PROM_R_WRITE, chan, len, buf, blkno)
#define prom_close(chan) \
prom_dispatch(PROM_R_CLOSE, chan, 0, 0, 0)
#define prom_read(chan, len, buf, blkno) \
prom_dispatch(PROM_R_READ, chan, len, (u_int64_t)buf, blkno)
#define prom_write(chan, len, buf, blkno) \
prom_dispatch(PROM_R_WRITE, chan, len, (u_int64_t)buf, blkno)
#define prom_putstr(chan, str, len) \
prom_dispatch(PROM_R_PUTS, chan, (u_int64_t)str, len, 0)
#define prom_getc(chan) \
prom_dispatch(PROM_R_GETC, chan, 0, 0, 0)
#define prom_getenv_disp(id, buf, len) \
prom_dispatch(PROM_R_GETENV, id, (u_int64_t)buf, len, 0)
#ifndef ASSEMBLER
#ifdef _KERNEL
void promcnputc __P((dev_t, int));
int promcngetc __P((dev_t));
int promcnlookc __P((dev_t, char *));
u_int64_t prom_dispatch __P((u_int64_t, u_int64_t, u_int64_t, u_int64_t,
u_int64_t));
#endif /* _KERNEL */
#endif /* ASSEMBLER */

View File

@ -1,4 +1,4 @@
/* $NetBSD: rpb.h,v 1.8 1996/11/11 20:59:02 cgd Exp $ */
/* $NetBSD: rpb.h,v 1.9 1996/11/13 21:13:21 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@ -143,12 +143,12 @@ struct rpb {
vm_offset_t rpb_memdat_off; /* C8: memory data offset */
vm_offset_t rpb_condat_off; /* D0: config data offset */
vm_offset_t rpb_fru_off; /* D8: FRU table offset */
long (*rpb_save_term)(); /* E0: terminal save */
long rpb_save_term_val; /* E8: */
long (*rpb_rest_term)(); /* F0: terminal restore */
long rpb_rest_term_val; /* F8: */
long (*rpb_restart)(); /* 100: restart */
long rpb_restart_val; /* 108: */
u_int64_t rpb_save_term; /* E0: terminal save */
u_int64_t rpb_save_term_val; /* E8: */
u_int64_t rpb_rest_term; /* F0: terminal restore */
u_int64_t rpb_rest_term_val; /* F8: */
u_int64_t rpb_restart; /* 100: restart */
u_int64_t rpb_restart_val; /* 108: */
u_int64_t rpb_reserve_os; /* 110: */
u_int64_t rpb_reserve_hw; /* 118: */
u_int64_t rpb_checksum; /* 120: HWRPB checksum */
@ -158,10 +158,6 @@ struct rpb {
u_int64_t rpb_tbhint[8]; /* 149: TB hint block */
};
#ifdef _KERNEL
extern struct rpb *hwrpb;
#endif
/*
* PCS: Per-CPU information.
*/
@ -320,8 +316,8 @@ struct ctb {
* CRD: Console Routine Descriptor
*/
struct crd {
int64_t descriptor;
int (*code)();
int64_t descriptor;
u_int64_t entry_va;
};
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: pckbd.c,v 1.10 1996/10/23 04:12:20 cgd Exp $ */
/* $NetBSD: pckbd.c,v 1.11 1996/11/13 21:13:22 cgd Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles Hannum. All rights reserved.
@ -108,7 +108,6 @@ void pckbd_cnpollc __P((struct device *, int));
void pckbd_bell __P((struct device *, struct wsconsio_bell_data *));
int pckbd_ioctl __P((struct device *, u_long, caddr_t, int,
struct proc *));
char *pckbd_translate __P((struct device *dev, int c));
#if NWSCONS
@ -124,6 +123,14 @@ struct wscons_idev_spec pckbd_wscons_idev = {
#endif
void pckbd_bell_stop __P((void *));
static int kbd_wait_output __P((void));
static int kbd_wait_input __P((void));
static void kbd_flush_input __P((void));
static u_char kbc_get8042cmd __P((void));
static int kbc_put8042cmd __P((u_char));
int kbd_cmd __P((u_char, u_char));
void do_async_update __P((void *));
void async_update __P((void));
/*
* DANGER WIL ROBINSON -- the values of SCROLL, NUM, CAPS, and ALT are
@ -141,10 +148,10 @@ void pckbd_bell_stop __P((void *));
#define NONE 0x0400 /* no function */
#define KBD_DELAY \
{ u_char x = bus_space_read_1(pckbd_iot, pckbd_delay_ioh, 0); } \
{ u_char x = bus_space_read_1(pckbd_iot, pckbd_delay_ioh, 0); } \
{ u_char x = bus_space_read_1(pckbd_iot, pckbd_delay_ioh, 0); } \
{ u_char x = bus_space_read_1(pckbd_iot, pckbd_delay_ioh, 0); }
{ u_char x; x = bus_space_read_1(pckbd_iot, pckbd_delay_ioh, 0); } \
{ u_char x; x = bus_space_read_1(pckbd_iot, pckbd_delay_ioh, 0); } \
{ u_char x; x = bus_space_read_1(pckbd_iot, pckbd_delay_ioh, 0); } \
{ u_char x; x = bus_space_read_1(pckbd_iot, pckbd_delay_ioh, 0); }
static inline int
kbd_wait_output()
@ -415,7 +422,6 @@ int
pckbdintr(arg)
void *arg;
{
struct pckbd_softc *sc = arg;
u_char data;
static u_char last;
@ -449,11 +455,10 @@ pckbdintr(arg)
}
void
do_async_update(poll)
u_char poll;
do_async_update(v)
void *v;
{
int pos;
static int old_pos = -1;
u_long poll = (long)v;
async = 0;
@ -482,7 +487,7 @@ async_update()
if (kernel || polling) {
if (async)
untimeout(do_async_update, NULL);
do_async_update(1);
do_async_update((void *)1);
} else {
if (async)
return;
@ -581,134 +586,134 @@ typedef struct {
} Scan_def;
static Scan_def scan_codes[] = {
NONE, "", "", "", /* 0 unused */
ASCII, "\033", "\033", "\033", /* 1 ESCape */
ASCII, "1", "!", "!", /* 2 1 */
ASCII, "2", "@", "\000", /* 3 2 */
ASCII, "3", "#", "#", /* 4 3 */
ASCII, "4", "$", "$", /* 5 4 */
ASCII, "5", "%", "%", /* 6 5 */
ASCII, "6", "^", "\036", /* 7 6 */
ASCII, "7", "&", "&", /* 8 7 */
ASCII, "8", "*", "\010", /* 9 8 */
ASCII, "9", "(", "(", /* 10 9 */
ASCII, "0", ")", ")", /* 11 0 */
ASCII, "-", "_", "\037", /* 12 - */
ASCII, "=", "+", "+", /* 13 = */
ASCII, "\177", "\177", "\010", /* 14 backspace */
ASCII, "\t", "\177\t", "\t", /* 15 tab */
ASCII, "q", "Q", "\021", /* 16 q */
ASCII, "w", "W", "\027", /* 17 w */
ASCII, "e", "E", "\005", /* 18 e */
ASCII, "r", "R", "\022", /* 19 r */
ASCII, "t", "T", "\024", /* 20 t */
ASCII, "y", "Y", "\031", /* 21 y */
ASCII, "u", "U", "\025", /* 22 u */
ASCII, "i", "I", "\011", /* 23 i */
ASCII, "o", "O", "\017", /* 24 o */
ASCII, "p", "P", "\020", /* 25 p */
ASCII, "[", "{", "\033", /* 26 [ */
ASCII, "]", "}", "\035", /* 27 ] */
ASCII, "\r", "\r", "\n", /* 28 return */
CTL, "", "", "", /* 29 control */
ASCII, "a", "A", "\001", /* 30 a */
ASCII, "s", "S", "\023", /* 31 s */
ASCII, "d", "D", "\004", /* 32 d */
ASCII, "f", "F", "\006", /* 33 f */
ASCII, "g", "G", "\007", /* 34 g */
ASCII, "h", "H", "\010", /* 35 h */
ASCII, "j", "J", "\n", /* 36 j */
ASCII, "k", "K", "\013", /* 37 k */
ASCII, "l", "L", "\014", /* 38 l */
ASCII, ";", ":", ";", /* 39 ; */
ASCII, "'", "\"", "'", /* 40 ' */
ASCII, "`", "~", "`", /* 41 ` */
SHIFT, "", "", "", /* 42 shift */
ASCII, "\\", "|", "\034", /* 43 \ */
ASCII, "z", "Z", "\032", /* 44 z */
ASCII, "x", "X", "\030", /* 45 x */
ASCII, "c", "C", "\003", /* 46 c */
ASCII, "v", "V", "\026", /* 47 v */
ASCII, "b", "B", "\002", /* 48 b */
ASCII, "n", "N", "\016", /* 49 n */
ASCII, "m", "M", "\r", /* 50 m */
ASCII, ",", "<", "<", /* 51 , */
ASCII, ".", ">", ">", /* 52 . */
ASCII, "/", "?", "\037", /* 53 / */
SHIFT, "", "", "", /* 54 shift */
KP, "*", "*", "*", /* 55 kp * */
ALT, "", "", "", /* 56 alt */
ASCII, " ", " ", "\000", /* 57 space */
CAPS, "", "", "", /* 58 caps */
FUNC, "\033[M", "\033[Y", "\033[k", /* 59 f1 */
FUNC, "\033[N", "\033[Z", "\033[l", /* 60 f2 */
FUNC, "\033[O", "\033[a", "\033[m", /* 61 f3 */
FUNC, "\033[P", "\033[b", "\033[n", /* 62 f4 */
FUNC, "\033[Q", "\033[c", "\033[o", /* 63 f5 */
FUNC, "\033[R", "\033[d", "\033[p", /* 64 f6 */
FUNC, "\033[S", "\033[e", "\033[q", /* 65 f7 */
FUNC, "\033[T", "\033[f", "\033[r", /* 66 f8 */
FUNC, "\033[U", "\033[g", "\033[s", /* 67 f9 */
FUNC, "\033[V", "\033[h", "\033[t", /* 68 f10 */
NUM, "", "", "", /* 69 num lock */
SCROLL, "", "", "", /* 70 scroll lock */
KP, "7", "\033[H", "7", /* 71 kp 7 */
KP, "8", "\033[A", "8", /* 72 kp 8 */
KP, "9", "\033[I", "9", /* 73 kp 9 */
KP, "-", "-", "-", /* 74 kp - */
KP, "4", "\033[D", "4", /* 75 kp 4 */
KP, "5", "\033[E", "5", /* 76 kp 5 */
KP, "6", "\033[C", "6", /* 77 kp 6 */
KP, "+", "+", "+", /* 78 kp + */
KP, "1", "\033[F", "1", /* 79 kp 1 */
KP, "2", "\033[B", "2", /* 80 kp 2 */
KP, "3", "\033[G", "3", /* 81 kp 3 */
KP, "0", "\033[L", "0", /* 82 kp 0 */
KP, ".", "\177", ".", /* 83 kp . */
NONE, "", "", "", /* 84 0 */
NONE, "100", "", "", /* 85 0 */
NONE, "101", "", "", /* 86 0 */
FUNC, "\033[W", "\033[i", "\033[u", /* 87 f11 */
FUNC, "\033[X", "\033[j", "\033[v", /* 88 f12 */
NONE, "102", "", "", /* 89 0 */
NONE, "103", "", "", /* 90 0 */
NONE, "", "", "", /* 91 0 */
NONE, "", "", "", /* 92 0 */
NONE, "", "", "", /* 93 0 */
NONE, "", "", "", /* 94 0 */
NONE, "", "", "", /* 95 0 */
NONE, "", "", "", /* 96 0 */
NONE, "", "", "", /* 97 0 */
NONE, "", "", "", /* 98 0 */
NONE, "", "", "", /* 99 0 */
NONE, "", "", "", /* 100 */
NONE, "", "", "", /* 101 */
NONE, "", "", "", /* 102 */
NONE, "", "", "", /* 103 */
NONE, "", "", "", /* 104 */
NONE, "", "", "", /* 105 */
NONE, "", "", "", /* 106 */
NONE, "", "", "", /* 107 */
NONE, "", "", "", /* 108 */
NONE, "", "", "", /* 109 */
NONE, "", "", "", /* 110 */
NONE, "", "", "", /* 111 */
NONE, "", "", "", /* 112 */
NONE, "", "", "", /* 113 */
NONE, "", "", "", /* 114 */
NONE, "", "", "", /* 115 */
NONE, "", "", "", /* 116 */
NONE, "", "", "", /* 117 */
NONE, "", "", "", /* 118 */
NONE, "", "", "", /* 119 */
NONE, "", "", "", /* 120 */
NONE, "", "", "", /* 121 */
NONE, "", "", "", /* 122 */
NONE, "", "", "", /* 123 */
NONE, "", "", "", /* 124 */
NONE, "", "", "", /* 125 */
NONE, "", "", "", /* 126 */
NONE, "", "", "", /* 127 */
{ NONE, "", "", "", }, /* 0 unused */
{ ASCII, "\033", "\033", "\033", }, /* 1 ESCape */
{ ASCII, "1", "!", "!", }, /* 2 1 */
{ ASCII, "2", "@", "\000", }, /* 3 2 */
{ ASCII, "3", "#", "#", }, /* 4 3 */
{ ASCII, "4", "$", "$", }, /* 5 4 */
{ ASCII, "5", "%", "%", }, /* 6 5 */
{ ASCII, "6", "^", "\036", }, /* 7 6 */
{ ASCII, "7", "&", "&", }, /* 8 7 */
{ ASCII, "8", "*", "\010", }, /* 9 8 */
{ ASCII, "9", "(", "(", }, /* 10 9 */
{ ASCII, "0", ")", ")", }, /* 11 0 */
{ ASCII, "-", "_", "\037", }, /* 12 - */
{ ASCII, "=", "+", "+", }, /* 13 = */
{ ASCII, "\177", "\177", "\010", }, /* 14 backspace */
{ ASCII, "\t", "\177\t", "\t", }, /* 15 tab */
{ ASCII, "q", "Q", "\021", }, /* 16 q */
{ ASCII, "w", "W", "\027", }, /* 17 w */
{ ASCII, "e", "E", "\005", }, /* 18 e */
{ ASCII, "r", "R", "\022", }, /* 19 r */
{ ASCII, "t", "T", "\024", }, /* 20 t */
{ ASCII, "y", "Y", "\031", }, /* 21 y */
{ ASCII, "u", "U", "\025", }, /* 22 u */
{ ASCII, "i", "I", "\011", }, /* 23 i */
{ ASCII, "o", "O", "\017", }, /* 24 o */
{ ASCII, "p", "P", "\020", }, /* 25 p */
{ ASCII, "[", "{", "\033", }, /* 26 [ */
{ ASCII, "]", "}", "\035", }, /* 27 ] */
{ ASCII, "\r", "\r", "\n", }, /* 28 return */
{ CTL, "", "", "", }, /* 29 control */
{ ASCII, "a", "A", "\001", }, /* 30 a */
{ ASCII, "s", "S", "\023", }, /* 31 s */
{ ASCII, "d", "D", "\004", }, /* 32 d */
{ ASCII, "f", "F", "\006", }, /* 33 f */
{ ASCII, "g", "G", "\007", }, /* 34 g */
{ ASCII, "h", "H", "\010", }, /* 35 h */
{ ASCII, "j", "J", "\n", }, /* 36 j */
{ ASCII, "k", "K", "\013", }, /* 37 k */
{ ASCII, "l", "L", "\014", }, /* 38 l */
{ ASCII, ";", ":", ";", }, /* 39 ; */
{ ASCII, "'", "\"", "'", }, /* 40 ' */
{ ASCII, "`", "~", "`", }, /* 41 ` */
{ SHIFT, "", "", "", }, /* 42 shift */
{ ASCII, "\\", "|", "\034", }, /* 43 \ */
{ ASCII, "z", "Z", "\032", }, /* 44 z */
{ ASCII, "x", "X", "\030", }, /* 45 x */
{ ASCII, "c", "C", "\003", }, /* 46 c */
{ ASCII, "v", "V", "\026", }, /* 47 v */
{ ASCII, "b", "B", "\002", }, /* 48 b */
{ ASCII, "n", "N", "\016", }, /* 49 n */
{ ASCII, "m", "M", "\r", }, /* 50 m */
{ ASCII, ",", "<", "<", }, /* 51 , */
{ ASCII, ".", ">", ">", }, /* 52 . */
{ ASCII, "/", "?", "\037", }, /* 53 / */
{ SHIFT, "", "", "", }, /* 54 shift */
{ KP, "*", "*", "*", }, /* 55 kp * */
{ ALT, "", "", "", }, /* 56 alt */
{ ASCII, " ", " ", "\000", }, /* 57 space */
{ CAPS, "", "", "", }, /* 58 caps */
{ FUNC, "\033[M", "\033[Y", "\033[k", }, /* 59 f1 */
{ FUNC, "\033[N", "\033[Z", "\033[l", }, /* 60 f2 */
{ FUNC, "\033[O", "\033[a", "\033[m", }, /* 61 f3 */
{ FUNC, "\033[P", "\033[b", "\033[n", }, /* 62 f4 */
{ FUNC, "\033[Q", "\033[c", "\033[o", }, /* 63 f5 */
{ FUNC, "\033[R", "\033[d", "\033[p", }, /* 64 f6 */
{ FUNC, "\033[S", "\033[e", "\033[q", }, /* 65 f7 */
{ FUNC, "\033[T", "\033[f", "\033[r", }, /* 66 f8 */
{ FUNC, "\033[U", "\033[g", "\033[s", }, /* 67 f9 */
{ FUNC, "\033[V", "\033[h", "\033[t", }, /* 68 f10 */
{ NUM, "", "", "", }, /* 69 num lock */
{ SCROLL, "", "", "", }, /* 70 scroll lock */
{ KP, "7", "\033[H", "7", }, /* 71 kp 7 */
{ KP, "8", "\033[A", "8", }, /* 72 kp 8 */
{ KP, "9", "\033[I", "9", }, /* 73 kp 9 */
{ KP, "-", "-", "-", }, /* 74 kp - */
{ KP, "4", "\033[D", "4", }, /* 75 kp 4 */
{ KP, "5", "\033[E", "5", }, /* 76 kp 5 */
{ KP, "6", "\033[C", "6", }, /* 77 kp 6 */
{ KP, "+", "+", "+", }, /* 78 kp + */
{ KP, "1", "\033[F", "1", }, /* 79 kp 1 */
{ KP, "2", "\033[B", "2", }, /* 80 kp 2 */
{ KP, "3", "\033[G", "3", }, /* 81 kp 3 */
{ KP, "0", "\033[L", "0", }, /* 82 kp 0 */
{ KP, ".", "\177", ".", }, /* 83 kp . */
{ NONE, "", "", "", }, /* 84 0 */
{ NONE, "100", "", "", }, /* 85 0 */
{ NONE, "101", "", "", }, /* 86 0 */
{ FUNC, "\033[W", "\033[i", "\033[u", }, /* 87 f11 */
{ FUNC, "\033[X", "\033[j", "\033[v", }, /* 88 f12 */
{ NONE, "102", "", "", }, /* 89 0 */
{ NONE, "103", "", "", }, /* 90 0 */
{ NONE, "", "", "", }, /* 91 0 */
{ NONE, "", "", "", }, /* 92 0 */
{ NONE, "", "", "", }, /* 93 0 */
{ NONE, "", "", "", }, /* 94 0 */
{ NONE, "", "", "", }, /* 95 0 */
{ NONE, "", "", "", }, /* 96 0 */
{ NONE, "", "", "", }, /* 97 0 */
{ NONE, "", "", "", }, /* 98 0 */
{ NONE, "", "", "", }, /* 99 0 */
{ NONE, "", "", "", }, /* 100 */
{ NONE, "", "", "", }, /* 101 */
{ NONE, "", "", "", }, /* 102 */
{ NONE, "", "", "", }, /* 103 */
{ NONE, "", "", "", }, /* 104 */
{ NONE, "", "", "", }, /* 105 */
{ NONE, "", "", "", }, /* 106 */
{ NONE, "", "", "", }, /* 107 */
{ NONE, "", "", "", }, /* 108 */
{ NONE, "", "", "", }, /* 109 */
{ NONE, "", "", "", }, /* 110 */
{ NONE, "", "", "", }, /* 111 */
{ NONE, "", "", "", }, /* 112 */
{ NONE, "", "", "", }, /* 113 */
{ NONE, "", "", "", }, /* 114 */
{ NONE, "", "", "", }, /* 115 */
{ NONE, "", "", "", }, /* 116 */
{ NONE, "", "", "", }, /* 117 */
{ NONE, "", "", "", }, /* 118 */
{ NONE, "", "", "", }, /* 119 */
{ NONE, "", "", "", }, /* 120 */
{ NONE, "", "", "", }, /* 121 */
{ NONE, "", "", "", }, /* 122 */
{ NONE, "", "", "", }, /* 123 */
{ NONE, "", "", "", }, /* 124 */
{ NONE, "", "", "", }, /* 125 */
{ NONE, "", "", "", }, /* 126 */
{ NONE, "", "", "", }, /* 127 */
};
/*
@ -850,7 +855,7 @@ int
pckbd_cngetc(dev)
struct device *dev;
{
register char *cp;
register char *cp = NULL;
u_char data;
static u_char last;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pms.c,v 1.4 1996/10/23 04:12:21 cgd Exp $ */
/* $NetBSD: pms.c,v 1.5 1996/11/13 21:13:23 cgd Exp $ */
/*-
* Copyright (c) 1994 Charles Hannum.
@ -125,12 +125,17 @@ struct wscons_mdev_spec pms_mdev_spec = {
pms_disable,
};
static void pms_flush __P((void));
static void pms_dev_cmd __P((u_char));
static void pms_aux_cmd __P((u_char));
static void pms_pit_cmd __P((u_char));
static inline void
pms_flush()
{
u_char c;
while (c = bus_space_read_1(pms_iot, pms_status_ioh, 0) & 0x03)
while ((c = bus_space_read_1(pms_iot, pms_status_ioh, 0) & 0x03) != 0)
if ((c & PMS_OBUF_FULL) == PMS_OBUF_FULL) {
/* XXX - delay is needed to prevent some keyboards from
wedging when the system boots */
@ -287,7 +292,6 @@ pmsintr(arg)
static u_char buttons;
u_char changed;
static char dx, dy;
u_char buffer[5];
if ((sc->sc_state & PMS_OPEN) == 0) {
/* Interrupts are not expected. Discard the byte. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: apecs_lca_bus_io.c,v 1.4 1996/08/27 16:29:23 cgd Exp $ */
/* $NetBSD: apecs_lca_bus_io.c,v 1.5 1996/11/13 21:13:24 cgd Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@ -37,7 +37,9 @@
#include <machine/bus.h>
#include <alpha/pci/apecsreg.h>
#include <alpha/pci/apecsvar.h>
#include <alpha/pci/lcareg.h>
#include <alpha/pci/lcavar.h>
#if (APECS_PCI_SIO != LCA_PCI_SIO)
#error Sparse I/O addresses do not match up?
@ -46,15 +48,15 @@
#define CHIP apecs_lca
/* IO region 1 */
#define CHIP_IO_W1_START(v) 0x00000000
#define CHIP_IO_W1_END(v) 0x0003ffff
#define CHIP_IO_W1_START(v) 0x00000000UL
#define CHIP_IO_W1_END(v) 0x0003ffffUL
#define CHIP_IO_W1_BASE(v) APECS_PCI_SIO
#define CHIP_IO_W1_MASK(v) 0x00ffffff
#define CHIP_IO_W1_MASK(v) 0x00ffffffUL
/* IO region 2 */
#define CHIP_IO_W2_START(v) 0x00040000 /* XXX from HAXR2 */
#define CHIP_IO_W2_END(v) 0xfffbffff /* XXX from HAXR2 */
#define CHIP_IO_W2_START(v) 0x00040000UL /* XXX from HAXR2 */
#define CHIP_IO_W2_END(v) 0xfffbffffUL /* XXX from HAXR2 */
#define CHIP_IO_W2_BASE(v) APECS_PCI_SIO
#define CHIP_IO_W2_MASK(v) 0x00ffffff
#define CHIP_IO_W2_MASK(v) 0x00ffffffUL
#include "pcs_bus_io_common.c"

View File

@ -1,4 +1,4 @@
/* $NetBSD: apecs_lca_bus_mem.c,v 1.5 1996/08/27 16:29:24 cgd Exp $ */
/* $NetBSD: apecs_lca_bus_mem.c,v 1.6 1996/11/13 21:13:24 cgd Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@ -37,7 +37,9 @@
#include <machine/bus.h>
#include <alpha/pci/apecsreg.h>
#include <alpha/pci/apecsvar.h>
#include <alpha/pci/lcareg.h>
#include <alpha/pci/lcavar.h>
#if (APECS_PCI_SPARSE != LCA_PCI_SPARSE) || (APECS_PCI_DENSE != LCA_PCI_DENSE)
#error Memory addresses do not match up?
@ -46,21 +48,21 @@
#define CHIP apecs_lca
/* Dense region 1 */
#define CHIP_D_MEM_W1_START(v) 0x00000000
#define CHIP_D_MEM_W1_END(v) 0xffffffff
#define CHIP_D_MEM_W1_START(v) 0x00000000UL
#define CHIP_D_MEM_W1_END(v) 0xffffffffUL
#define CHIP_D_MEM_W1_BASE(v) APECS_PCI_DENSE
#define CHIP_D_MEM_W1_MASK(v) 0xffffffff
#define CHIP_D_MEM_W1_MASK(v) 0xffffffffUL
/* Sparse region 1 */
#define CHIP_S_MEM_W1_START(v) 0x00000000
#define CHIP_S_MEM_W1_END(v) 0x00ffffff
#define CHIP_S_MEM_W1_START(v) 0x00000000UL
#define CHIP_S_MEM_W1_END(v) 0x00ffffffUL
#define CHIP_S_MEM_W1_BASE(v) APECS_PCI_SPARSE
#define CHIP_S_MEM_W1_MASK(v) 0x07ffffff
#define CHIP_S_MEM_W1_MASK(v) 0x07ffffffUL
/* Sparse region 2 */
#define CHIP_S_MEM_W2_START(v) 0x01000000 /* XXX from HAXR1 */
#define CHIP_S_MEM_W2_END(v) 0xfeffffff /* XXX from HAXR1 */
#define CHIP_S_MEM_W2_START(v) 0x01000000UL /* XXX from HAXR1 */
#define CHIP_S_MEM_W2_END(v) 0xfeffffffUL /* XXX from HAXR1 */
#define CHIP_S_MEM_W2_BASE(v) APECS_PCI_SPARSE
#define CHIP_S_MEM_W2_MASK(v) 0x07ffffff
#define CHIP_S_MEM_W2_MASK(v) 0x07ffffffUL
#include "pcs_bus_mem_common.c"

View File

@ -1,4 +1,4 @@
/* $NetBSD: apecs_pci.c,v 1.9 1996/10/13 03:00:02 christos Exp $ */
/* $NetBSD: apecs_pci.c,v 1.10 1996/11/13 21:13:25 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -113,6 +113,11 @@ apecs_conf_read(cpv, tag, offset)
int s, secondary, ba;
int32_t old_haxr2; /* XXX */
#ifdef DIAGNOSTIC
s = 0; /* XXX gcc -Wuninitialized */
old_haxr2 = 0; /* XXX gcc -Wuninitialized */
#endif
/* secondary if bus # != 0 */
pci_decompose_tag(&acp->ac_pc, tag, &secondary, 0, 0);
if (secondary) {
@ -159,6 +164,11 @@ apecs_conf_write(cpv, tag, offset, data)
int s, secondary;
int32_t old_haxr2; /* XXX */
#ifdef DIAGNOSTIC
s = 0; /* XXX gcc -Wuninitialized */
old_haxr2 = 0; /* XXX gcc -Wuninitialized */
#endif
/* secondary if bus # != 0 */
pci_decompose_tag(&acp->ac_pc, tag, &secondary, 0, 0);
if (secondary) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: cia_bus_mem.c,v 1.5 1996/08/27 16:29:26 cgd Exp $ */
/* $NetBSD: cia_bus_mem.c,v 1.6 1996/11/13 21:13:26 cgd Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@ -42,10 +42,10 @@
#define CHIP cia
/* Dense region 1 */
#define CHIP_D_MEM_W1_START(v) 0x00000000
#define CHIP_D_MEM_W1_END(v) 0xffffffff
#define CHIP_D_MEM_W1_START(v) 0x00000000UL
#define CHIP_D_MEM_W1_END(v) 0xffffffffUL
#define CHIP_D_MEM_W1_BASE(v) CIA_PCI_DENSE
#define CHIP_D_MEM_W1_MASK(v) 0xffffffff
#define CHIP_D_MEM_W1_MASK(v) 0xffffffffUL
/* Sparse region 1 */
#define CHIP_S_MEM_W1_START(v) \

View File

@ -1,4 +1,4 @@
/* $NetBSD: cia_pci.c,v 1.5 1996/10/13 03:00:04 christos Exp $ */
/* $NetBSD: cia_pci.c,v 1.6 1996/11/13 21:13:26 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -113,6 +113,11 @@ cia_conf_read(cpv, tag, offset)
int s, secondary, ba;
int32_t old_haxr2; /* XXX */
#ifdef DIAGNOSTIC
s = 0; /* XXX gcc -Wuninitialized */
old_haxr2 = 0; /* XXX gcc -Wuninitialized */
#endif
/* secondary if bus # != 0 */
pci_decompose_tag(&ccp->cc_pc, tag, &secondary, 0, 0);
if (secondary) {
@ -159,6 +164,11 @@ cia_conf_write(cpv, tag, offset, data)
int s, secondary;
int32_t old_haxr2; /* XXX */
#ifdef DIAGNOSTIC
s = 0; /* XXX gcc -Wuninitialized */
old_haxr2 = 0; /* XXX gcc -Wuninitialized */
#endif
/* secondary if bus # != 0 */
pci_decompose_tag(&ccp->cc_pc, tag, &secondary, 0, 0);
if (secondary) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: cia_swiz_bus_mem.c,v 1.5 1996/08/27 16:29:26 cgd Exp $ */
/* $NetBSD: cia_swiz_bus_mem.c,v 1.6 1996/11/13 21:13:26 cgd Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@ -42,10 +42,10 @@
#define CHIP cia
/* Dense region 1 */
#define CHIP_D_MEM_W1_START(v) 0x00000000
#define CHIP_D_MEM_W1_END(v) 0xffffffff
#define CHIP_D_MEM_W1_START(v) 0x00000000UL
#define CHIP_D_MEM_W1_END(v) 0xffffffffUL
#define CHIP_D_MEM_W1_BASE(v) CIA_PCI_DENSE
#define CHIP_D_MEM_W1_MASK(v) 0xffffffff
#define CHIP_D_MEM_W1_MASK(v) 0xffffffffUL
/* Sparse region 1 */
#define CHIP_S_MEM_W1_START(v) \

View File

@ -1,4 +1,4 @@
/* $NetBSD: ciareg.h,v 1.5 1996/07/09 00:54:44 cgd Exp $ */
/* $NetBSD: ciareg.h,v 1.6 1996/11/13 21:13:27 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -38,17 +38,17 @@
/*
* Base addresses
*/
#define CIA_PCI_SMEM1 0x8000000000L
#define CIA_PCI_SMEM2 0x8400000000L
#define CIA_PCI_SMEM3 0x8500000000L
#define CIA_PCI_SIO1 0x8580000000L
#define CIA_PCI_SIO2 0x85c0000000L
#define CIA_PCI_DENSE 0x8600000000L
#define CIA_PCI_CONF 0x8700000000L
#define CIA_PCI_IACK 0x8720000000L
#define CIA_CSRS 0x8740000000L
#define CIA_PCI_MC_CSRS 0x8750000000L
#define CIA_PCI_ATRANS 0x8760000000L
#define CIA_PCI_SMEM1 0x8000000000UL
#define CIA_PCI_SMEM2 0x8400000000UL
#define CIA_PCI_SMEM3 0x8500000000UL
#define CIA_PCI_SIO1 0x8580000000UL
#define CIA_PCI_SIO2 0x85c0000000UL
#define CIA_PCI_DENSE 0x8600000000UL
#define CIA_PCI_CONF 0x8700000000UL
#define CIA_PCI_IACK 0x8720000000UL
#define CIA_CSRS 0x8740000000UL
#define CIA_PCI_MC_CSRS 0x8750000000UL
#define CIA_PCI_ATRANS 0x8760000000UL
/*
* General CSRs
@ -56,16 +56,16 @@
#define CIA_CSR_HAE_MEM (CIA_CSRS + 0x400)
#define HAE_MEM_REG1_START(x) (((u_int32_t)(x) & 0xe0000000) << 0)
#define HAE_MEM_REG1_MASK 0x1fffffff
#define HAE_MEM_REG2_START(x) (((u_int32_t)(x) & 0x0000f800) << 16)
#define HAE_MEM_REG2_MASK 0x07ffffff
#define HAE_MEM_REG3_START(x) (((u_int32_t)(x) & 0x000000fc) << 16)
#define HAE_MEM_REG3_MASK 0x03ffffff
#define HAE_MEM_REG1_START(x) (((u_int32_t)(x) & 0xe0000000UL) << 0)
#define HAE_MEM_REG1_MASK 0x1fffffffUL
#define HAE_MEM_REG2_START(x) (((u_int32_t)(x) & 0x0000f800UL) << 16)
#define HAE_MEM_REG2_MASK 0x07ffffffUL
#define HAE_MEM_REG3_START(x) (((u_int32_t)(x) & 0x000000fcUL) << 16)
#define HAE_MEM_REG3_MASK 0x03ffffffUL
#define CIA_CSR_HAE_IO (CIA_CSRS + 0x440)
#define HAE_IO_REG1_START(x) 0
#define HAE_IO_REG1_MASK 0x01ffffff
#define HAE_IO_REG2_START(x) (((u_int32_t)(x) & 0xfe000000) << 0)
#define HAE_IO_REG2_MASK 0x01ffffff
#define HAE_IO_REG1_START(x) 0UL
#define HAE_IO_REG1_MASK 0x01ffffffUL
#define HAE_IO_REG2_START(x) (((u_int32_t)(x) & 0xfe000000UL) << 0)
#define HAE_IO_REG2_MASK 0x01ffffffUL

View File

@ -1,4 +1,4 @@
/* $NetBSD: lca_pci.c,v 1.6 1996/10/13 03:00:08 christos Exp $ */
/* $NetBSD: lca_pci.c,v 1.7 1996/11/13 21:13:28 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -115,6 +115,10 @@ lca_conf_read(cpv, tag, offset)
pcireg_t *datap, data;
int s, secondary, device, ba;
#ifdef DIAGNOSTIC
s = 0; /* XXX gcc -Wuninitialized */
#endif
/* secondary if bus # != 0 */
pci_decompose_tag(&lcp->lc_pc, tag, &secondary, &device, 0);
if (secondary) {
@ -167,6 +171,10 @@ lca_conf_write(cpv, tag, offset, data)
pcireg_t *datap;
int s, secondary, device;
#ifdef DIAGNOSTIC
s = 0; /* XXX gcc -Wuninitialized */
#endif
/* secondary if bus # != 0 */
pci_decompose_tag(&lcp->lc_pc, tag, &secondary, &device, 0);
if (secondary) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_2100_a50.c,v 1.11 1996/10/23 04:12:26 cgd Exp $ */
/* $NetBSD: pci_2100_a50.c,v 1.12 1996/11/13 21:13:29 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -108,7 +108,8 @@ dec_2100_a50_intr_map(acv, bustag, buspin, line, ihp)
return 1;
}
if (buspin > 4) {
printf("pci_map_int: bad interrupt pin %d\n", buspin);
printf("dec_2100_a50_intr_map: bad interrupt pin %d\n",
buspin);
return 1;
}
@ -132,6 +133,11 @@ dec_2100_a50_intr_map(acv, bustag, buspin, line, ihp)
case PCI_INTERRUPT_PIN_C:
pirq = 1;
break;
#ifdef DIAGNOSTIC
default: /* XXX gcc -Wuninitialized */
panic("dec_2100_a50_intr_map bogus PCI pin %d\n",
buspin);
#endif
};
break;
@ -147,6 +153,11 @@ dec_2100_a50_intr_map(acv, bustag, buspin, line, ihp)
case PCI_INTERRUPT_PIN_C:
pirq = 2;
break;
#ifdef DIAGNOSTIC
default: /* XXX gcc -Wuninitialized */
panic("dec_2100_a50_intr_map bogus PCI pin %d\n",
buspin);
#endif
};
break;
@ -162,8 +173,18 @@ dec_2100_a50_intr_map(acv, bustag, buspin, line, ihp)
case PCI_INTERRUPT_PIN_C:
pirq = 0;
break;
#ifdef DIAGNOSTIC
default: /* XXX gcc -Wuninitialized */
panic("dec_2100_a50_intr_map bogus PCI pin %d\n",
buspin);
#endif
};
break;
default:
printf("dec_2100_a50_intr_map: weird device number %d\n",
device);
return 1;
}
pirqreg = pci_conf_read(pc, pci_make_tag(pc, 0, APECS_SIO_DEVICE, 0),
@ -191,7 +212,9 @@ dec_2100_a50_intr_string(acv, ih)
void *acv;
pci_intr_handle_t ih;
{
#if 0
struct apecs_config *acp = acv;
#endif
return sio_intr_string(NULL /*XXX*/, ih);
}
@ -203,7 +226,9 @@ dec_2100_a50_intr_establish(acv, ih, level, func, arg)
int level;
int (*func) __P((void *));
{
#if 0
struct apecs_config *acp = acv;
#endif
return sio_intr_establish(NULL /*XXX*/, ih, IST_LEVEL, level, func,
arg);
@ -213,7 +238,9 @@ void
dec_2100_a50_intr_disestablish(acv, cookie)
void *acv, *cookie;
{
#if 0
struct apecs_config *acp = acv;
#endif
sio_intr_disestablish(NULL /*XXX*/, cookie);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_axppci_33.c,v 1.9 1996/10/23 04:12:27 cgd Exp $ */
/* $NetBSD: pci_axppci_33.c,v 1.10 1996/11/13 21:13:29 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -132,6 +132,11 @@ dec_axppci_33_intr_map(lcv, bustag, buspin, line, ihp)
case PCI_INTERRUPT_PIN_C:
pirq = 1;
break;
#ifdef DIAGNOSTIC
default: /* XXX gcc -Wuninitialized */
panic("dec_axppci_33_intr_map bogus PCI pin %d\n",
buspin);
#endif
};
break;
@ -147,6 +152,11 @@ dec_axppci_33_intr_map(lcv, bustag, buspin, line, ihp)
case PCI_INTERRUPT_PIN_C:
pirq = 2;
break;
#ifdef DIAGNOSTIC
default: /* XXX gcc -Wuninitialized */
panic("dec_axppci_33_intr_map bogus PCI pin %d\n",
buspin);
#endif
};
break;
@ -162,12 +172,18 @@ dec_axppci_33_intr_map(lcv, bustag, buspin, line, ihp)
case PCI_INTERRUPT_PIN_C:
pirq = 0;
break;
#ifdef DIAGNOSTIC
default: /* XXX gcc -Wuninitialized */
panic("dec_axppci_33_intr_map bogus PCI pin %d\n",
buspin);
#endif
};
break;
default:
printf("dec_axppci_33_pci_map_int: unknown device %d\n",
device);
panic("dec_axppci_33_pci_map_int: bad device number");
printf("dec_axppci_33_intr_map: weird device number %d\n",
device);
return 1;
}
pirqreg = pci_conf_read(pc, pci_make_tag(pc, 0, LCA_SIO_DEVICE, 0),
@ -195,7 +211,9 @@ dec_axppci_33_intr_string(lcv, ih)
void *lcv;
pci_intr_handle_t ih;
{
#if 0
struct lca_config *lcp = lcv;
#endif
return sio_intr_string(NULL /*XXX*/, ih);
}
@ -207,7 +225,9 @@ dec_axppci_33_intr_establish(lcv, ih, level, func, arg)
int level;
int (*func) __P((void *));
{
#if 0
struct lca_config *lcp = lcv;
#endif
return sio_intr_establish(NULL /*XXX*/, ih, IST_LEVEL, level, func,
arg);
@ -217,7 +237,9 @@ void
dec_axppci_33_intr_disestablish(lcv, cookie)
void *lcv, *cookie;
{
#if 0
struct lca_config *lcp = lcv;
#endif
sio_intr_disestablish(NULL /*XXX*/, cookie);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_eb164.c,v 1.1 1996/11/11 21:08:12 cgd Exp $ */
/* $NetBSD: pci_eb164.c,v 1.2 1996/11/13 21:13:30 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -64,52 +64,16 @@ void *dec_eb164_intr_establish __P((void *, pci_intr_handle_t,
int, int (*func)(void *), void *));
void dec_eb164_intr_disestablish __P((void *, void *));
#if 0 /* XXX */
#define KN20AA_PCEB_IRQ 31
#define KN20AA_MAX_IRQ 32
#define PCI_STRAY_MAX 5
struct eb164_intrhand {
TAILQ_ENTRY(eb164_intrhand) ih_q;
int (*ih_fun)();
void *ih_arg;
u_long ih_count;
int ih_level;
};
TAILQ_HEAD(eb164_intrchain, eb164_intrhand);
struct eb164_intrchain eb164_pci_intrs[KN20AA_MAX_IRQ];
int eb164_pci_strayintrcnt[KN20AA_MAX_IRQ];
#ifdef EVCNT_COUNTERS
struct evcnt eb164_intr_evcnt;
#endif
#endif /* 0 XXX */
void eb164_pci_strayintr __P((int irq));
void eb164_iointr __P((void *framep, unsigned long vec));
#if 0 /* XXX */
void eb164_enable_intr __P((int irq));
void eb164_disable_intr __P((int irq));
struct eb164_intrhand *eb164_attach_intr __P((struct eb164_intrchain *,
int, int (*) (void *), void *));
#endif /* 0 XXX */
void
pci_eb164_pickintr(ccp)
struct cia_config *ccp;
{
int i;
#if 0 /* XXX */
struct eb164_intrhand *nintrhand;
#endif /* 0 XXX */
bus_space_tag_t iot = ccp->cc_iot;
pci_chipset_tag_t pc = &ccp->cc_pc;
#if 0 /* XXX */
for (i = 0; i < KN20AA_MAX_IRQ; i++)
TAILQ_INIT(&eb164_pci_intrs[i]);
#endif /* 0 XXX */
pc->pc_intr_v = ccp;
pc->pc_intr_map = dec_eb164_intr_map;
pc->pc_intr_string = dec_eb164_intr_string;
@ -215,7 +179,9 @@ dec_eb164_intr_string(ccv, ih)
void *ccv;
pci_intr_handle_t ih;
{
#if 0
struct cia_config *ccp = ccv;
#endif
static char irqstr[15]; /* 11 + 2 + NULL + sanity */
sprintf(irqstr, "BOGUS");
@ -282,122 +248,15 @@ void
dec_eb164_intr_disestablish(ccv, cookie)
void *ccv, *cookie;
{
struct cia_config *ccp = ccv;
panic("dec_eb164_intr_disestablish not implemented"); /* XXX */
}
/*
* caught a stray interrupt; notify if not too many seen already.
*/
void
eb164_pci_strayintr(irq)
int irq;
{
log(LOG_ERR, "stray eb164 irq %d\n", irq);
#if 0 /* XXX */
eb164_pci_strayintrcnt[irq]++;
if (eb164_pci_strayintrcnt[irq] == PCI_STRAY_MAX)
eb164_disable_intr(irq);
log(LOG_ERR, "stray eb164 irq %d\n", irq);
if (eb164_pci_strayintrcnt[irq] == PCI_STRAY_MAX)
log(LOG_ERR, "disabling interrupts on eb164 irq %d\n", irq);
#endif /* 0 XXX */
}
void
eb164_iointr(framep, vec)
void *framep;
unsigned long vec;
{
struct eb164_intrhand *ih;
int irq, handled;
#if 0 /* XXX */
if (vec >= 0x900) {
if (vec >= 0x900 + (KN20AA_MAX_IRQ << 4))
panic("eb164_iointr: vec 0x%x out of range\n", vec);
irq = (vec - 0x900) >> 4;
#ifdef EVCNT_COUNTERS
eb164_intr_evcnt.ev_count++;
#else
if (KN20AA_MAX_IRQ != INTRCNT_KN20AA_IRQ_LEN)
panic("eb164 interrupt counter sizes inconsistent");
intrcnt[INTRCNT_KN20AA_IRQ + irq]++;
#endif
for (ih = eb164_pci_intrs[irq].tqh_first, handled = 0;
ih != NULL; ih = ih->ih_q.tqe_next) {
int rv;
rv = (*ih->ih_fun)(ih->ih_arg);
ih->ih_count++;
handled = handled || (rv != 0);
}
if (!handled)
eb164_pci_strayintr(irq);
return;
}
if (vec >= 0x800) {
#if NSIO
sio_iointr(framep, vec);
#endif
return;
}
#endif /* 0 XXX */
panic("eb164_iointr: weird vec 0x%x\n", vec);
}
#if 0 /* XXX */
void
eb164_enable_intr(irq)
int irq;
{
/*
* From disassembling small bits of the OSF/1 kernel:
* the following appears to enable a given interrupt request.
* "blech." I'd give valuable body parts for better docs or
* for a good decompiler.
*/
alpha_mb();
REGVAL(0x8780000000L + 0x40L) |= (1 << irq); /* XXX */
alpha_mb();
}
void
eb164_disable_intr(irq)
int irq;
{
alpha_mb();
REGVAL(0x8780000000L + 0x40L) &= ~(1 << irq); /* XXX */
alpha_mb();
}
struct eb164_intrhand *
eb164_attach_intr(chain, level, func, arg)
struct eb164_intrchain *chain;
int level;
int (*func) __P((void *));
void *arg;
{
struct eb164_intrhand *nintrhand;
nintrhand = (struct eb164_intrhand *)
malloc(sizeof *nintrhand, M_DEVBUF, M_WAITOK);
nintrhand->ih_fun = func;
nintrhand->ih_arg = arg;
nintrhand->ih_count = 0;
nintrhand->ih_level = level;
TAILQ_INSERT_TAIL(chain, nintrhand, ih_q);
return (nintrhand);
}
#endif /* 0 XXX */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_kn20aa.c,v 1.19 1996/10/23 04:12:28 cgd Exp $ */
/* $NetBSD: pci_kn20aa.c,v 1.20 1996/11/13 21:13:31 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -70,7 +70,7 @@ void dec_kn20aa_intr_disestablish __P((void *, void *));
struct kn20aa_intrhand {
TAILQ_ENTRY(kn20aa_intrhand) ih_q;
int (*ih_fun)();
int (*ih_fun) __P((void *));
void *ih_arg;
u_long ih_count;
int ih_level;
@ -95,7 +95,6 @@ pci_kn20aa_pickintr(ccp)
struct cia_config *ccp;
{
int i;
struct kn20aa_intrhand *nintrhand;
bus_space_tag_t iot = ccp->cc_iot;
pci_chipset_tag_t pc = &ccp->cc_pc;
@ -133,7 +132,6 @@ dec_kn20aa_intr_map(ccv, bustag, buspin, line, ihp)
pci_chipset_tag_t pc = &ccp->cc_pc;
int device;
int kn20aa_irq;
void *ih;
if (buspin == 0) {
/* No IRQ used. */
@ -175,14 +173,9 @@ dec_kn20aa_intr_map(ccv, bustag, buspin, line, ihp)
break;
default:
#ifdef KN20AA_BOGUS_IRQ_FROB
*ihp = 0xdeadbeef;
printf("\n\n BOGUS INTERRUPT MAPPING: dev %d, pin %d\n",
device, buspin);
return (0);
#endif
panic("pci_kn20aa_map_int: invalid device number %d\n",
printf("dec_kn20aa_intr_map: weird device number %d\n",
device);
return 1;
}
kn20aa_irq += buspin - 1;
@ -199,20 +192,16 @@ dec_kn20aa_intr_string(ccv, ih)
void *ccv;
pci_intr_handle_t ih;
{
#if 0
struct cia_config *ccp = ccv;
#endif
static char irqstr[15]; /* 11 + 2 + NULL + sanity */
#ifdef KN20AA_BOGUS_IRQ_FROB
if (ih == 0xdeadbeef) {
sprintf(irqstr, "BOGUS");
return (irqstr);
}
#endif
if (ih > KN20AA_MAX_IRQ)
panic("dec_kn20aa_a50_intr_string: bogus kn20aa IRQ 0x%x\n",
ih);
sprintf(irqstr, "kn20aa irq %d", ih);
sprintf(irqstr, "kn20aa irq %ld", ih);
return (irqstr);
}
@ -223,25 +212,11 @@ dec_kn20aa_intr_establish(ccv, ih, level, func, arg)
int level;
int (*func) __P((void *));
{
#if 0
struct cia_config *ccp = ccv;
#endif
void *cookie;
#ifdef KN20AA_BOGUS_IRQ_FROB
if (ih == 0xdeadbeef) {
int i;
char chars[10];
printf("dec_kn20aa_intr_establish: BOGUS IRQ\n");
do {
printf("IRQ to enable? ");
getstr(chars, 10);
i = atoi(chars);
} while (i < 0 || i > 32);
printf("ENABLING IRQ %d\n", i);
kn20aa_enable_intr(i);
return ((void *)0xbabefacedeadbeef);
}
#endif
if (ih > KN20AA_MAX_IRQ)
panic("dec_kn20aa_intr_establish: bogus kn20aa IRQ 0x%x\n",
ih);
@ -255,7 +230,9 @@ void
dec_kn20aa_intr_disestablish(ccv, cookie)
void *ccv, *cookie;
{
#if 0
struct cia_config *ccp = ccv;
#endif
panic("dec_kn20aa_intr_disestablish not implemented"); /* XXX */
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_machdep.h,v 1.4 1996/04/12 06:08:52 cgd Exp $ */
/* $NetBSD: pci_machdep.h,v 1.5 1996/11/13 21:13:32 cgd Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@ -85,3 +85,10 @@ struct alpha_pci_chipset {
(*(c)->pc_intr_establish)((c)->pc_intr_v, (ih), (l), (h), (a))
#define pci_intr_disestablish(c, iv) \
(*(c)->pc_intr_disestablish)((c)->pc_intr_v, (iv))
/*
* alpha-specific PCI funcionts.
* NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
*/
void pci_display_console __P((bus_space_tag_t, bus_space_tag_t,
pci_chipset_tag_t, int, int, int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcivga.c,v 1.12 1996/10/23 04:12:29 cgd Exp $ */
/* $NetBSD: pcivga.c,v 1.13 1996/11/13 21:13:33 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -88,7 +88,6 @@ pcivgamatch(parent, match, aux)
struct device *parent;
void *match, *aux;
{
struct cfdata *cf = match;
struct pci_attach_args *pa = aux;
/*
@ -248,7 +247,9 @@ pcivgammap(dev, offset, prot)
off_t offset;
int prot;
{
#if 0 /* XXX */
struct pcivga_softc *sc = (struct pcivga_softc *)dev;
#endif
int rv;
rv = -1;
@ -335,7 +336,6 @@ pcivga_putstr(id, row, col, cp, len)
struct pcivga_devconfig *dc = id;
bus_space_tag_t memt = dc->dc_memt;
bus_space_handle_t memh = dc->dc_memh;
char *dcp;
int i, off;
off = (row * dc->dc_ncol + col) * 2;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sio.c,v 1.12 1996/10/23 04:12:33 cgd Exp $ */
/* $NetBSD: sio.c,v 1.13 1996/11/13 21:13:33 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -84,7 +84,6 @@ siomatch(parent, match, aux)
struct device *parent;
void *match, *aux;
{
struct cfdata *cf = match;
struct pci_attach_args *pa = aux;
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_INTEL ||
@ -99,7 +98,6 @@ pcebmatch(parent, match, aux)
struct device *parent;
void *match, *aux;
{
struct cfdata *cf = match;
struct pci_attach_args *pa = aux;
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_INTEL ||

View File

@ -1,4 +1,4 @@
/* $NetBSD: sio_pic.c,v 1.14 1996/10/23 04:12:33 cgd Exp $ */
/* $NetBSD: sio_pic.c,v 1.15 1996/11/13 21:13:34 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -69,7 +69,7 @@ bus_space_handle_t sio_ioh_icu1, sio_ioh_icu2, sio_ioh_elcr;
* the list. The handler is called with its (single) argument.
*/
struct intrhand {
int (*ih_fun)();
int (*ih_fun) __P((void *));
void *ih_arg;
u_long ih_count;
struct intrhand *ih_next;
@ -114,6 +114,8 @@ u_int8_t initial_elcr[2];
#define INITIALLY_LEVEL_TRIGGERED(irq) 0
#endif
void sio_setirqstat __P((int, int, int));
void
sio_setirqstat(irq, enabled, type)
int irq, enabled;
@ -341,7 +343,7 @@ sio_intr_disestablish(v, cookie)
void *cookie;
{
printf("sio_intr_disestablish(%lx)\n", cookie);
printf("sio_intr_disestablish(%p)\n", cookie);
/* XXX */
/* XXX NEVER ALLOW AN INITIALLY-ENABLED INTERRUPT TO BE DISABLED */

View File

@ -1,4 +1,4 @@
/* $NetBSD: tga_bt485.c,v 1.3 1996/07/09 00:55:05 cgd Exp $ */
/* $NetBSD: tga_bt485.c,v 1.4 1996/11/13 21:13:35 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -28,10 +28,12 @@
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/buf.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <vm/vm.h>
#include <dev/pci/pcivar.h>
#include <machine/tgareg.h>
@ -198,7 +200,7 @@ tga_bt485_set_cmap(dc, fbc)
struct fbcmap *fbc;
{
struct bt485data *data = dc->dc_ramdac_private;
int error, count, index, s;
int count, index, s;
if ((u_int)fbc->index >= 256 ||
((u_int)fbc->index + (u_int)fbc->count) > 256)
@ -255,7 +257,7 @@ tga_bt485_set_cursor(dc, fbc)
struct fbcursor *fbc;
{
struct bt485data *data = dc->dc_ramdac_private;
int error, count, index, v, s;
int count, index, v, s;
v = fbc->set;
@ -397,7 +399,6 @@ tga_bt485_get_curmax(dc, fbp)
struct tga_devconfig *dc;
struct fbcurpos *fbp;
{
struct bt485data *data = dc->dc_ramdac_private;
fbp->x = fbp->y = CURSOR_MAX_SIZE;
return (0);

View File

@ -1,4 +1,4 @@
/* $NetBSD: scc.c,v 1.26 1996/10/16 05:07:57 jonathan Exp $ */
/* $NetBSD: scc.c,v 1.27 1996/11/13 21:13:36 cgd Exp $ */
/*
* Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@ -106,7 +106,7 @@
#include <alpha/tc/ioasicreg.h>
#include <dev/tc/ioasicvar.h>
extern void ttrstrt __P((void *));
cdev_decl(scc);
#undef SCCDEV
#define SCCDEV 15 /* XXX */
@ -290,6 +290,7 @@ scc_consinit(dev, sccaddr)
splx(s);
}
#ifndef alpha
void
scc_oconsinit(sc, dev)
struct scc_softc *sc;
@ -311,6 +312,7 @@ scc_oconsinit(sc, dev)
DELAY(1000);
splx(s);
}
#endif
/*
* Test to see if device is present.
@ -983,7 +985,7 @@ sccintr(xxxsc)
if (rr2 == 6) { /* strange, distinguished value */
SCC_READ_REG(regs, SCC_CHANNEL_A, ZSRR_IPEND, rr3);
if (rr3 == 0)
return;
return 1;
}
SCC_WRITE_REG(regs, SCC_CHANNEL_A, SCC_RR0, ZSWR0_CLR_INTR);

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcds_dma.c,v 1.13 1996/10/13 03:00:43 christos Exp $ */
/* $NetBSD: tcds_dma.c,v 1.14 1996/11/13 21:13:37 cgd Exp $ */
/*
* Copyright (c) 1994 Peter Galbavy. All rights reserved.
@ -133,7 +133,7 @@ tcds_dma_intr(sc)
trans = sc->sc_dmasize - resid;
if (trans < 0) { /* transferred < 0 ? */
printf("tcds_dma %d: xfer (%d) > req (%d)\n",
printf("tcds_dma %d: xfer (%d) > req (%ld)\n",
sc->sc_slot, trans, sc->sc_dmasize);
trans = sc->sc_dmasize;
}
@ -161,7 +161,7 @@ tcds_dma_intr(sc)
if (dud & TCDS_DUD0_VALID11)
dudmask |= TCDS_DUD_BYTE11;
#endif
ESP_DMA(("dud0 at 0x%lx dudmask 0x%x\n",
ESP_DMA(("dud0 at 0x%p dudmask 0x%x\n",
addr, dudmask));
addr = (u_int32_t *)ALPHA_PHYS_TO_K0SEG((vm_offset_t)addr);
*addr = (*addr & ~dudmask) | (dud & dudmask);
@ -182,7 +182,7 @@ tcds_dma_intr(sc)
if (dud & TCDS_DUD1_VALID11)
panic("tcds_dma: dud1 byte 3 valid");
#endif
ESP_DMA(("dud1 at 0x%lx dudmask 0x%x\n",
ESP_DMA(("dud1 at 0x%p dudmask 0x%x\n",
addr, dudmask));
addr = (u_int32_t *)ALPHA_PHYS_TO_K0SEG((vm_offset_t)addr);
*addr = (*addr & ~dudmask) | (dud & dudmask);
@ -224,7 +224,7 @@ tcds_dma_setup(sc, addr, len, datain, dmasize)
sc->sc_dmalen = len;
sc->sc_iswrite = datain;
ESP_DMA(("tcds_dma %d: start %d@0x%lx,%d\n", sc->sc_slot, *sc->sc_dmalen, *sc->sc_dmaaddr, sc->sc_iswrite));
ESP_DMA(("tcds_dma %d: start %ld@%p,%d\n", sc->sc_slot, *sc->sc_dmalen, *sc->sc_dmaaddr, sc->sc_iswrite));
/*
* the rules say we cannot transfer more than the limit
@ -234,7 +234,7 @@ tcds_dma_setup(sc, addr, len, datain, dmasize)
size = min(*dmasize, DMAMAX((size_t) *sc->sc_dmaaddr));
*dmasize = sc->sc_dmasize = size;
ESP_DMA(("dma_start: dmasize = %d\n", sc->sc_dmasize));
ESP_DMA(("dma_start: dmasize = %ld\n", sc->sc_dmasize));
/* Load address, set/clear unaligned transfer and read/write bits. */
/* XXX PICK AN ADDRESS TYPE, AND STICK TO IT! */

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcdsvar.h,v 1.4 1996/09/09 18:10:39 cgd Exp $ */
/* $NetBSD: tcdsvar.h,v 1.5 1996/11/13 21:13:38 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -88,6 +88,7 @@ void tcds_intr_establish __P((struct device *, void *, tc_intrlevel_t,
void tcds_intr_disestablish __P((struct device *, void *));
void tcds_dma_enable __P((struct tcds_slotconfig *, int));
void tcds_scsi_enable __P((struct tcds_slotconfig *, int));
int tcds_scsi_iserr __P((struct tcds_slotconfig *));
int tcds_scsi_isintr __P((struct tcds_slotconfig *, int));
void tcds_scsi_reset __P((struct tcds_slotconfig *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: kbd.c,v 1.2 1996/09/15 17:15:28 cgd Exp $ */
/* $NetBSD: kbd.c,v 1.3 1996/11/13 21:13:39 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
@ -59,6 +59,7 @@
#include <sys/syslog.h>
#include <sys/systm.h>
#include <sys/tty.h>
#include <sys/signalvar.h>
#include <machine/autoconf.h>
@ -68,6 +69,10 @@
#include <alpha/wscons/event_var.h>
#include <alpha/wscons/wsconsvar.h>
static void kbd_repeat __P((void *));
cdev_decl(kbd);
struct kbd_softc {
struct device *k_idev; /* the input device */
struct wscons_idev_spec k_ispec; /* the input device information */
@ -105,7 +110,7 @@ kbdattach(idev, ispec)
k->k_ispec = *ispec;
}
void
static void
kbd_repeat(void *arg)
{
struct kbd_softc *k = (struct kbd_softc *)arg;
@ -168,8 +173,6 @@ kbd_input(register int c)
int
kbdopen(dev_t dev, int flags, int mode, struct proc *p)
{
int s;
struct tty *tp;
if (kbd_softc.k_events.ev_io)
return (EBUSY);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ms.c,v 1.2 1996/09/15 17:15:29 cgd Exp $ */
/* $NetBSD: ms.c,v 1.3 1996/11/13 21:13:40 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
@ -56,11 +56,14 @@
#include <sys/syslog.h>
#include <sys/systm.h>
#include <sys/tty.h>
#include <sys/signalvar.h>
#include <machine/vuid_event.h>
#include <alpha/wscons/event_var.h>
#include <alpha/wscons/wsconsvar.h>
cdev_decl(ms);
struct ms_softc {
struct device *ms_dev;
struct wscons_mdev_spec ms_spec;
@ -176,7 +179,7 @@ msopen(dev, flags, mode, p)
int flags, mode;
struct proc *p;
{
int s, error;
int error;
if (ms_softc.ms_dev == NULL) /* never attached! */
return (ENXIO);
@ -245,7 +248,6 @@ msioctl(dev, cmd, data, flag, p)
int flag;
struct proc *p;
{
int s;
switch (cmd) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: wscons.c,v 1.7 1996/10/13 03:00:45 christos Exp $ */
/* $NetBSD: wscons.c,v 1.8 1996/11/13 21:13:40 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -491,5 +491,5 @@ wscons_cnpollc(dev, i)
int i;
{
kbd_cngetc(dev, i); /* XXX XXX */
kbd_cnpollc(dev, i); /* XXX XXX */
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: wscons_emul.c,v 1.4 1996/10/13 03:00:47 christos Exp $ */
/* $NetBSD: wscons_emul.c,v 1.5 1996/11/13 21:13:41 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -37,6 +37,11 @@
#include <alpha/wscons/wscons_emul.h>
#include <alpha/wscons/ascii.h>
static int wscons_emul_input_normal __P((struct wscons_emul_data *, char));
static int wscons_emul_input_haveesc __P((struct wscons_emul_data *, char));
static void wscons_emul_docontrol __P((struct wscons_emul_data *, char));
static int wscons_emul_input_control __P((struct wscons_emul_data *, char));
void
wscons_emul_attach(we, wo)
struct wscons_emul_data *we;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wscons_rinit.c,v 1.2 1996/07/09 00:55:50 cgd Exp $ */
/* $NetBSD: wscons_rinit.c,v 1.3 1996/11/13 21:13:42 cgd Exp $ */
/*
* Copyright (c) 1991, 1993
@ -53,6 +53,8 @@
#include <alpha/wscons/wscons_rfont.h>
void rcons_initfont __P((struct rcons *, struct raster_font *));
void
rcons_initfont(rc, fp)
struct rcons *rc;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wsconsvar.h,v 1.2 1996/04/12 06:10:36 cgd Exp $ */
/* $NetBSD: wsconsvar.h,v 1.3 1996/11/13 21:13:42 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -108,4 +108,15 @@ void wscons_attach_input __P((struct device *,
*/
void wscons_input __P((char *));
void msattach __P((struct device *, struct wscons_mdev_spec *));
void ms_event __P((char, int, int));
void kbdattach __P((struct device *, struct wscons_idev_spec *));
void kbd_input __P((int));
void wscons_kbd_bell __P((void));
int kbd_cngetc __P((dev_t));
void kbd_cnpollc __P((dev_t, int));
int kbdioctl __P((dev_t dev, u_long cmd, register caddr_t data,
int flag, struct proc *p));
#endif /* _ALPHA_WSCONS_WSCONSVAR_H_ */