Home | History | Annotate | Download | only in sbus
History log of /src/sys/dev/sbus/p9100.c
RevisionDateAuthorComments
 1.66  25-Sep-2022  thorpej Remove unnecessary include of <sys/malloc.h>.
 1.65  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.64  24-Apr-2021  thorpej branches: 1.64.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.63  21-Apr-2016  macallan branches: 1.63.34;
more RASTERCONSOLE purging
 1.62  25-Jul-2014  dholland branches: 1.62.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.61  16-Mar-2014  dholland branches: 1.61.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.60  19-Nov-2013  macallan get rid of junk variable
 1.59  27-Oct-2012  chs branches: 1.59.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.58  05-Oct-2012  macallan get rid of gc_attr & allocattr()
 1.57  21-Sep-2012  macallan support anti-aliased fonts, glyph caching etc.
 1.56  11-Jan-2012  macallan branches: 1.56.6;
use rasops_init(0, 0)
 1.55  04-May-2010  macallan branches: 1.55.8; 1.55.12;
use box drawing font if needed
 1.54  01-Mar-2010  macallan branches: 1.54.2;
make latching optional.
The SPARCbook docs claim it's necessary but my 3GX happily works without.
 1.53  01-Mar-2010  macallan fix ancient typo, noticed by mouse@
 1.52  24-Feb-2010  dyoung A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.51  08-Jan-2010  dyoung branches: 1.51.2;
Expand PMF_FN_* macros.
 1.50  19-Sep-2009  tsutsui u_intNN_t -> uintNN_t
 1.49  17-Sep-2009  tsutsui Include "ioconf.h" instead of extern struct cfdriver foo_cd decls.
 1.48  17-Sep-2009  tsutsui Remove struct sbusdev and related functions sbus_establish() and sbusreset().
They are derived from 4.4BSD/sparc and have been there since initial import
of NetBSD/sparc in 1993, but the struct sbusdev is almost unused for years,
nothing calls sbusreset(), and all (*sd->sd_reset)() functions look bogus.

Suggested by mrg@ and martin@, and tested on SS1+ and SS20.
 1.47  20-Aug-2009  macallan call vcons_replay_msgbuf() if we're the console
 1.46  03-Jun-2009  macallan make this compile again without tctrl
 1.45  27-May-2009  macallan use pmf, while there do some cleanup, fix typos etc.
 1.44  27-May-2009  macallan finally commit a lot of stuff that's been sitting in my source tree for
several ages:
- convert to device_t
- add support for programming colour depth and such, use it to reset the
console to something usable when we enter ddb or exit X etc.
- basic power management
TODO:
- convert to PMF
- get rid of rconsole code so we don't need to map the framebuffer
- power down the whole DAC when not in use
 1.43  12-May-2009  cegger struct device * -> device_t, no functional changes intended.
 1.42  12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.41  14-Mar-2009  dsl Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
 1.40  26-Dec-2008  he branches: 1.40.2;
Sprinkle #if NTCTRL > 0 so that this builds again without
warning that some static function is defined but never used.
 1.39  11-Jun-2008  drochner branches: 1.39.4;
mechanical changes to use device_private() or device_lookup_private()
to get softcs, makes the code compile under the stricter type checking
introduced earlier today
 1.38  28-Apr-2008  martin branches: 1.38.2; 1.38.4;
Remove clause 3 and 4 from TNF licenses
 1.37  05-Apr-2008  cegger branches: 1.37.2; 1.37.4;
use aprint_*_dev and device_xname
 1.36  19-Oct-2007  ad branches: 1.36.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.35  04-Mar-2007  christos branches: 1.35.2; 1.35.14; 1.35.16; 1.35.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.34  24-Sep-2006  jmcneill branches: 1.34.4;
Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
 1.33  28-May-2006  blymn branches: 1.33.6; 1.33.8;
Clean up bogus whitespace
 1.32  15-Apr-2006  jmmv branches: 1.32.2;
Remove the getwschar and putwschar accessops from wsdisplay drivers as
requested by uwe@. These were wrong because they were receiving an
emulcookie yet they were accessops (thus having to receive an accesscookie).
Instead, just handle the WSDISPLAYIO_{GET,PUT}WSCHAR ioctls from the
driver's ioctl accessop.

As this reduces the amount of code needed to handle these operations to
two small functions in each driver, remove the WSDISPLAY_CHARFUNCS kernel
option.

