| History log of /src/sys/arch/prep/pnpbus/pnpbus.c |
| Revision | | Date | Author | Comments |
| 1.15 |
| 07-Aug-2021 |
thorpej | Merge thorpej-cfargs2.
|
| 1.14 |
| 24-Apr-2021 |
thorpej | branches: 1.14.8; Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments.
Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.)
Remove unnecessary or redundant interface attributes where they're not needed.
There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)
...and a sentinel value CFARG_EOL.
Add some extra sanity checking to ensure that interface attributes aren't ambiguous.
Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
|
| 1.13 |
| 21-Nov-2020 |
thorpej | branches: 1.13.2; malloc(9) -> kmem(9)
|
| 1.12 |
| 10-Nov-2019 |
chs | branches: 1.12.8; in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT and remove code to handle failures that can no longer happen.
|
| 1.11 |
| 01-Jul-2011 |
dyoung | branches: 1.11.54; #include <sys/bus.h> instead of <machine/bus.h>.
|
| 1.10 |
| 18-Jun-2011 |
matt | struct device * -> device_t struct cfdata * -> cfdata_t use device accessors, use device_private. some softc/device_t splits (macppc needs a bunch more) aprint*_dev used considerably more
|
| 1.9 |
| 28-Apr-2008 |
martin | branches: 1.9.32; Remove clause 3 and 4 from TNF licenses
|
| 1.8 |
| 28-Apr-2008 |
garbled | Add floppy support to prep (the croud goes wild)
Add an additional argument to pnpbus_intr_establish to allow overriding of the pnp interrupt type, because some devices lie. Change how the pnpbus match routine works, to avoid attaching it when we are probing for cpu's. Fix a few stray printf's in the autoconf output.
|
| 1.7 |
| 17-Oct-2007 |
garbled | branches: 1.7.16; 1.7.18; 1.7.20; Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA cpu based PPC ports that focused on sharing as much code as possible between the various ports to eliminate near-identical copies of files in every tree. Additionally there is a new PIC system that unifies the interface to interrupt code for all different OEA ppc arches. The work for this branch was done by a variety of people, too long to list here.
TODO: bebox still needs work to complete the transition to -renovation. ofppc still needs a bunch of work, which I will be looking at. ev64260 still needs to be renovated amigappc was not attempted.
NOTES: pmppc was removed as an arch, and moved to a evbppc target.
|
| 1.6 |
| 27-Oct-2006 |
garbled | branches: 1.6.8; 1.6.16; 1.6.26; 1.6.28; 1.6.30; 1.6.32; A few changes so pnpbus devices can do isadma. Note that isadma still does not seem to work properly on prep.
|
| 1.5 |
| 23-Jun-2006 |
garbled | branches: 1.5.4; 1.5.6; 1.5.8; 1) Modify pnpbus attachment code to properly decode pnp memory range packets. 2) Modify pnpbus attachment code to record the chipid of the device if it has one. 3) Change the clock probes to use the chipid, rather than relying on potentially untrustworthy subtype and interface. 4) Add decoding of memory ranges to the RESIDUAL_DUMP code. 5) Add a we@pnpbus device to allow netbooting and root device detection from an IBM we ethernet. (it will only work if your firmware detects it) 6) Because I moved the pnpbus probe to occur prior to pci and isa, it screwed up the root device detection and firmware path building code. Completely rewrite the fw-path detection code to deal with this.
|
| 1.4 |
| 15-Jun-2006 |
garbled | branches: 1.4.2; A bit of clock rototill. It's safer to detect things known by the residual with the pnpbus probes, than it is to do it with raw isa probes, so I've replaced the isa mkclock and mcclock code with a pnpbus attachment.
While writing the mkclock code, I realized that on motorola prep machines the mkclock uses the same port range as the nvram part. (it's actually the same chip/part). This was causing the nvram not to work on those machines. Now the nvram code will recognize this, and wire up the mkclock as well. The mkclock probe is just a stub probe used to pre-detect the fact that this is one of those machines.
|
| 1.3 |
| 26-Apr-2006 |
garbled | branches: 1.3.2; 1.3.4; Support fixes for the Motorola Powerstack E1. 1) The E1 seems to have the int. siop wired to irq 14-level and the internal wdc wired to irq 14-edge. special case and fail the wdc probe on E1's. 2) If we fail to map the NVRAM registers, return, rather than trying to talk to them and panic'ing the box. 3) revert my previous "fix" to pnpbus to make irq's default to level. It was wrong, and didn't even fix the powerstack.
With this, we have limited PowerStack E1 support. The machine cannot talk to it's IDE controller, and cannot detect it's boot device automatically, but it does come up and run. Tested with NFS root.
|
| 1.2 |
| 16-Mar-2006 |
garbled | branches: 1.2.2; 1.2.4; 1.2.6; More changes to prep port: 1) Add the NVRAM device. This device allows us to speak with the nvram on prep-based machines and read/write to it. Also add a simple IOCTL interface for speaking with the nvram from userland. This hasn't been tested yet, but eventually I plan to support it with the sparc eeprom command. 2) Change the root device detection to use the nvram device to attempt to guess the boot device. Most machines should now correctly guess thier boot device, though I expect a few devices to still not work quite right yet. 3) change the default IRQ to level rather than edge in the pnpbus if the flags are invalid or empty. (based on output from a PowerStack E1) 4) correctly handle older machines in pnpbus that have FixedIOPorts rather than variable ones.
Still have much to do.
|
| 1.1 |
| 09-Mar-2006 |
garbled | branches: 1.1.2; Prep super-commit:
1) create new pnpbus psuedo bus. This is a bus layer that reads the PNP tree from the residual data and allows attachment of devices with the information given therein. Based loosely on i386/pnpbios.
2) Delete obio bus, as with the pnp bus we no longer need it.
3) Create a number of functions that gather the information needed to set up the machine from the residual data, rather than hardcoding it in.
4) Create a quirk table for machines that are bizzare enough that the residual information is not sufficient. (such as the 6015)
5) Using the data gathering routines and the quirk table, delete struct platform completely from the architecture. Prep is now almost completely dynamic in figuring out the machine it is running on and setting things up properly.
6) Add a wdc_pnpbus driver which attaches the wdc controller found on some 7248's and the 6015. This replaces the now-defunct wdc_obio.
7) delete all the mot_* and ibm_* files, and replace them with a single ibm_machdep.c which only contains the quirk functions for the 6015 and the 6050.
8) Modify GENERIC to work with all this stuff.
|
| 1.1.2.5 |
| 26-Jun-2006 |
yamt | sync with head.
|
| 1.1.2.4 |
| 24-May-2006 |
yamt | sync with head.
|
| 1.1.2.3 |
| 01-Apr-2006 |
yamt | sync with head.
|
| 1.1.2.2 |
| 13-Mar-2006 |
yamt | sync with head.
|
| 1.1.2.1 |
| 09-Mar-2006 |
yamt | file pnpbus.c was added on branch yamt-pdpolicy on 2006-03-13 09:06:59 +0000
|
| 1.2.6.3 |
| 01-Jun-2006 |
kardel | Sync with head.
|
| 1.2.6.2 |
| 22-Apr-2006 |
simonb | Sync with head.
|
| 1.2.6.1 |
| 16-Mar-2006 |
simonb | file pnpbus.c was added on branch simonb-timecounters on 2006-04-22 11:37:54 +0000
|
| 1.2.4.3 |
| 11-May-2006 |
elad | sync with head
|
| 1.2.4.2 |
| 19-Apr-2006 |
elad | sync with head - hopefully this will work
|
| 1.2.4.1 |
| 16-Mar-2006 |
elad | file pnpbus.c was added on branch elad-kernelauth on 2006-04-19 02:33:38 +0000
|
| 1.2.2.1 |
| 24-May-2006 |
tron | Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
|
| 1.3.4.1 |
| 13-Jul-2006 |
gdamore | Merge from HEAD.
|
| 1.3.2.1 |
| 19-Jun-2006 |
chap | Sync with head.
|
| 1.4.2.4 |
| 27-Oct-2007 |
yamt | sync with head.
|
| 1.4.2.3 |
| 30-Dec-2006 |
yamt | sync with head.
|
| 1.4.2.2 |
| 21-Jun-2006 |
yamt | sync with head.
|
| 1.4.2.1 |
| 15-Jun-2006 |
yamt | file pnpbus.c was added on branch yamt-lazymbuf on 2006-06-21 14:55:19 +0000
|
| 1.5.8.1 |
| 10-Dec-2006 |
yamt | sync with head.
|
| 1.5.6.2 |
| 09-Sep-2006 |
rpaulo | sync with head
|
| 1.5.6.1 |
| 23-Jun-2006 |
rpaulo | file pnpbus.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:42:43 +0000
|
| 1.5.4.1 |
| 18-Nov-2006 |
ad | Sync with head.
|
| 1.6.32.1 |
| 25-Oct-2007 |
bouyer | Sync with HEAD.
|
| 1.6.30.1 |
| 18-Oct-2007 |
yamt | sync with head.
|
| 1.6.28.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
| 1.6.26.1 |
| 26-Oct-2007 |
joerg | Sync with HEAD.
Follow the merge of pmap.c on i386 and amd64 and move pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup code to restore CR4 before jumping back into kernel space as the large page option might cover that.
|
| 1.6.16.2 |
| 10-May-2007 |
garbled | convert printf's to aprint_*.
|
| 1.6.16.1 |
| 01-May-2007 |
garbled | Rename the prep isa io and mem bus space tags to genppc_* to promote sharing of isa functionality.
|
| 1.6.8.1 |
| 23-Oct-2007 |
ad | Sync with head.
|
| 1.7.20.1 |
| 16-May-2008 |
yamt | sync with head.
|
| 1.7.18.1 |
| 18-May-2008 |
yamt | sync with head.
|
| 1.7.16.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
| 1.9.32.1 |
| 23-Jun-2011 |
cherry | Catchup with rmind-uvmplock merge.
|
| 1.11.54.1 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
| 1.12.8.1 |
| 14-Dec-2020 |
thorpej | Sync w/ HEAD.
|
| 1.13.2.6 |
| 05-Apr-2021 |
thorpej | Treat config_probe() as if it were a boolean function; don't compare return value > 0... except for the odd balls, which are now really easy to spot.
|
| 1.13.2.5 |
| 05-Apr-2021 |
thorpej | config_match() -> config_probe() for the straight-forward indirect config cases. There are still a few odd balls using config_match() which should be sorted out later.
|
| 1.13.2.4 |
| 04-Apr-2021 |
thorpej | CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
|
| 1.13.2.3 |
| 03-Apr-2021 |
thorpej | Give config_attach() the tagged variadic argument treatment and mechanically convert all call sites.
|
| 1.13.2.2 |
| 21-Mar-2021 |
thorpej | CFARG_IATTR usage audit:
If a device carries only one interface attribute, there is no need to specify it when calling config_search(); that specification is meant only to disambiguate which interface attribute (which is a proxy for "what kind of attach args are being used") is having children attached. cfparent_match() will take care of ensuring that any potential children can attach to one of the parent's iterface attributes, and if the parent only carries one, no disambiguation is necessary.
|
| 1.13.2.1 |
| 20-Mar-2021 |
thorpej | The proliferation if config_search_*() and config_found_*() combinations is a little absurd, so begin to tidy this up:
- Introduce a new cfarg_t enumerated type, that defines the types of tag-value variadic arguments that can be passed to the various config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS, for now, plus a CFARG_EOL sentinel). - Collapse config_search_*() into config_search() that takes these variadic arguments. - Convert all call sites of config_search_*() to the new signature. Noticed several incorrect usages along the way, which will be audited in a future commit.
|
| 1.14.8.1 |
| 04-Aug-2021 |
thorpej | Adapt to CFARGS().
|