summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/isa.c
Commit message (Collapse)AuthorAgeFilesLines
* Convert the type of bus_space_handle_t of pc98 from structure intokato2000-10-201-10/+10
| | | | | | pointer to structure. Reviewed by: nyan
* Don't assume that address of I/O address table increase (PC-98 only).nyan2000-09-071-2/+2
| | | | Pointed out by: Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
* Redo the isa compat driver shim so that each driver is self containedpeter2000-05-281-5/+0
| | | | | | | and does not require that evil list of drivers in isa_compat.h. It uses the same strategy that pci drivers use, namely a COMPAT_ISA_DRIVER() macro that creates the glue on the fly. Theoretically old-style isa drivers should be preloadable now.
* Added indirect pio into the bus space stuff for the NEC PC-98. bus.hkato2000-03-291-0/+102
| | | | | | | | | | | includes one of bus_at386.h and bus_pc98.h. Becuase only bus_pc98.h supports indirect pio and bus_at386.h is identical to old bus.h, there is no functional change in PC-AT's kernels. That is, it cannot cause performance loss. Submitted by: nyan Reviewed by: imp bde and luoqi provided useful comments for earlier version.
* Connect the ISA and PCI compatability shims to an option. In this casepeter2000-03-191-1/+5
| | | | | | | | it's options COMPAT_OLDISA and COMPAT_OLDPCI. This is meant to be a fairly strong incentive to update the older drivers to newbus, but doesn't (quite) leave anybody hanging with no hardware support. I was talking with a few folks and I was encouraged to simply break or disable the shims but that was a bit too drastic for my liking.
* * Add struct resource_list* argument to resource_list_alloc anddfr1999-10-121-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | resource_list_release. This removes the dependancy on the layout of ivars. * Move set_resource, get_resource and delete_resource from isa_if.m to bus_if.m. * Simplify driver code by providing wrappers to those methods: bus_set_resource(dev, type, rid, start, count); bus_get_resource(dev, type, rid, startp, countp); bus_get_resource_start(dev, type, rid); bus_get_resource_count(dev, type, rid); bus_delete_resource(dev, type, rid); * Delete isa_get_rsrc and use bus_get_resource_start instead. * Fix a stupid typo in isa_alloc_resource reported by Takahashi Yoshihiro <nyan@FreeBSD.org>. * Print a diagnostic message if we can't assign resources to a PnP device. * Change device_print_prettyname() so that it doesn't print "(no driver assigned)-1" for anonymous devices.
* Trim some unused #includespeter1999-10-111-4/+0
| | | | Submitted by: phk
* Eliminate some magic numbers.peter1999-09-011-4/+4
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Allow up to 8 ports, 4 memory regions and two irqs and drqs.dfr1999-05-301-4/+8
|
* * Factor out the common code between the isa bus drivers for i386 and alpha.dfr1999-05-221-431/+32
| | | | | | | * Re-work the resource allocation code to use helper functions in subr_bus.c. * Add simple isa interface for manipulating the resource ranges which can be allocated and remove the code from isa_write_ivar() which was previously used for this purpose.
* * Define a new static method DEVICE_IDENTIFY which is called to add devicedfr1999-05-141-106/+36
| | | | | | | | | | instances to a parent bus. * Define a new method BUS_ADD_CHILD which can be called from DEVICE_IDENTIFY to add new instances. * Add a generic implementation of DEVICE_PROBE which calls DEVICE_IDENTIFY for each driver attached to the parent's devclass. * Move the hint-based isa probe from the isa driver to a new isahint driver which can be shared between i386 and alpha.
* Move the declaration of the interrupt type from the driver structuredfr1999-05-081-5/+4
| | | | to the BUS_SETUP_INTR call.
* GC some #if 0 junkpeter1999-05-081-9/+1
|
* Look up the sensitive flag better, allowing interoperation between old andpeter1999-05-081-2/+4
| | | | | | new isa drivers with sensitive flags. If the resource_find() code is meant to "find" the wildcard sensitive flag for a driver even though a unit is supplied, this can be simplified.
* Changed the type of id_port from short into int to avoid wrongkato1999-04-241-2/+2
| | | | | | | conversion from short to unsigned long which is an argument of bus_alloc_resource. Since the value -1 is used to indicate no port reousece, id_port need to be signed (suggested by Doug Rabson and Peter Wemm.)
* Don't clear the hints on release, just the resource containers.peter1999-04-241-7/+1
|
* As a temporary anti-foot-shooting measure, don't let the user attachpeter1999-04-161-1/+5
| | | | the atkbd device to isa, as was in the old (and 3.x) GENERIC config.
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-956/+506
| | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
* Move initialization of SWI's in the tty|net|bio masks from isa.c intopeter1999-04-111-7/+1
| | | | the static initializers in ipl.s.
* don't print '?' for ioaddr the device may legitimately not have anphk1998-11-291-2/+2
| | | | ioaddr.
* Initialize isa_devtab entries for interrupt handlers in individualbde1998-10-221-3/+6
| | | | | | | device drivers, not in ioconf.c. Use a different hack in isa_device.h so that a new config(8) is not required yet. pc98 parts approved by: kato
* Fixed two potentially serious classes of bugs:dg1998-10-131-2/+2
| | | | | | | | | | | | | | | | 1) The vnode pager wasn't properly tracking the file size due to "size" being page rounded in some cases and not in others. This sometimes resulted in corrupted files. First noticed by Terry Lambert. Fixed by changing the "size" pager_alloc parameter to be a 64bit byte value (as opposed to a 32bit page index) and changing the pagers and their callers to deal with this properly. 2) Fixed a bogus type cast in round_page() and trunc_page() that caused some 64bit offsets and sizes to be scrambled. Removing the cast required adding casts at a few dozen callers. There may be problems with other bogus casts in close-by macros. A quick check seemed to indicate that those were okay, however.
* Don't print conflict messages in haveseen_isadev() if CC_QUIET isbde1998-10-121-10/+16
| | | | | | | | | specified. This makes haveseen_isadev() useful for searching for a free resource. This increases the bitrot in the pci RESOURCE_CHECK code. Fixed the pre-attach conflict message. The flag for distinguishing pre-attach conflict checks from pre-probe ones was never set.
* Stop physical DMA for the non-auto case in isa_dmadone(). This fixes abde1998-07-191-1/+3
| | | | | | | | small part of a bug suite beginning in the SLICE probes but mostly in the floppy driver. This is a quick fix: the auto case shouldn't be special; DMA should also be stopped in isa_dma_release(); isa_dmastop() probably shouldn't exist; common DMA registers should not be accessed without locking.
* Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108.des1998-04-171-3/+3
|
* Back out DIAGNOSTIC changes.eivind1998-02-061-3/+1
|
* Turn DIAGNOSTIC into a new-style option.eivind1998-02-041-1/+3
|
* Skip probing devices which have already probed true.eivind1998-01-311-1/+13
|
* fix a few style nites...jmg1997-11-301-12/+15
| | | | | | | make isa_dmacascade, isa_dmastart, isa_dmadone, and find_isadev MUCH easier to be found by starting them at the beginging of the line... remove braces inside of ifdef RESOURCE_CHECK... found by % in vi...
* Moved splhigh()/spl0() calls from isa_configure() to configure() so thatbde1997-11-211-3/+1
| | | | | | | | | | | | | there is a natural place to initialize `safepri' in a future commit. Spinoffs: - spl0() gets called in the unlikely event that isa is not configured. - configure() has better control over enabling interrupts. - it is now less unclear that interrupts aren't actually enabled early. Rev.1.48 of autoconf.c seems to have done the opposite of what was intended - moving the isa_configure() call delayed the spl0() side effect. Added some comments about the bogons. Removed the splhigh() call since it is a no-op.
* Allow "foo0: disabled, not probed" message to stay, but make it conditionaljkh1997-10-121-4/+4
| | | | | on bootverbose so that those who _really wanna know_ still can. Compromise suggested by: joerg
* aha1542.c aic6360.c cy.c fd.c ft.cgibbs1997-09-211-1/+14
| | | | | | | | | | | | if_ie.c if_wl.c if_zp.c isa.c isa_device.h labpc.c mcd.c ncr5380.c scd.c seagate.c si.c sio.c tw.c ultra14f.c wcd.c wd.c: Update for changes in the callout interface. apic_vector.s icu_vector.s ipl.s ipl_funcs.c: Add CAM software/hardware interrupt support.
* teach pnp to keep isa_device structs around, and teach isa.c how to scanjmg1997-09-191-4/+15
| | | | | | | | | | | | | these structs for conflics... it still exist that two PnP cards can colide, but this is up to the user to make sure it doesn't happen... other modifications to pnp.c to format output properly, and hide more output behind bootverbose flag... fix some bugons in pnp.h that would of made it difficult for inclusion in external programs (for import of pnpinfo)
* Here is a patch to alleviate the current problem with the dma interfacemsmith1997-08-281-14/+42
| | | | | | | | | | | | | and the sound driver which uses auto dma. The dma interface functionality remains however it now checks to see if a dma is operating in auto dma mode and if so it bypasses the busy flag check . I have modified the sound driver 3.5 to adjust for this new behavior and tested it under FreeBSD 3.0 -current This patch also includes the new function isa_dmastop. Submitted by: Amancio Hasty <hasty@rah.star-gate.com>
* Check for irq conflicts even if conflicts are allowed. Conflictingbde1997-08-251-7/+9
| | | | | | | irqs can't work (at best, the first one attached wins). It used to be necessary to skip this check because of bogus irqs in the sound drivers, but the sound drivers have been fixed, except possibly the OSS ones.
* Made PEND_INTS default.fsmp1997-08-211-2/+1
| | | | | | | | | | Made NEW_STRATEGY default. Removed misc. old cruft. Centralized simple locks into mp_machdep.c Centralized simple lock macros into param.h More cleanup in the direction of making splxx()/cpl MP-safe.
* Add parentheses because == has higher precedence than &.steve1997-08-131-7/+7
| | | | | PR: i386/4225 Submitted by: Frank MacLachlan <fpm@n2.net>
* Return to using disable/enable_intr() for guarding DMA register access.msmith1997-07-291-7/+10
| | | | | | Mask the read value from the count register in order to return zero correctly after TC, as per intel datasheet : "If it is not autoinitialised, this register will have a count of FFFFH after TC"
* Pedant attack! Use variable names consistent with discourse inmsmith1997-07-281-7/+6
| | | | | | | comments. Remove reduntant extra addition that was unncessary, and unneeded mask (asuming inb works correctly). Submitted by: Stephen McKay <syssgm@dtir.qld.gov.au>
* Use disable_intr() / read/write_eflags() to ensure that interruptmsmith1997-07-281-4/+6
| | | | | | | handlers don't skew the results of isa_dmastatus. The function can be safely called with interrupts disabled. Submitted by: Stephen McKay <syssgm@dtir.qld.gov.au>
* Add isa_dmastatus() for reading the current ISA DMA counter for amsmith1997-07-241-1/+81
| | | | | | given channel. Submitted by: luigi@labinfo.iet.unipi.it (Luigi Rizzo)
* Removed unused #includes.bde1997-07-201-5/+1
|
* Back out my changes with 'conflicts' keyword for IRQs,ache1997-07-091-9/+4
| | | | sounddriver fixed now.
* Modified to use merged/renamed functions:fsmp1997-06-251-5/+5
| | | | | - get_isa_apic_mask() -> isa_apic_mask() - get_isa_apic_irq() && get_eisa_apic_irq() -> isa_apic_pin()
* While deciding to install irq with unneded "conflicts" keyword,ache1997-06-091-3/+4
| | | | additionly check that intr vector is non-NULL
* Add safety check in case "conflicts" keyword specified more times thanache1997-06-081-4/+7
| | | | needed
* Make "conflicts" keyword work againache1997-06-081-4/+5
|
* Move interrupt handling code from isa.c to a new file. This should makedfr1997-06-021-356/+2
| | | | | | | isa.c (slightly) more portable and will make my life developing the really portable version much easier. Reviewed by: peter, fsmp
* Include file updates.. <machine/spl.h> -> <machine/ipl.h>, addpeter1997-05-311-1/+2
| | | | | <machine/ipl.h> to those files that were depending on getting SWI_* implicitly via <machine/cpufunc.h>
OpenPOWER on IntegriCloud