Reviewed by, at least, uwe@ and macallan@. No objections in tech-kern@.
 1.31  12-Apr-2006  jmmv Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
 1.30  06-Apr-2006  drochner kill NULL initialisation of get/setborder
 1.29  29-Mar-2006  thorpej Use device_cfdata().
 1.28  08-Mar-2006  macallan branches: 1.28.2;
sprinkle #if NWSDISPLAY > 0 to make this compile cleanly without wscons again
 1.27  06-Mar-2006  macallan branches: 1.27.2;
- use vcons
- enable the external VGA port when tctrl detects a monitor
 1.26  14-Dec-2005  christos branches: 1.26.4; 1.26.6; 1.26.8;
proc -> lwp
 1.25  11-Dec-2005  christos merge ktrace-lwp.
 1.24  12-Nov-2005  macallan Add hardware cursor support, needs testing.
 1.23  04-Jun-2005  tsutsui branches: 1.23.2;
Fix a shadowing variable.
 1.22  16-May-2005  macallan forgot to include rasops_glue.h
 1.21  16-May-2005  macallan Added:
- wscons support
- acceleration
- virtual consoles
- colour
- made cg3 emulation optional for native XFree driver
 1.20  27-Feb-2005  perry branches: 1.20.2;
nuke trailing whitespace
 1.19  17-Mar-2004  pk branches: 1.19.8; 1.19.10;
Rename PROM_getprop*() => prom_getprop*().
 1.18  25-Aug-2003  uwe Undo previous as it broke things.

There are some scattered implicit RASTERCONSOLE dependencies,
so there should be a better way.
 1.17  24-Aug-2003  uwe #include "opt_rcons.h"
 1.16  29-Jun-2003  fvdl branches: 1.16.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.15  29-Jun-2003  darrenr More changes for providing lwpid for ktrace (sparc GENERIC built)
 1.14  23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.13  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.12  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.11  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10  06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.9  23-Aug-2002  thorpej Use the structures defined in bsd_openprom.h for "reg", "range",
and "intr" properties, rather than having identical-except-for-names
sbus_* and iommu_* versions.
 1.8  11-Mar-2002  pk branches: 1.8.4; 1.8.6;
Get rid of `bus_type_t' and use BUS_ADDR() (in sbus_bus_map()) to construct
a `bus_addr_t' to pass on to bus_space_map().

