aboutsummaryrefslogtreecommitdiff
path: root/sys/isa/isa_common.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix style bugs:Alfred Perlstein2002-02-241-2/+3
| | | | | | | | | | Missing `const' qualifier. Initialization in declaration. Submitted by: mike Notes: svn path=/head/; revision=91206
* Give a little more information as to why pnp configuration of a deviceAlfred Perlstein2002-02-241-1/+7
| | | | | | | | | may have failed. Submitted by: Terry Lambert <tlambert2@mindspring.com> Notes: svn path=/head/; revision=91202
* Use the new resource_list_print_type() function.Thomas Moestl2001-12-211-40/+5
| | | | | | | | Pass the bus device to isa_init() (this is needed for the sparc64 version). Notes: svn path=/head/; revision=88376
* Rework the ISA PnP driver pnp and the PnP resource parser to fixKazutaka YOKOTA2001-09-051-2/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | the following bugs. - When constructing a resource configuration, respect the order in which resource descriptors are read, in order to establish the correct mapping between the descriptors and configuration registers. "Plug and Play ISA Specification, Version 1.0a", Sec 4.6.1, May 5, 1994. "Clarifications to the Plug and Play ISA Specification, Version 1.0a", Sec 6.2.1, Dec. 10, 1994. - Do not ignore null (empty) descriptors; they are valid descriptors acting as filler. "Clarifications to the Plug and Play ISA Specification, Version 1.0a", Sec 6.2.1. - Correctly set up logical device configuration registers for null resources. "Clarifications to the Plug and Play ISA Specification, Version 1.0a" - Handle null resources properly in the resource allocator for the ISA bus. Notes: svn path=/head/; revision=83051
* Add a new field, id_config_attr to the struct isa_device.Kazutaka YOKOTA2001-09-031-0/+8
| | | | | | | | It will be later used to store some flags to control PnP device configurations. Notes: svn path=/head/; revision=82863
* Safety-check against empty PnP ID lists.Mike Smith2001-08-301-1/+1
| | | | Notes: svn path=/head/; revision=82553
* DO NOT ALLOCATE 2+K OBJECTS ON THE KERNEL STACK!!!!Julian Elischer2001-08-101-12/+25
| | | | | | | found by: Getting my u-area overwritten Notes: svn path=/head/; revision=81401
* It's possible for an ISA bus to be hung off an EISA bridge, so we need toMike Smith2000-12-121-0/+1
| | | | | | | reflect that here. Notes: svn path=/head/; revision=69942
* Convert more malloc+bzero to malloc+M_ZERO.David Malone2000-12-081-2/+1
| | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Notes: svn path=/head/; revision=69781
* Staticize some malloc M_ instances.Poul-Henning Kamp2000-12-081-1/+1
| | | | Notes: svn path=/head/; revision=69774
* Reduce code duplication by using the GET_RESOURCE_LIST bus method and relatedMatthew N. Dodd2000-11-281-26/+12
| | | | | | | | | | | generic resource_list management functions. I'll deal with the EISA bits later. Not objected to by: new-bus Notes: svn path=/head/; revision=69295
* Don't assume that any ISA device that fails to probe is a PnP device,John Baldwin2000-07-121-9/+11
| | | | | | | | | | | | | | | | instead, use the bus_print_child_* functions to display the error message. Also, since this is more of a warning than an error, hide it behind bootverbose. Similarly, if isa_assign_resources() fails to allocate resources to a device, use bus_print_child_header() instead of device_printf(), and display the resources that could not be allocated if bootverbose is true. Approved by: msmith Help from: mdodd Notes: svn path=/head/; revision=62987
* Replace the unknown driver with a nomatch method in the isa driver.Doug Rabson2000-06-251-71/+70
| | | | | | | | This allows ISA PnP drivers to be dynamically loaded after the kernel has booted. Notes: svn path=/head/; revision=62059
* When allocating resources in the following cases:Mike Smith2000-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 Notes: svn path=/head/; revision=57132
* Don't mark unallocated resources as active; the goal is to reserve them,Mike Smith2000-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. Notes: svn path=/head/; revision=56214
* Remove the 'ivars' arguement to device_add_child() andMatthew N. Dodd1999-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 Notes: svn path=/head/; revision=54073
* Allow NULL for startp and/or countp in bus_get_resource() so that you canPeter Wemm1999-11-201-2/+4
| | | | | | | get one of the two without having to use a dummy variable. Notes: svn path=/head/; revision=53461
* Reorganise the code so that I can add custom identify drivers dynamicallyDoug Rabson1999-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. Notes: svn path=/head/; revision=53094
* * Add struct resource_list* argument to resource_list_alloc andDoug Rabson1999-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. Notes: svn path=/head/; revision=52174
* Disable pnp devices before running heuristic probes. This allows us toDoug Rabson1999-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. Notes: svn path=/head/; revision=51905
* Change isa_get/set_flags() to device_get/set_flags().Doug Rabson1999-09-071-12/+3
| | | | Notes: svn path=/head/; revision=51052
* Only set the description if there is one in the matching isa_pnp_id.Doug Rabson1999-09-041-1/+2
| | | | Notes: svn path=/head/; revision=50910
* This represents essentially a complete rewrite of the ISA PnP code. TheDoug Rabson1999-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. Notes: svn path=/head/; revision=50769
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Fix a typo.Matthew N. Dodd1999-07-291-5/+5
| | | | | | | | | Back out a few lines that I haven't dealt with properly yet. Snickered at by: Mike Smith Notes: svn path=/head/; revision=49198
* Alter the behavior of sys/kern/subr_bus.c:device_print_child()Matthew N. Dodd1999-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 Notes: svn path=/head/; revision=49195
* * Add ivars for ISA pnp.Doug Rabson1999-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. Notes: svn path=/head/; revision=47613
* * Change device_add_child_after() to device_add_child_ordered() which isDoug Rabson1999-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. Notes: svn path=/head/; revision=47578
* * Factor out the common code between the isa bus drivers for i386 and alpha.Doug Rabson1999-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. Notes: svn path=/head/; revision=47398