summaryrefslogtreecommitdiffstats
path: root/sys/alpha/isa
Commit message (Collapse)AuthorAgeFilesLines
* First pass at removing Alpha kernel support.jhb2006-05-114-1098/+0
|
* Fix previous commit: the resource returned by rman_reserve_resource()marcel2006-05-021-10/+8
| | | | | can be NULL. Make sure to only call rman_set_rid() when the resource is not NULL. While here, improve readability and style.
* Set the rid for any resources that are allocated at the level whereimp2006-04-201-0/+1
| | | | they first emerge from the rman_* system.
* Reorganize the interrupt handling code a bit to make a few things cleanerjhb2005-10-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and increase flexibility to allow various different approaches to be tried in the future. - Split struct ithd up into two pieces. struct intr_event holds the list of interrupt handlers associated with interrupt sources. struct intr_thread contains the data relative to an interrupt thread. Currently we still provide a 1:1 relationship of events to threads with the exception that events only have an associated thread if there is at least one threaded interrupt handler attached to the event. This means that on x86 we no longer have 4 bazillion interrupt threads with no handlers. It also means that interrupt events with only INTR_FAST handlers no longer have an associated thread either. - Renamed struct intrhand to struct intr_handler to follow the struct intr_foo naming convention. This did require renaming the powerpc MD struct intr_handler to struct ppc_intr_handler. - INTR_FAST no longer implies INTR_EXCL on all architectures except for powerpc. This means that multiple INTR_FAST handlers can attach to the same interrupt and that INTR_FAST and non-INTR_FAST handlers can attach to the same interrupt. Sharing INTR_FAST handlers may not always be desirable, but having sio(4) and uhci(4) fight over an IRQ isn't fun either. Drivers can always still use INTR_EXCL to ask for an interrupt exclusively. The way this sharing works is that when an interrupt comes in, all the INTR_FAST handlers are executed first, and if any threaded handlers exist, the interrupt thread is scheduled afterwards. This type of layout also makes it possible to investigate using interrupt filters ala OS X where the filter determines whether or not its companion threaded handler should run. - Aside from the INTR_FAST changes above, the impact on MD interrupt code is mostly just 's/ithread/intr_event/'. - A new MI ddb command 'show intrs' walks the list of interrupt events dumping their state. It also has a '/v' verbose switch which dumps info about all of the handlers attached to each event. - We currently don't destroy an interrupt thread when the last threaded handler is removed because it would suck for things like ppbus(8)'s braindead behavior. The code is present, though, it is just under #if 0 for now. - Move the code to actually execute the threaded handlers for an interrrupt event into a separate function so that ithread_loop() becomes more readable. Previously this code was all in the middle of ithread_loop() and indented halfway across the screen. - Made struct intr_thread private to kern_intr.c and replaced td_ithd with a thread private flag TDP_ITHREAD. - In statclock, check curthread against idlethread directly rather than curthread's proc against idlethread's proc. (Not really related to intr changes) Tested on: alpha, amd64, i386, sparc64 Tested on: arm, ia64 (older version of patch by cognet and marcel)
* This file never needed to see what is in the internal struct resource,phk2005-09-251-9/+7
| | | | all it needed was a call to rman_get_start().
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-291-1/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* - Move bus dependent defines to {isa,cbus}_dmareg.h.nyan2005-05-141-1/+1
| | | | | | - Use isa/isareg.h rather than <arch>/isa/isa.h. Tested on: i386, pc98
* Since we are quite unlikely to ever face another platform whichphk2005-02-061-18/+13
| | | | | | | | | uses the i8237 without trying to emulate the PC architecture move the register definitions for the i8237 chip into the central include file for the chip, except for the PC98 case which is magic. Add new isa_dmatc() function which tells us as cheaply as possible if the terminal count has been reached for a given channel.
* Begin all license/copyright comments with /*- or #-imp2005-01-051-1/+1
|
* Add new a function isa_dma_init() which returns an errno when it failsphk2004-09-151-10/+8
| | | | | | | | | and which takes a M_WAITOK/M_NOWAIT flag argument. Add compatibility isa_dmainit() macro which whines loudly if isa_dma_init() fails. Problem uncovered by: tegge
* Catch up with __RMAN_RESOURCE_VISIBLE enough to get GENERIC to buildgallatin2004-07-011-0/+1
|
* Remove the advertsing clause, per the Regent's letter dated July 22, 1999.imp2004-04-051-4/+0
| | | | Approved by: core
* sync comment with i386's isa.c.. This removes a comment that is YEARSjmg2004-03-171-3/+1
| | | | old...
* Widen the enable/disable helper function's argument in line with thepeter2003-11-171-3/+4
| | | | ithread_create() changes etc. This should be mostly a NOP.
* Mega busdma API commit.scottl2003-07-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs
* Use __FBSDID().obrien2003-06-103-5/+9
|
* Style(9) a comment added in previous commit.gallatin2003-04-111-2/+4
| | | | Pointed out by: bde
* Enable loadable modules to be unloaded on alphas with shared isagallatin2003-04-101-9/+21
| | | | | interrupts by only disabling the interrupt in hardware if the handler being removed is the only handler.
* Tidy up some loose ends.peter2002-04-291-1/+1
| | | | | | | | | | | | i386/ia64/alpha - catch up to sparc64/ppc: - replace pmap_kernel() with refs to kernel_pmap - change kernel_pmap pointer to (&kernel_pmap_store) (this is a speedup since ld can set these at compile/link time) all platforms (as suggested by jake): - gc unused pmap_reference - gc unused pmap_destroy - gc unused struct pmap.pm_count (we never used pm_count - we track address space sharing at the vmspace)
* Don't grab the ICU lock while reading the current pending interrupts andjhb2002-02-081-4/+0
| | | | | | current masked interrupts from the AT PIC. Requested by: bde
* Use the new resource_list_print_type() function.tmm2001-12-211-1/+1
| | | | | Pass the bus device to isa_init() (this is needed for the sparc64 version).
* Introduce a standard name for the lock protecting an interrupt controllerjhb2001-12-201-6/+23
| | | | | | | | and it's associated state variables: icu_lock with the name "icu". This renames the imen_mtx for x86 SMP, but also uses the lock to protect access to the 8259 PIC on x86 UP. This also adds an appropriate lock to the various Alpha chipsets which fixes problems with Alpha SMP machines dropping interrupts with an SMP kernel.
* Sanity guard- return ENODEV if we don't have a good IRQ resource.mjacob2001-07-111-0/+3
|
* Repo copy i8237.h to dev/ic so we can get rid of some of the final vestigesimp2001-06-301-1/+1
| | | | of includes of i386 files from non-i386 ports.
* Use the MI ithread helper functions in the alpha hardware interrupt code.jhb2001-02-091-2/+1
|
* Add a prototype for isa_irq_mask() to quiet a warning.jhb2001-01-241-0/+1
|
* Alter isa interrupt behaviour on alpha. Rather than send a non-specificgallatin2000-12-011-4/+38
| | | | | | | | | | | | | EOI after the ithread runs, send the EOI when we get the interrupt and disable the source. After the ithread is run, the source is renabled. Also, add isa_handle_fast_intr() which handles fast interrupts by sending an EOI after the handler is run. This fixes the chronic missing interrupt problems under heavy NFS load on my UP1000 and should result in greater stability for alphas which route all irqs through an isa pic. Discussed with: jhb, bde (sending non-specific EOIs early was bde's idea)
* Pass in the new-bus flags to alpha_setup_intr().jhb2000-11-011-1/+1
|
* - Heavyweight interrupt threads on the alpha for device I/O interrupts.jhb2000-10-051-3/+8
| | | | | | | | | | | - Make softinterrupts (SWI's) almost completely MI, and divorce them completely from the x86 hardware interrupt code. - The ihandlers array is now gone. Instead, there is a MI shandlers array that just contains SWI handlers. - Most of the former machine/ipl.h files have moved to a new sys/ipl.h. - Stub out all the spl*() functions on all architectures. Submitted by: dfr
* remove breakage that snuck in with my last commitgallatin2000-06-291-1/+0
| | | | pointed out by: peter
* Support bounce buffers for ISA DMA on the alpha. This is required for thegallatin2000-06-191-3/+28
| | | | | | | irongate chipset (used in the UP1000) which does not support scatter/gather DMA. We'll still use scatter gather if the core logic chipset supports it. Reviewed by: dfr
* Allow platform specific isa interrupt setup & teardown routines ingallatin2000-05-281-1/+11
| | | | preparation for sable/lynx support
* Use bus_space_handle_t instead of bus_space_tag_t to hold the resultdfr2000-05-271-2/+2
| | | | from rman_get_bushandle().
* Handle PCI devices that actually use an ISA IRQ for the cia and tsunamijhb2000-05-102-0/+9
| | | | | | | | chipsets. An example of this is the USB controller on these chipsets. With this, I can now use USB devices on the test Alpha I am borrowing at the moment. Reviewed by: dfr, obrien
* Stop isadma from abusing the B_READ, B_RAW and B_WRITE flags.phk2000-03-131-10/+9
| | | | | Define ISADMA_{READ,WRITE,RAW} macros with the same numeric values as the B_{READ,WRITE,RAW} and use them instead throughout.
* * Add struct resource_list* argument to resource_list_alloc anddfr1999-10-121-14/+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.
* $Id$ -> $FreeBSD$peter1999-08-284-4/+4
|
* * Implement ISA dma (only for CIA now but more chipsets to follow).dfr1999-06-052-9/+514
| | | | * Port the fd driver to alpha.
* Use resource allocation apis to get ports.dfr1999-05-301-9/+34
|
* * Factor out the common code between the isa bus drivers for i386 and alpha.dfr1999-05-221-421/+73
| | | | | | | * 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.
* Calibrate the processor cycle counter instead of believing what thedfr1999-05-181-1/+2
| | | | firmware says.
* Another minor fix from i386 to remember when the port is set to -1.dfr1999-05-181-2/+2
|
* Update isa_print_child to match i386.dfr1999-05-181-10/+10
| | | | Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
* * Define a new static method DEVICE_IDENTIFY which is called to add devicedfr1999-05-141-139/+63
| | | | | | | | | | 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-083-7/+6
| | | | to the BUS_SETUP_INTR call.
* Stage 1 of a cleanup of the i386 interrupt registration mechanism.peter1999-04-211-3/+3
| | | | | | | Interrupts under the new scheme are managed by the i386 nexus with the awareness of the resource manager. There is further room for optimizing the interfaces still. All the users of register_intr()/intr_create() should be gone, with the exception of pcic and i386/isa/clock.c.
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-162-30/+98
| | | | | | | | | | | | | | | | | | 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
* Update the alpha port to use the new syscons.dfr1999-01-231-4/+21
| | | | Submitted by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> (partly)
* Add support for 'vmstat -i'.dfr1998-11-281-2/+4
| | | | | Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp> Obtained from: NetBSD
* Fix things so that pci interrupts can be registered correctly on apecsdfr1998-11-181-6/+15
| | | | | | and lca machines (which route PCI interrupts through the ISA PIC). Reviewed by: dima
OpenPOWER on IntegriCloud