History log of /freebsd-current/sys/isa/isahint.c
Revision Date Author Comments
# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# fe267a55 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 953e1b6c 27-Aug-2009 John Baldwin <jhb@FreeBSD.org>

MFC 196520:
Tweak the way that the ACPI and ISA bus drivers match hint devices to
BIOS-enumerated devices:
- Assume a device is a match if the memory and I/O ports match even if the
IRQ or DRQ is wrong or missing. Some BIOSes don't include an IRQ for
the atrtc device for example.
- Add a hack to better match floppy controller devices. Many BIOSes do not
include the starting port of the floppy controller listed in the hints
(0x3f0) in the resources for the device. So far, however, all the BIOS
variations encountered do include the 'port + 2' resource (0x3f2), so
adjust the matching for "fdc" devices to look for 'port + 2'.

Approved by: re (kib)


# 2fcd493c 24-Aug-2009 John Baldwin <jhb@FreeBSD.org>

Tweak the way that the ACPI and ISA bus drivers match hint devices to
BIOS-enumerated devices:
- Assume a device is a match if the memory and I/O ports match even if the
IRQ or DRQ is wrong or missing. Some BIOSes don't include an IRQ for
the atrtc device for example.
- Add a hack to better match floppy controller devices. Many BIOSes do not
include the starting port of the floppy controller listed in the hints
(0x3f0) in the resources for the device. So far, however, all the BIOS
variations encountered do include the 'port + 2' resource (0x3f2), so
adjust the matching for "fdc" devices to look for 'port + 2'.

Reviewed by: imp
MFC after: 3 days


# 0d484d24 18-Nov-2008 John Baldwin <jhb@FreeBSD.org>

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


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 360de693 08-Jul-2006 Warner Losh <imp@FreeBSD.org>

(apply '(lambda (reformat-region 'style-9-parens)) (read-file isahint.c))

remove redundant parens, per style(9) to reduce that limp, lispy feeling.


# 3c7c9eb5 08-Jul-2006 Warner Losh <imp@FreeBSD.org>

Remove old GENERIC kludge. We no longer need to skip devices named
atkbd. Version 1.162 of GENERIC fixed this problem in April of 1999.
Subsequent to that, the hints data was removed from GENERIC and move
to hints files. All the hints file ever created have atkbd at the
right location. This should have been removed just after RELENG_4 was
branched (and likely around 4.5 in RELENG_4).

MFC After: 3 days


# 2ca94fca 12-Apr-2005 Matthew N. Dodd <mdodd@FreeBSD.org>

Add ISACFGATTR_HINTS flag to allow detection of a device that was created
as a result of the hints mechanism.


# e5979322 14-Oct-2004 Nate Lawson <njl@FreeBSD.org>

Remove local hacks to set flags now that the device probe does this for us.
Tested on every device except sio_pci and the pc98 fd.c. Perhaps something
similar should be done for the "disabled" hints also.

MFC after: 2 weeks


# 8a9bc9c0 02-Jul-2003 John Baldwin <jhb@FreeBSD.org>

- Use the new resource_disabled() helper function to see if devices are
disabled.
- Change the apm driver to match the acpi driver's behavior by checking to
see if the device is disabled in the identify routine instead of in the
probe routine. This way if the device is disabled it is never created.

Note that a few places (ips(4), Alpha SMP) used "disable" instead of
"disabled" for their hint names, and these hints must be changed to
"disabled". If this is a big problem, resource_disabled() can always be
changed to honor both names.


# 8c9bbf48 10-Jun-2003 David E. O'Brien <obrien@FreeBSD.org>

Use __FBSDID().


# 2398f0cd 12-Jun-2001 Peter Wemm <peter@FreeBSD.org>

Hints overhaul:
- Replace some very poorly thought out API hacks that should have been
fixed a long while ago.
- Provide some much more flexible search functions (resource_find_*())
- Use strings for storage instead of an outgrowth of the rather
inconvenient temporary ioconf table from config(). We already had a
fallback to using strings before malloc/vm was running anyway.


# 0197892d 16-Mar-2001 Yoshihiro Takahashi <nyan@FreeBSD.org>

Always call resource_int_value function for getting portsize and msize.
It was not set resource size (portsize/msize) if resource address was set.

This is MFC candidate.


# efed28b0 15-Oct-2000 Peter Wemm <peter@FreeBSD.org>

Repeat after me: I will test *before* commit, not after.... *blush*


# ada54f9e 15-Oct-2000 Peter Wemm <peter@FreeBSD.org>

Untangle some resource matching loops that were getting on my nerves
and seemed to be getting cut/pasted to places they shouldn't be.


# 0e7e521c 22-Nov-1999 Andrew Gallatin <gallatin@FreeBSD.org>

Allow a DMA channel of 0. This gets the on-board mss audio device working
on Digital AlphaStations 200 and 500 machines (and probably others as well).

Submitted by: dfr


# 25afb89b 12-Oct-1999 Doug Rabson <dfr@FreeBSD.org>

* 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.


# 062acdb7 07-Sep-1999 Doug Rabson <dfr@FreeBSD.org>

Change isa_get/set_flags() to device_get/set_flags().


# c3aac50f 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# 828cb040 24-Jul-1999 Kazutaka YOKOTA <yokota@FreeBSD.org>

Do not print resource values which are not set.

Reviewed by: dfr


# bea6af4d 28-May-1999 Doug Rabson <dfr@FreeBSD.org>

* 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.


# a3be63b3 22-May-1999 Doug Rabson <dfr@FreeBSD.org>

* 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.


# 6c2e3dde 14-May-1999 Doug Rabson <dfr@FreeBSD.org>

* Define a new static method DEVICE_IDENTIFY which is called to add device
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.