diff options
author | dmlb <dmlb@FreeBSD.org> | 2001-05-08 22:51:05 +0000 |
---|---|---|
committer | dmlb <dmlb@FreeBSD.org> | 2001-05-08 22:51:05 +0000 |
commit | 7879220c01bc02894bebf8bc0efd7e32aefd4b07 (patch) | |
tree | a7575224f6b1960071b8fc007110f8d87d33da2d /sys/pccard/pccard_nbk.c | |
parent | 9c961719a94f3f6ce4adca2c046fa20993a2f57f (diff) | |
download | FreeBSD-src-7879220c01bc02894bebf8bc0efd7e32aefd4b07.zip FreeBSD-src-7879220c01bc02894bebf8bc0efd7e32aefd4b07.tar.gz |
Add a sysctl pair for the pcic memory allocation range
machdep.pccard.pcic_mem_start
machdep.pccard.pcic_mem_end
and default the range to IOM_BEGIN/IOM_END.
This may prove useful to if_ray users (and others) on more modern
hardware that maps BIOS stuff into 0xd000-0xdffff.
MFC: after 1 week
Approved by: imp
Diffstat (limited to 'sys/pccard/pccard_nbk.c')
-rw-r--r-- | sys/pccard/pccard_nbk.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/pccard/pccard_nbk.c b/sys/pccard/pccard_nbk.c index 62a7267..34333d0 100644 --- a/sys/pccard/pccard_nbk.c +++ b/sys/pccard/pccard_nbk.c @@ -53,6 +53,7 @@ #include <sys/systm.h> #include <sys/module.h> #include <sys/kernel.h> +#include <sys/sysctl.h> #include <sys/queue.h> #include <sys/types.h> @@ -60,6 +61,8 @@ #include <machine/bus.h> #include <machine/resource.h> +#include <i386/isa/isa.h> + #include <pccard/cardinfo.h> #include <pccard/slot.h> @@ -77,6 +80,16 @@ devclass_t pccard_devclass; #define PCCARD_DEVINFO(d) (struct pccard_devinfo *) device_get_ivars(d) +SYSCTL_NODE(_machdep, OID_AUTO, pccard, CTLFLAG_RW, 0, "pccard"); + +static u_long pcic_mem_start = IOM_BEGIN; +static u_long pcic_mem_end = IOM_END; + +SYSCTL_ULONG(_machdep_pccard, OID_AUTO, pcic_mem_start, CTLFLAG_RW, + &pcic_mem_start, 0, ""); +SYSCTL_ULONG(_machdep_pccard, OID_AUTO, pcic_mem_end, CTLFLAG_RW, + &pcic_mem_end, 0, ""); + /* * glue for NEWCARD/OLDCARD compat layer */ @@ -215,7 +228,7 @@ pccard_alloc_resource(device_t bus, device_t child, int type, int *rid, { /* * Consider adding a resource definition. We allow rid 0 for - * irq, 0-3 for memory and 0-1 for ports + * irq, 0-4 for memory and 0-1 for ports */ int passthrough = (device_get_parent(child) != bus); int isdefault; @@ -225,8 +238,8 @@ pccard_alloc_resource(device_t bus, device_t child, int type, int *rid, struct resource *res; if (start == 0 && end == ~0 && type == SYS_RES_MEMORY && count != 1) { - start = 0xd0000; - end = 0xdffff; + start = pcic_mem_start; + end = pcic_mem_end; } isdefault = (start == 0UL && end == ~0UL); if (!passthrough && !isdefault) { |