summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2005-03-25 16:41:18 +0000
committermickey <mickey@openbsd.org>2005-03-25 16:41:18 +0000
commitb801f11092ab5284cae60f80745e95d50b4a35dd (patch)
treec4dd68b65cfd2cd9c55e4cfc215bc817131cfbb7
parentderegister (and deauto!). ok millert@ marco@ (diff)
downloadwireguard-openbsd-b801f11092ab5284cae60f80745e95d50b4a35dd.tar.xz
wireguard-openbsd-b801f11092ab5284cae60f80745e95d50b4a35dd.zip
during probe test for a mem window reduction in case there is not enough space in the hole for a large one (ie generic now boots same as ramdisk on some machinesw/ lots of bios); found and testing by niallo@
-rw-r--r--sys/dev/isa/i82365_isa.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/isa/i82365_isa.c b/sys/dev/isa/i82365_isa.c
index 4752201ad3a..ba7468a6cea 100644
--- a/sys/dev/isa/i82365_isa.c
+++ b/sys/dev/isa/i82365_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365_isa.c,v 1.19 2005/01/27 17:03:23 millert Exp $ */
+/* $OpenBSD: i82365_isa.c,v 1.20 2005/03/25 16:41:18 mickey Exp $ */
/* $NetBSD: i82365_isa.c,v 1.11 1998/06/09 07:25:00 thorpej Exp $ */
/*
@@ -90,8 +90,9 @@ pcic_isa_probe(parent, match, aux)
void *match, *aux;
{
struct isa_attach_args *ia = aux;
- bus_space_tag_t iot = ia->ia_iot;
+ bus_space_tag_t memt = ia->ia_memt, iot = ia->ia_iot;
bus_space_handle_t ioh, memh;
+ bus_size_t msize;
int val, found;
/* Disallow wildcarded i/o address. */
@@ -104,8 +105,14 @@ pcic_isa_probe(parent, match, aux)
if (ia->ia_msize == -1)
ia->ia_msize = PCIC_MEMSIZE;
- if (bus_space_map(ia->ia_memt, ia->ia_maddr, ia->ia_msize, 0, &memh))
- return (0);
+ msize = ia->ia_msize;
+ if (bus_space_map(memt, ia->ia_maddr, ia->ia_msize, 0, &memh)) {
+ if (ia->ia_msize > PCIC_MEMSIZE &&
+ !bus_space_map(memt, ia->ia_maddr, PCIC_MEMSIZE, 0, &memh))
+ msize = PCIC_MEMSIZE;
+ else
+ return (0);
+ }
found = 0;
/*
@@ -134,11 +141,12 @@ pcic_isa_probe(parent, match, aux)
found++;
bus_space_unmap(iot, ioh, PCIC_IOSIZE);
- bus_space_unmap(ia->ia_memt, memh, ia->ia_msize);
+ bus_space_unmap(memt, memh, msize);
if (!found)
return (0);
ia->ia_iosize = PCIC_IOSIZE;
+ ia->ia_msize = msize;
return (1);
}