summaryrefslogtreecommitdiffstats
path: root/sys/isa/isa_common.c
Commit message (Collapse)AuthorAgeFilesLines
* When allocating resources in the following cases:msmith2000-02-111-5/+5
| | | | | | | | | | | | | | | | | | | | - trying for a fit for a PnP configuration from a device - soaking up resources from a configuration that were not allocated by the driver do not attempt to activate them. Only a device driver that is aware of the nature of the resource and its suitability can be certain that activating a resource, particularly a memory resource, is a safe thing to do. This was prompted by the discovery that many systems report all physical memory through a PNP0c02 device; activating this resource maps all physical memory into the kernel's virtual space, either blowing out the kernel pagetable or in the worst case causing a panic in pmap_mapdev() if the system has too much physical memory. Authorised by: jkh Reviewed by: dfr
* Don't mark unallocated resources as active; the goal is to reserve them,msmith2000-01-181-1/+1
| | | | | | and there may be a good reason for them being unallocated (eg. they're nonsensical or not useful). The goal here is simply to reserve them against accidental use by other code.
* Remove the 'ivars' arguement to device_add_child() andmdodd1999-12-031-1/+5
| | | | | | | | | | | | | | | | device_add_child_ordered(). 'ivars' may now be set using the device_set_ivars() function. This makes it easier for us to change how arbitrary data structures are associated with a device_t. Eventually we won't be modifying device_t to add additional pointers for ivars, softc data etc. Despite my best efforts I've probably forgotten something so let me know if this breaks anything. I've been running with this change for months and its been quite involved actually isolating all the changes from the rest of the local changes in my tree. Reviewed by: peter, dfr
* Allow NULL for startp and/or countp in bus_get_resource() so that you canpeter1999-11-201-2/+4
| | | | get one of the two without having to use a dummy variable.
* Reorganise the code so that I can add custom identify drivers dynamicallydfr1999-11-111-1/+71
| | | | | | | | during autoconfig to support strange hardware (such as the Yamaha DS-1) which implements 'legacy' ISA devices as well as a PCI device. This will allow the PCI driver for the YMF724 to add the legacy devices to the ISA bus and will allow the PnP system to automatically allocate the resources for those devices.
* * Add struct resource_list* argument to resource_list_alloc anddfr1999-10-121-24/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Disable pnp devices before running heuristic probes. This allows us todfr1999-10-031-2/+16
| | | | | 'hide' those devices from those probes so that they don't get probed and then re-probed later when the pnp probe is run.
* Change isa_get/set_flags() to device_get/set_flags().dfr1999-09-071-12/+3
|
* Only set the description if there is one in the matching isa_pnp_id.dfr1999-09-041-1/+2
|
* This represents essentially a complete rewrite of the ISA PnP code. Thedfr1999-09-011-19/+535
| | | | | | | | new system is integrated with the ISA bus code more cleanly and allows the future addition of more enumerators such as PnPBIOS and ACPI. This commit also enables the new pcm driver since it is somewhat tied to the new PnP code.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix a typo.mdodd1999-07-291-5/+5
| | | | | | Back out a few lines that I haven't dealt with properly yet. Snickered at by: Mike Smith
* Alter the behavior of sys/kern/subr_bus.c:device_print_child()mdodd1999-07-291-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - device_print_child() either lets the BUS_PRINT_CHILD method produce the entire device announcement message or it prints "foo0: not found\n" Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on the previous behavior of device_print_child() (printing the "foo0: <FooDevice 1.1>" bit of the announce message.) Provide bus_print_child_header() and bus_print_child_footer() to actually print the output for bus_generic_print_child(). These functions should be used whenever possible (unless you can just use bus_generic_print_child()) The BUS_PRINT_CHILD method now returns int instead of void. Modify everything else that defines or uses a BUS_PRINT_CHILD method to comply with the above changes. - Devices are 'on' a bus, not 'at' it. - If a custom BUS_PRINT_CHILD method does the same thing as bus_generic_print_child(), use bus_generic_print_child() - Use device_get_nameunit() instead of both device_get_name() and device_get_unit() - All BUS_PRINT_CHILD methods return the number of characters output. Reviewed by: dfr, peter
* * Add ivars for ISA pnp.dfr1999-05-301-2/+49
| | | | | | * Move isa_dma* declarations to isavar.h. * Add a method ISA_DELETE_RESOURCE() to the ISA interface. * Tidy up include protection defines.
* * Change device_add_child_after() to device_add_child_ordered() which isdfr1999-05-281-6/+3
| | | | | | | easier to use and more flexible. * Change BUS_ADD_CHILD to take an order argument instead of a place. * Define a partial ordering for isa devices so that sensitive devices are probed before non-sensitive ones.
* * Factor out the common code between the isa bus drivers for i386 and alpha.dfr1999-05-221-0/+395
* 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.
OpenPOWER on IntegriCloud