Drop `va' argument from sbus_bus_map(); it should not be used by MI Sbus
drivers.
 1.7  08-Dec-2001  cyber The prom doesn't setup the fb if its not set to console.
We shouldn't try to configure it in that case.
This will make serial console work. completes fix to PR#14213
(Private email determined PR author was using serial console.)
 1.6  08-Dec-2001  soren Pass sbus addresses to sbus_bus_map(), not sbus_bus_addr()'d ones.
 1.5  13-Nov-2001  lukem add RCSIDs
 1.4  26-Sep-2001  eeh getprop* -> PROM_getprop*
 1.3  24-Sep-2001  eeh Change bus_space_mmap() signature to the official one.
 1.2  07-Jan-2001  mrg branches: 1.2.2; 1.2.4; 1.2.6;
avoid unused variables if not RASTERCONSOLE
 1.1  20-Aug-2000  pk branches: 1.1.2;
Move these SBus drivers here from arch/sparc.
 1.1.2.3  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.1.2.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.2.1  20-Aug-2000  bouyer file p9100.c was added on branch thorpej_scsipi on 2000-11-20 22:35:48 +0000
 1.2.6.2  10-Oct-2001  fvdl Convert all remaining devices.
 1.2.6.1  01-Oct-2001  fvdl Catch up with -current.
 1.2.4.6  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.4.5  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.4.4  28-Jun-2002  jdolecek hook fbkqfilter to leaf drivers' kqfilter
 1.2.4.3  28-Jun-2002  jdolecek prove kqfilter hook; it's very simple equivalent of seltrue()
 1.2.4.2  16-Mar-2002  jdolecek Catch up with -current.
 1.2.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.2.9  11-Nov-2002  nathanw Catch up to -current
 1.2.2.8  18-Oct-2002  nathanw Catch up to -current.
 1.2.2.7  17-Sep-2002  nathanw Catch up to -current.
 1.2.2.6  27-Aug-2002  nathanw Catch up to -current.
 1.2.2.5  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.2.4  08-Jan-2002  nathanw Catch up to -current.
 1.2.2.3  14-Nov-2001  nathanw Catch up to -current.
 1.2.2.2  08-Oct-2001  nathanw Catch up to -current.
 1.2.2.1  26-Sep-2001  nathanw Catch up to -current.
Again.
 1.8.6.1  22-Nov-2002  tron Pull up revision 1.9 (requested by martin in ticket #948):
Use the structures defined in bsd_openprom.h for "reg", "range",
and "intr" properties, rather than having identical-except-for-names
sbus_* and iommu_* versions.
 1.8.4.2  29-Aug-2002  gehenna catch up with -current.
 1.8.4.1  16-May-2002  gehenna Add the character device switch.
 1.16.2.7  11-Dec-2005  christos Sync with head.
 1.16.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.16.2.5  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.16.2.4  04-Feb-2005  skrll Adapt to branch.
 1.16.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.16.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.16.2.1  03-Aug-2004  skrll Sync with HEAD
 1.19.10.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.19.8.1  29-Apr-2005  kent sync with -current
 1.20.2.2  08-Jun-2005  tron Pull up revision 1.22 (requested by martin in ticket #379):
forgot to include rasops_glue.h
 1.20.2.1  08-Jun-2005  tron Pull up revision 1.21 (requested by martin in ticket #379):
Added:
- wscons support
- acceleration
- virtual consoles
- colour
- made cg3 emulation optional for native XFree driver
 1.23.2.4  27-Oct-2007  yamt sync with head.
 1.23.2.3  03-Sep-2007  yamt sync with head.
 1.23.2.2  30-Dec-2006  yamt sync with head.
 1.23.2.1  21-Jun-2006  yamt sync with head.
 1.26.8.5  26-Jun-2006  yamt sync with head.
 1.26.8.4  24-May-2006  yamt sync with head.
 1.26.8.3  11-Apr-2006  yamt sync with head
 1.26.8.2  01-Apr-2006  yamt sync with head.
 1.26.8.1  13-Mar-2006  yamt sync with head.
 1.26.6.2  01-Jun-2006  kardel Sync with head.
 1.26.6.1  22-Apr-2006  simonb Sync with head.
 1.26.4.1  09-Sep-2006  rpaulo sync with head
 1.27.2.1  19-Apr-2006  elad sync with head.
 1.28.2.2  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.28.2.1  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.32.2.1  19-Jun-2006  chap Sync with head.
 1.33.8.1  22-Oct-2006  yamt sync with head
 1.33.6.1  18-Nov-2006  ad Sync with head.
 1.34.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.35.20.1  25-Oct-2007  bouyer Sync with HEAD.
 1.35.16.1  06-Nov-2007  matt sync with HEAD
 1.35.14.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.35.2.1  23-Oct-2007  ad Sync with head.
 1.36.16.3  17-Jan-2009  mjf Sync with HEAD.
 1.36.16.2  29-Jun-2008  mjf Sync with HEAD.
 1.36.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.37.4.7  11-Aug-2010  yamt sync with head.
 1.37.4.6  11-Mar-2010  yamt sync with head
 1.37.4.5  16-Sep-2009  yamt sync with head
 1.37.4.4  20-Jun-2009  yamt sync with head
 1.37.4.3  16-May-2009  yamt sync with head
 1.37.4.2  04-May-2009  yamt sync with head.
 1.37.4.1  16-May-2008  yamt sync with head.
 1.37.2.2  17-Jun-2008  yamt sync with head.
 1.37.2.1  18-May-2008  yamt sync with head.
 1.38.4.1  18-Jun-2008  simonb Sync with head.
 1.38.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.39.4.2  28-Apr-2009  skrll Sync with HEAD.
 1.39.4.1  19-Jan-2009  skrll Sync with HEAD.
 1.40.2.2  23-Jul-2009  jym Sync with HEAD.
 1.40.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.51.2.2  17-Aug-2010  uebayasi Sync with HEAD.
 1.51.2.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.54.2.1  30-May-2010  rmind sync with head
 1.55.12.1  18-Feb-2012  mrg merge to -current.
 1.55.8.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.55.8.2  30-Oct-2012  yamt sync with head
 1.55.8.1  17-Apr-2012  yamt sync with head
 1.56.6.3  03-Dec-2017  jdolecek update from HEAD
 1.56.6.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.56.6.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.59.2.1  18-May-2014  rmind sync with head
 1.61.2.1  10-Aug-2014  tls Rebase.
 1.62.4.1  22-Apr-2016  skrll Sync with HEAD
 1.63.34.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.64.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed