diff options
author | nate <nate@FreeBSD.org> | 1997-10-24 15:27:16 +0000 |
---|---|---|
committer | nate <nate@FreeBSD.org> | 1997-10-24 15:27:16 +0000 |
commit | 58e051f462fcfefb0bf2691e2626c3e80d407447 (patch) | |
tree | db88caff7d9a5d062b19b208a11c53878af9a1c4 /sys/pccard/pccard.c | |
parent | b2cdb3a2f1ce6984268425998d96368a4117b936 (diff) | |
download | FreeBSD-src-58e051f462fcfefb0bf2691e2626c3e80d407447.zip FreeBSD-src-58e051f462fcfefb0bf2691e2626c3e80d407447.tar.gz |
- Use the definitions found in <i386/isa/isa.h> instead of rolling our
own definition of ISA_HOLE_START. We shouldn't need to include
bus/processor specific code in here, but it is required. At least by
doing it this way it becomes more obvious where the bogusness is.
Obtained from: email with bde
Diffstat (limited to 'sys/pccard/pccard.c')
-rw-r--r-- | sys/pccard/pccard.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c index 969d97d..f96c142 100644 --- a/sys/pccard/pccard.c +++ b/sys/pccard/pccard.c @@ -60,10 +60,10 @@ #include <machine/md_var.h> /* - * XXX ISA_HOLE_START is defined in <machine/pmap.h>, but it - * carries too much baggage + * XXX We shouldn't be using processor-specific/bus-specific code in + * here, but we need the start of the ISA hole (IOM_BEGIN). */ -#define ISA_HOLE_START 0xA0000 +#include <i386/isa/isa.h> SYSCTL_NODE(_machdep, OID_AUTO, pccard, CTLFLAG_RW, 0, "pccard"); @@ -592,7 +592,7 @@ allocate_driver(struct slot *sp, struct drv_desc *drvp) */ if (drvp->mem) devp->isahd.id_maddr = - (caddr_t)(drvp->mem + atdevbase - ISA_HOLE_START); + (caddr_t)(drvp->mem + atdevbase - IOM_BEGIN); else devp->isahd.id_maddr = 0; devp->next = sp->devices; @@ -995,7 +995,7 @@ crdioctl(dev_t dev, int cmd, caddr_t data, int fflag, struct proc *p) */ pccard_mem = *(unsigned long *)data; pccard_kmem = (unsigned char *)(pccard_mem - + atdevbase - ISA_HOLE_START); + + atdevbase - IOM_BEGIN); break; /* * Set power values @@ -1061,7 +1061,8 @@ crdpoll(dev_t dev, int events, struct proc *p) static int invalid_io_memory(unsigned long adr, int size) { - if (adr < 0xC0000 || (adr+size) > 0x100000) + /* XXX - What's magic about 0xC0000?? */ + if (adr < 0xC0000 || (adr+size) > IOM_END) return(1); return(0); } |