#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
297199 |
|
22-Mar-2016 |
jhibbits |
Fix the resource_list_print_type() calls to use uintmax_t.
Missed a bunch from r297000.
|
#
296336 |
|
03-Mar-2016 |
jhibbits |
Replace all resource occurrences of '0UL/~0UL' with '0/~0'.
Summary: The idea behind this is '~0ul' is well-defined, and casting to uintmax_t, on a 32-bit platform, will leave the upper 32 bits as 0. The maximum range of a resource is 0xFFF.... (all bits of the full type set). By dropping the 'ul' suffix, C type promotion rules apply, and the sign extension of ~0 on 32 bit platforms gets it to a type-independent 'unsigned max'.
Reviewed By: cem Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5255
|
#
295790 |
|
19-Feb-2016 |
jhibbits |
Replace several bus_alloc_resource() calls using default arguments with bus_alloc_resource_any()
Since these calls only use default arguments, bus_alloc_resource_any() is the right call.
Differential Revision: https://reviews.freebsd.org/D5306
|
#
294883 |
|
27-Jan-2016 |
jhibbits |
Convert rman to use rman_res_t instead of u_long
Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long.
This is step one in migrating rman to use uintmax_t for resources instead of u_long.
Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API.
This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI.
Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075
|
#
221526 |
|
06-May-2011 |
jhb |
Retire isa_setup_intr() and isa_teardown_intr() and use the generic bus versions instead. They were never needed as bus_generic_intr() and bus_teardown_intr() had been changed to pass the original child device up in 42734, but the ISA bus was not converted to new-bus until 45720.
|
#
212413 |
|
10-Sep-2010 |
avg |
bus_add_child: change type of order parameter to u_int
This reflects actual type used to store and compare child device orders. Change is mostly done via a Coccinelle (soon to be devel/coccinelle) semantic patch. Verified by LINT+modules kernel builds.
Followup to: r212213 MFC after: 10 days
|
#
185059 |
|
18-Nov-2008 |
jhb |
Allow device hints to wire the unit numbers of devices. - An "at" hint now reserves a device name. - A new BUS_HINT_DEVICE_UNIT method is added to the bus interface. When determining the unit number of a device, this method is invoked to let the bus driver specify the unit of a device given a specific devclass. This is the only way a device can be given a name reserved via an "at" hint. - Implement BUS_HINT_DEVICE_UNIT() for the acpi(4) and isa(4) bus drivers. Both of these busses implement this by comparing the resources for a given hint device with the resources enumerated by ACPI/PnPBIOS and wire a unit if the hint resources are a subset of the "real" resources. - Use bus_hinted_children() for adding hinted devices on isa(4) busses now instead of doing it by hand. - Remove the unit kludging from sio(4) as it is no longer necessary.
Prodding from: peter, imp OK'd by: marcel MFC after: 1 month
|
#
184564 |
|
02-Nov-2008 |
imp |
MFp4:
Make the ISA bus keep track of more PNP details. Plus a minor style fix while I'm here. More could be done here, but except for some SBCs that don't have ACPI, there's limited value to anybody in doing so.
|
#
182103 |
|
24-Aug-2008 |
imp |
MFp4 (my newcard tree):
ISACFGATTR_MULTI is unused. Retire it, and a function that has no side effects used to compute it.
|
#
168816 |
|
17-Apr-2007 |
jhb |
When trying to allocate a PnP BIOS memory resource, the code loops trying to move up the start address until the allocation succeeds. If the alignment of the resource was 0, then the code would keep trying the same request in an infinite loop and hang. Force the request to always move start up by at least 1 byte each time through the loop.
|
#
159552 |
|
12-Jun-2006 |
marius |
Make the ISAPNP code optional and only enable it on i386 and pc98 (used for CBUS-PNP cards there) by default, as there are no amd64 and sparc64 machines with ISA slots and which therefore could make use of this code known to exist. For sparc64 this additionally allows to get rid of the compat shims for in{b,w,l}()/out{b,w,l}() etc and the associated hacks.
OK'ed by: imp, peter
|
#
158471 |
|
12-May-2006 |
jhb |
Remove various bits of conditional Alpha code and fixup a few comments.
|
#
148611 |
|
01-Aug-2005 |
imp |
Add pnp and location info for the ISA bus. The pnp info is the primary vendor id for this device. The location is empty because ISA doesn't give one a way to generally locate a card. PNP BIOS entries do provide a way to locate cards, as do isa pnp cards. These locations will be added as soon as the code to remember them is written.
|
#
143785 |
|
18-Mar-2005 |
imp |
Use STAILQ in preference to SLIST for the resources. Insert new resources last in the list rather than first.
This makes the resouces print in the 4.x order rather than the 5.x order (eg fdc0 at 0x3f0-0x3f5,0x3f7 is 4.x, but 0x3f7,0x3f0-0x3f5 is 5.x). This also means that the pci code will once again print the resources in BAR ascending order.
|
#
140647 |
|
23-Jan-2005 |
imp |
Protect against wrapping. This appaers to fix some hangs that people have seen in the isa pnp case where a resource buts up against 0xffffffff. This would only impact when the board was booted without ACPI.
Submitted by: Ed Maste (freebsd-stable <20050103145720.GA90754@sandvine.com>) MFC After: 5 days
|
#
139360 |
|
27-Dec-2004 |
imp |
Formatting nits
|
#
139279 |
|
24-Dec-2004 |
imp |
Get rid of #ifdef for legacy system. Move that into the MD code. Export minimal symbols to allow this to happen.
|
#
139273 |
|
24-Dec-2004 |
imp |
A few style(9) changes before more extensive changes: o u_intXX_t -> uintXX_t o use 8 character tabs o proper wrapping o return (value);
|
#
127135 |
|
17-Mar-2004 |
njl |
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
|
#
117337 |
|
08-Jul-2003 |
jhb |
- Make the isab devclass global to allow for multiple ISA bridge drivers. - Factor out code common to all ISA bridge drivers attach methods into a isab_attach() function. - Rename the PCI-ISA bridge driver's attach function to pci_isab_attach() and have it call isab_attach().
|
#
116181 |
|
10-Jun-2003 |
obrien |
Use __FBSDID().
|
#
114335 |
|
30-Apr-2003 |
peter |
Create a 'legacy' node for AMD64 as well as i386. While we'll never have to use it since all AMD64 machines are supposed to have acpi etc, I'm using it during development so I can avoid the acpi code for now. Yes, this is cheating.
|
#
113498 |
|
15-Apr-2003 |
mdodd |
Add a module version number.
|
#
105139 |
|
14-Oct-2002 |
jhb |
- Use __BUS_ACCESSOR() to define the ISA ivar accessor functions instead of homerolling our own version. - Rename the enum for memsize from ISA_IVAR_MSIZE to ISA_IVAR_MEMSIZE since using 'MSIZE' in the macro invocation of ISA_ACCESSOR() conflicts with the 'MSIZE' kernel option. The accessor function is still isa_get_msize().
|
#
104179 |
|
30-Sep-2002 |
phk |
Don't leak memory in case device_add_child_ordered() returns NULL.
Found by: FlexeLint
|
#
104015 |
|
26-Sep-2002 |
jhb |
Argh, isa(4), eisa(4) and mca(4) now attach to legacy(4) instead of nexus(4) in the case of machines w/o equivalent bridges on a PCI bus.
Reported by: winter Pointy hat to: jhb
|
#
91206 |
|
24-Feb-2002 |
alfred |
Fix style bugs: Missing `const' qualifier. Initialization in declaration.
Submitted by: mike
|
#
91202 |
|
24-Feb-2002 |
alfred |
Give a little more information as to why pnp configuration of a device may have failed.
Submitted by: Terry Lambert <tlambert2@mindspring.com>
|
#
88376 |
|
21-Dec-2001 |
tmm |
Use the new resource_list_print_type() function. Pass the bus device to isa_init() (this is needed for the sparc64 version).
|
#
83051 |
|
05-Sep-2001 |
yokota |
Rework the ISA PnP driver pnp and the PnP resource parser to fix 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.
|
#
82863 |
|
03-Sep-2001 |
yokota |
Add a new field, id_config_attr to the struct isa_device. It will be later used to store some flags to control PnP device configurations.
|
#
82553 |
|
30-Aug-2001 |
msmith |
Safety-check against empty PnP ID lists.
|
#
81401 |
|
10-Aug-2001 |
julian |
DO NOT ALLOCATE 2+K OBJECTS ON THE KERNEL STACK!!!! found by: Getting my u-area overwritten
|
#
69942 |
|
12-Dec-2000 |
msmith |
It's possible for an ISA bus to be hung off an EISA bridge, so we need to reflect that here.
|
#
69781 |
|
08-Dec-2000 |
dwmalone |
Convert more malloc+bzero to malloc+M_ZERO.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
|
#
69774 |
|
08-Dec-2000 |
phk |
Staticize some malloc M_ instances.
|
#
69295 |
|
28-Nov-2000 |
mdodd |
Reduce code duplication by using the GET_RESOURCE_LIST bus method and related generic resource_list management functions.
I'll deal with the EISA bits later.
Not objected to by: new-bus
|
#
62987 |
|
11-Jul-2000 |
jhb |
Don't assume that any ISA device that fails to probe is a PnP device, 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
|
#
62059 |
|
25-Jun-2000 |
dfr |
Replace the unknown driver with a nomatch method in the isa driver. This allows ISA PnP drivers to be dynamically loaded after the kernel has booted.
|
#
57132 |
|
11-Feb-2000 |
msmith |
When allocating resources in the following cases:
- 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
|
#
56214 |
|
18-Jan-2000 |
msmith |
Don't mark unallocated resources as active; the goal is to reserve them, 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.
|
#
54073 |
|
03-Dec-1999 |
mdodd |
Remove the 'ivars' arguement to device_add_child() and 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
|
#
53461 |
|
20-Nov-1999 |
peter |
Allow NULL for startp and/or countp in bus_get_resource() so that you can get one of the two without having to use a dummy variable.
|
#
53094 |
|
11-Nov-1999 |
dfr |
Reorganise the code so that I can add custom identify drivers dynamically 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.
|
#
52174 |
|
12-Oct-1999 |
dfr |
* Add struct resource_list* argument to resource_list_alloc and 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.
|
#
51905 |
|
03-Oct-1999 |
dfr |
Disable pnp devices before running heuristic probes. This allows us to 'hide' those devices from those probes so that they don't get probed and then re-probed later when the pnp probe is run.
|
#
51052 |
|
07-Sep-1999 |
dfr |
Change isa_get/set_flags() to device_get/set_flags().
|
#
50910 |
|
04-Sep-1999 |
dfr |
Only set the description if there is one in the matching isa_pnp_id.
|
#
50769 |
|
01-Sep-1999 |
dfr |
This represents essentially a complete rewrite of the ISA PnP code. The 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.
|
#
50477 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
49198 |
|
28-Jul-1999 |
mdodd |
Fix a typo. Back out a few lines that I haven't dealt with properly yet.
Snickered at by: Mike Smith
|
#
49195 |
|
28-Jul-1999 |
mdodd |
Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- 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
|
#
47613 |
|
30-May-1999 |
dfr |
* Add ivars for ISA pnp. * Move isa_dma* declarations to isavar.h. * Add a method ISA_DELETE_RESOURCE() to the ISA interface. * Tidy up include protection defines.
|
#
47578 |
|
28-May-1999 |
dfr |
* Change device_add_child_after() to device_add_child_ordered() which is 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.
|
#
47398 |
|
22-May-1999 |
dfr |
* Factor out the common code between the isa bus drivers for i386 and alpha. * 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.
|