History log of /netbsd-current/sys/dev/tc/xcfb.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.60 06-Dec-2021 abs

Add WSDISPLAYIO_GET_FBINFO support to most TURBOchannel framebuffers

This adds WSDISPLAYIO_GET_FBINFO to cfb, mfb, sfb, tfb and xcfb
TURBOchannel framebuffers as used by pmax and alpha

It does not add support to px and pxg (they handle ioctls in common
code in stic.c and more careful wiring is required)

These changes allow an Xswfb X server to use the framebuffer
directly, albeit without any special acceleration

A subsequent change will re-enable X server building on pmax, and
also hopefully switch alpha from Xorg 1.10 to 1.20


Revision tags: thorpej-i2c-spi-conf2-base
# 1.59 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base
# 1.58 24-Apr-2021 thorpej

branches: 1.58.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?).


Revision tags: thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.57 10-Nov-2019 chs

branches: 1.57.10;
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.


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 24-Jan-2018 riastradh

branches: 1.56.4;
Fix integer overflows noted by Silvio Cesare of InfoSect.

Someone^TM should name these idioms so we can eliminate this class of
copypasta bug.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-7-2-RELEASE netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.55 11-Jan-2012 macallan

adjust wsfont_find()


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base
# 1.54 13-Nov-2010 uebayasi

branches: 1.54.8; 1.54.12;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.


Revision tags: uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10
# 1.53 15-May-2010 tsutsui

Clear RI_NO_AUTO in actual attach functions during autoconf(9)
for console devices that set the flag during consinit().


# 1.52 15-May-2010 tsutsui

Set RI_NO_AUTO in ri_flg if *fb_common_init() is invoked from cnattach.
Untested.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 jym-xensuspend-nbase
# 1.51 22-Aug-2009 tsutsui

branches: 1.51.2; 1.51.4;
u_intNN_t -> uintNN_t


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.50 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.49 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.48 27-Dec-2008 he

branches: 1.48.2;
Follow up on the removal of MALLOC(), use malloc() instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base simonb-wapbl-nbase simonb-wapbl-base
# 1.47 09-Jul-2008 joerg

branches: 1.47.2;
- device/softc split
- make sfbplus at least compilable


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.46 26-May-2008 nisimura

branches: 1.46.2; 1.46.4;
- assign 2 clause TNF license to the files cited as my ownership.
- abandon and remove my copyright notice from the three files were
copied in order to adapt HW I don't have; pvr.c, pm.c and stic.c


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.45 19-Oct-2007 ad

branches: 1.45.16; 1.45.18; 1.45.20; 1.45.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.44 06-Mar-2007 simonb

branches: 1.44.2; 1.44.14; 1.44.16; 1.44.20;
Fix some caddr_t rototill fallout.


# 1.43 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.42 12-Apr-2006 jmmv

branches: 1.42.14;
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@.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.41 31-Mar-2006 thorpej

Use ANSI function decls, apply static.


# 1.40 30-Mar-2006 thorpej

Use device_private().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.39 11-Dec-2005 christos

branches: 1.39.4; 1.39.6; 1.39.8; 1.39.10; 1.39.12;
merge ktrace-lwp.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base ktrace-lwp-base
# 1.38 27-Feb-2005 perry

branches: 1.38.4;
nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base kent-audio1-beforemerge
# 1.37 02-Jan-2005 mhitch

branches: 1.37.2; 1.37.4;
Fix and simplify incorrect check for screen blanking in WSDISPLAYIO_SVIDEO.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.36 20-Dec-2003 nisimura

- Minor coding modifications for VDAC register access.
- De-__P() this time.
Tested valid with 4MAXINE.


# 1.35 17-Dec-2003 ad

- Restore the display to a sane state when leaving mapped mode.
- OR updates into sc_changed, and protect with spltty()/splx().


# 1.34 13-Dec-2003 ad

Make this compile again.


# 1.33 13-Nov-2003 chs

eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.32 02-Oct-2002 thorpej

branches: 1.32.6;
Add trailing ; to CFATTACH_DECL.


# 1.31 01-Oct-2002 thorpej

Use CFATTACH_DECL().


Revision tags: gehenna-devsw-base
# 1.30 19-Aug-2002 itohy

Leaving overflow-sensitive code, very similar to what was fixed
in the previous changes to cfb.c / sfb.c / xcfb.c, would not be clever.
Just modify in the similar way.


# 1.29 06-Aug-2002 itojun

integer overflow. from silvio@qualys.com


# 1.28 04-Jul-2002 junyoung

alloc_attr -> allocattr

Approved by Matthias Drochner.


Revision tags: netbsd-1-6-base eeh-devprop-base
# 1.27 17-Mar-2002 atatat

branches: 1.27.4; 1.27.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.


# 1.26 13-Mar-2002 ad

Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.


Revision tags: newlock-base ifpoll-base
# 1.25 13-Nov-2001 lukem

add/cleanup RCSIDs


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.24 22-Aug-2001 nisimura

Nuke fb_devconfig data structure which was found unnecessary to have.


# 1.23 05-Aug-2001 jdolecek

use unsigned variable types as appropriate


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.22 09-Apr-2001 nathanw

branches: 1.22.2;
Fix spelling errors in comments.


# 1.21 27-Oct-2000 nisimura

branches: 1.21.2;
Fix errors in initializing the software copy of 256 entry colormap
stored in device softc. rasops_cmap[] array is orginazed in 256
iteration of 3 byte long RBG triplet, which does not match with
struct wsdisplay_cmap design.


# 1.20 12-Sep-2000 nisimura

Found glyph pixel order inverted on screen.


# 1.19 28-Jun-2000 mrg

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>


# 1.18 26-Jun-2000 simonb

Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
# 1.17 16-Mar-2000 nisimura

branches: 1.17.4;
Place 34 by 80 console at the center of screen.


# 1.16 14-Mar-2000 nisimura

Respect video console colour designation by configration file.


# 1.15 14-Mar-2000 nisimura

Switch to improved flexible video console text rasterizer provided by
rasops and wsfont.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.14 06-Dec-1999 drochner

update for changed struct wsdisplay_accessops:show_screen signature.
no functional changes


# 1.13 29-Nov-1999 nisimura

Const poisoning.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.12 19-Oct-1999 nisimura

branches: 1.12.2;
Enable 'WSSCREEN_REVERSE' scr-capability.


Revision tags: chs-ubc2-base
# 1.11 07-May-1999 nisimura

branches: 1.11.2; 1.11.4;
- Sweep abit preparing for code merge to have common 'vdacops' across
various graphics cards.


# 1.10 30-Apr-1999 nisimura

- Nuke debugging aids mistakenly committed.


# 1.9 30-Apr-1999 nisimura

- I finally learned CSR_A register of IMS G332 VDAC must be treated as
write only. Read-motify-write operation breaks its video mode.
- VDAC regiters are now initialized as ULTRIX does.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.8 29-Mar-1999 nisimura

branches: 1.8.4;
- Unnecessary to have '#include <machine/autoconf.h>' for those.


# 1.7 24-Mar-1999 mrg

completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.


# 1.6 11-Jan-1999 drochner

remove dummy "load_font" entries


Revision tags: kenh-if-detach-base
# 1.5 19-Nov-1998 mrg

fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.


XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
paddr_t (*d_mmap) __P((dev_t, off_t, int));

by someone!


# 1.4 19-Nov-1998 nisimura

- Fix an error in cursor color manipulation. 24bit RGB value was mistakenly
assigned to unsigned short variable.
- XXX PMAG-DV is supposed to emit virtical retrace interrupt, which can be
used for colormap/cursor update just like other TURBOchannel framebuffers.


# 1.3 09-Nov-1998 nisimura

- Fix many errors in cursor image manipulation. Hardware expect 2
bit/pixel format, not planer format. Assign MSB for cursor mask and
LSB for cursor image, where 10 means mask color and 11 for image color.
Image bit order of Bt431 and Bt459 are opposite to MIPS/Alpha processors
while IMS G332 and DC503 (PCC) are indentical.
- Assume that cursor images are 32 pixel padded as ULTRIX/DU ws interface
do. It's natural to X server.
- XXX Vast majority of codes are duplicated between mfb<->tfb and cfb<->sfb.
Code sharing might be achieved in the context of TGA/SFB+ merge.


Revision tags: chs-ubc-base
# 1.2 30-Oct-1998 nisimura

- Assign copyright terms.


# 1.1 29-Oct-1998 nisimura

- Introduce MI NWSCONS drivers for TURBOchannel framebuffer option cards.

N.B., Digital UNIX never supports neither PMAG-AA (mfb) nor PMAG-BA (cfb)
for TC Alphas. PMAG-DV (xcfb) is Personal DECstation built in. All should
be good for console, but need much works for cursor/colormap completeness.


# 1.59 07-Aug-2021 thorpej

Merge thorpej-cfargs2.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base
# 1.58 24-Apr-2021 thorpej

branches: 1.58.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?).


Revision tags: thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.57 10-Nov-2019 chs

branches: 1.57.10;
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.


Revision tags: netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 24-Jan-2018 riastradh

branches: 1.56.4;
Fix integer overflows noted by Silvio Cesare of InfoSect.

Someone^TM should name these idioms so we can eliminate this class of
copypasta bug.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-7-2-RELEASE netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.55 11-Jan-2012 macallan

adjust wsfont_find()


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base
# 1.54 13-Nov-2010 uebayasi

branches: 1.54.8; 1.54.12;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.


Revision tags: uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10
# 1.53 15-May-2010 tsutsui

Clear RI_NO_AUTO in actual attach functions during autoconf(9)
for console devices that set the flag during consinit().


# 1.52 15-May-2010 tsutsui

Set RI_NO_AUTO in ri_flg if *fb_common_init() is invoked from cnattach.
Untested.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 jym-xensuspend-nbase
# 1.51 22-Aug-2009 tsutsui

branches: 1.51.2; 1.51.4;
u_intNN_t -> uintNN_t


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.50 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.49 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.48 27-Dec-2008 he

branches: 1.48.2;
Follow up on the removal of MALLOC(), use malloc() instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base simonb-wapbl-nbase simonb-wapbl-base
# 1.47 09-Jul-2008 joerg

branches: 1.47.2;
- device/softc split
- make sfbplus at least compilable


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.46 26-May-2008 nisimura

branches: 1.46.2; 1.46.4;
- assign 2 clause TNF license to the files cited as my ownership.
- abandon and remove my copyright notice from the three files were
copied in order to adapt HW I don't have; pvr.c, pm.c and stic.c


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.45 19-Oct-2007 ad

branches: 1.45.16; 1.45.18; 1.45.20; 1.45.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.44 06-Mar-2007 simonb

branches: 1.44.2; 1.44.14; 1.44.16; 1.44.20;
Fix some caddr_t rototill fallout.


# 1.43 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.42 12-Apr-2006 jmmv

branches: 1.42.14;
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@.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.41 31-Mar-2006 thorpej

Use ANSI function decls, apply static.


# 1.40 30-Mar-2006 thorpej

Use device_private().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.39 11-Dec-2005 christos

branches: 1.39.4; 1.39.6; 1.39.8; 1.39.10; 1.39.12;
merge ktrace-lwp.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base ktrace-lwp-base
# 1.38 27-Feb-2005 perry

branches: 1.38.4;
nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base kent-audio1-beforemerge
# 1.37 02-Jan-2005 mhitch

branches: 1.37.2; 1.37.4;
Fix and simplify incorrect check for screen blanking in WSDISPLAYIO_SVIDEO.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.36 20-Dec-2003 nisimura

- Minor coding modifications for VDAC register access.
- De-__P() this time.
Tested valid with 4MAXINE.


# 1.35 17-Dec-2003 ad

- Restore the display to a sane state when leaving mapped mode.
- OR updates into sc_changed, and protect with spltty()/splx().


# 1.34 13-Dec-2003 ad

Make this compile again.


# 1.33 13-Nov-2003 chs

eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.32 02-Oct-2002 thorpej

branches: 1.32.6;
Add trailing ; to CFATTACH_DECL.


# 1.31 01-Oct-2002 thorpej

Use CFATTACH_DECL().


Revision tags: gehenna-devsw-base
# 1.30 19-Aug-2002 itohy

Leaving overflow-sensitive code, very similar to what was fixed
in the previous changes to cfb.c / sfb.c / xcfb.c, would not be clever.
Just modify in the similar way.


# 1.29 06-Aug-2002 itojun

integer overflow. from silvio@qualys.com


# 1.28 04-Jul-2002 junyoung

alloc_attr -> allocattr

Approved by Matthias Drochner.


Revision tags: netbsd-1-6-base eeh-devprop-base
# 1.27 17-Mar-2002 atatat

branches: 1.27.4; 1.27.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.


# 1.26 13-Mar-2002 ad

Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.


Revision tags: newlock-base ifpoll-base
# 1.25 13-Nov-2001 lukem

add/cleanup RCSIDs


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.24 22-Aug-2001 nisimura

Nuke fb_devconfig data structure which was found unnecessary to have.


# 1.23 05-Aug-2001 jdolecek

use unsigned variable types as appropriate


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.22 09-Apr-2001 nathanw

branches: 1.22.2;
Fix spelling errors in comments.


# 1.21 27-Oct-2000 nisimura

branches: 1.21.2;
Fix errors in initializing the software copy of 256 entry colormap
stored in device softc. rasops_cmap[] array is orginazed in 256
iteration of 3 byte long RBG triplet, which does not match with
struct wsdisplay_cmap design.


# 1.20 12-Sep-2000 nisimura

Found glyph pixel order inverted on screen.


# 1.19 28-Jun-2000 mrg

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>


# 1.18 26-Jun-2000 simonb

Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
# 1.17 16-Mar-2000 nisimura

branches: 1.17.4;
Place 34 by 80 console at the center of screen.


# 1.16 14-Mar-2000 nisimura

Respect video console colour designation by configration file.


# 1.15 14-Mar-2000 nisimura

Switch to improved flexible video console text rasterizer provided by
rasops and wsfont.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.14 06-Dec-1999 drochner

update for changed struct wsdisplay_accessops:show_screen signature.
no functional changes


# 1.13 29-Nov-1999 nisimura

Const poisoning.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.12 19-Oct-1999 nisimura

branches: 1.12.2;
Enable 'WSSCREEN_REVERSE' scr-capability.


Revision tags: chs-ubc2-base
# 1.11 07-May-1999 nisimura

branches: 1.11.2; 1.11.4;
- Sweep abit preparing for code merge to have common 'vdacops' across
various graphics cards.


# 1.10 30-Apr-1999 nisimura

- Nuke debugging aids mistakenly committed.


# 1.9 30-Apr-1999 nisimura

- I finally learned CSR_A register of IMS G332 VDAC must be treated as
write only. Read-motify-write operation breaks its video mode.
- VDAC regiters are now initialized as ULTRIX does.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.8 29-Mar-1999 nisimura

branches: 1.8.4;
- Unnecessary to have '#include <machine/autoconf.h>' for those.


# 1.7 24-Mar-1999 mrg

completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.


# 1.6 11-Jan-1999 drochner

remove dummy "load_font" entries


Revision tags: kenh-if-detach-base
# 1.5 19-Nov-1998 mrg

fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.


XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
paddr_t (*d_mmap) __P((dev_t, off_t, int));

by someone!


# 1.4 19-Nov-1998 nisimura

- Fix an error in cursor color manipulation. 24bit RGB value was mistakenly
assigned to unsigned short variable.
- XXX PMAG-DV is supposed to emit virtical retrace interrupt, which can be
used for colormap/cursor update just like other TURBOchannel framebuffers.


# 1.3 09-Nov-1998 nisimura

- Fix many errors in cursor image manipulation. Hardware expect 2
bit/pixel format, not planer format. Assign MSB for cursor mask and
LSB for cursor image, where 10 means mask color and 11 for image color.
Image bit order of Bt431 and Bt459 are opposite to MIPS/Alpha processors
while IMS G332 and DC503 (PCC) are indentical.
- Assume that cursor images are 32 pixel padded as ULTRIX/DU ws interface
do. It's natural to X server.
- XXX Vast majority of codes are duplicated between mfb<->tfb and cfb<->sfb.
Code sharing might be achieved in the context of TGA/SFB+ merge.


Revision tags: chs-ubc-base
# 1.2 30-Oct-1998 nisimura

- Assign copyright terms.


# 1.1 29-Oct-1998 nisimura

- Introduce MI NWSCONS drivers for TURBOchannel framebuffer option cards.

N.B., Digital UNIX never supports neither PMAG-AA (mfb) nor PMAG-BA (cfb)
for TC Alphas. PMAG-DV (xcfb) is Personal DECstation built in. All should
be good for console, but need much works for cursor/colormap completeness.


# 1.58 24-Apr-2021 thorpej

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?).


Revision tags: thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.57 10-Nov-2019 chs

branches: 1.57.10;
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.


Revision tags: netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 24-Jan-2018 riastradh

branches: 1.56.4;
Fix integer overflows noted by Silvio Cesare of InfoSect.

Someone^TM should name these idioms so we can eliminate this class of
copypasta bug.


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-7-2-RELEASE netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.55 11-Jan-2012 macallan

adjust wsfont_find()


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base
# 1.54 13-Nov-2010 uebayasi

branches: 1.54.8; 1.54.12;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.


Revision tags: uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10
# 1.53 15-May-2010 tsutsui

Clear RI_NO_AUTO in actual attach functions during autoconf(9)
for console devices that set the flag during consinit().


# 1.52 15-May-2010 tsutsui

Set RI_NO_AUTO in ri_flg if *fb_common_init() is invoked from cnattach.
Untested.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 jym-xensuspend-nbase
# 1.51 22-Aug-2009 tsutsui

branches: 1.51.2; 1.51.4;
u_intNN_t -> uintNN_t


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.50 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.49 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.48 27-Dec-2008 he

branches: 1.48.2;
Follow up on the removal of MALLOC(), use malloc() instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base simonb-wapbl-nbase simonb-wapbl-base
# 1.47 09-Jul-2008 joerg

branches: 1.47.2;
- device/softc split
- make sfbplus at least compilable


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.46 26-May-2008 nisimura

branches: 1.46.2; 1.46.4;
- assign 2 clause TNF license to the files cited as my ownership.
- abandon and remove my copyright notice from the three files were
copied in order to adapt HW I don't have; pvr.c, pm.c and stic.c


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.45 19-Oct-2007 ad

branches: 1.45.16; 1.45.18; 1.45.20; 1.45.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.44 06-Mar-2007 simonb

branches: 1.44.2; 1.44.14; 1.44.16; 1.44.20;
Fix some caddr_t rototill fallout.


# 1.43 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.42 12-Apr-2006 jmmv

branches: 1.42.14;
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@.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.41 31-Mar-2006 thorpej

Use ANSI function decls, apply static.


# 1.40 30-Mar-2006 thorpej

Use device_private().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.39 11-Dec-2005 christos

branches: 1.39.4; 1.39.6; 1.39.8; 1.39.10; 1.39.12;
merge ktrace-lwp.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base ktrace-lwp-base
# 1.38 27-Feb-2005 perry

branches: 1.38.4;
nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base kent-audio1-beforemerge
# 1.37 02-Jan-2005 mhitch

branches: 1.37.2; 1.37.4;
Fix and simplify incorrect check for screen blanking in WSDISPLAYIO_SVIDEO.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.36 20-Dec-2003 nisimura

- Minor coding modifications for VDAC register access.
- De-__P() this time.
Tested valid with 4MAXINE.


# 1.35 17-Dec-2003 ad

- Restore the display to a sane state when leaving mapped mode.
- OR updates into sc_changed, and protect with spltty()/splx().


# 1.34 13-Dec-2003 ad

Make this compile again.


# 1.33 13-Nov-2003 chs

eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.32 02-Oct-2002 thorpej

branches: 1.32.6;
Add trailing ; to CFATTACH_DECL.


# 1.31 01-Oct-2002 thorpej

Use CFATTACH_DECL().


Revision tags: gehenna-devsw-base
# 1.30 19-Aug-2002 itohy

Leaving overflow-sensitive code, very similar to what was fixed
in the previous changes to cfb.c / sfb.c / xcfb.c, would not be clever.
Just modify in the similar way.


# 1.29 06-Aug-2002 itojun

integer overflow. from silvio@qualys.com


# 1.28 04-Jul-2002 junyoung

alloc_attr -> allocattr

Approved by Matthias Drochner.


Revision tags: netbsd-1-6-base eeh-devprop-base
# 1.27 17-Mar-2002 atatat

branches: 1.27.4; 1.27.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.


# 1.26 13-Mar-2002 ad

Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.


Revision tags: newlock-base ifpoll-base
# 1.25 13-Nov-2001 lukem

add/cleanup RCSIDs


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.24 22-Aug-2001 nisimura

Nuke fb_devconfig data structure which was found unnecessary to have.


# 1.23 05-Aug-2001 jdolecek

use unsigned variable types as appropriate


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.22 09-Apr-2001 nathanw

branches: 1.22.2;
Fix spelling errors in comments.


# 1.21 27-Oct-2000 nisimura

branches: 1.21.2;
Fix errors in initializing the software copy of 256 entry colormap
stored in device softc. rasops_cmap[] array is orginazed in 256
iteration of 3 byte long RBG triplet, which does not match with
struct wsdisplay_cmap design.


# 1.20 12-Sep-2000 nisimura

Found glyph pixel order inverted on screen.


# 1.19 28-Jun-2000 mrg

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>


# 1.18 26-Jun-2000 simonb

Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
# 1.17 16-Mar-2000 nisimura

branches: 1.17.4;
Place 34 by 80 console at the center of screen.


# 1.16 14-Mar-2000 nisimura

Respect video console colour designation by configration file.


# 1.15 14-Mar-2000 nisimura

Switch to improved flexible video console text rasterizer provided by
rasops and wsfont.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.14 06-Dec-1999 drochner

update for changed struct wsdisplay_accessops:show_screen signature.
no functional changes


# 1.13 29-Nov-1999 nisimura

Const poisoning.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.12 19-Oct-1999 nisimura

branches: 1.12.2;
Enable 'WSSCREEN_REVERSE' scr-capability.


Revision tags: chs-ubc2-base
# 1.11 07-May-1999 nisimura

branches: 1.11.2; 1.11.4;
- Sweep abit preparing for code merge to have common 'vdacops' across
various graphics cards.


# 1.10 30-Apr-1999 nisimura

- Nuke debugging aids mistakenly committed.


# 1.9 30-Apr-1999 nisimura

- I finally learned CSR_A register of IMS G332 VDAC must be treated as
write only. Read-motify-write operation breaks its video mode.
- VDAC regiters are now initialized as ULTRIX does.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.8 29-Mar-1999 nisimura

branches: 1.8.4;
- Unnecessary to have '#include <machine/autoconf.h>' for those.


# 1.7 24-Mar-1999 mrg

completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.


# 1.6 11-Jan-1999 drochner

remove dummy "load_font" entries


Revision tags: kenh-if-detach-base
# 1.5 19-Nov-1998 mrg

fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.


XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
paddr_t (*d_mmap) __P((dev_t, off_t, int));

by someone!


# 1.4 19-Nov-1998 nisimura

- Fix an error in cursor color manipulation. 24bit RGB value was mistakenly
assigned to unsigned short variable.
- XXX PMAG-DV is supposed to emit virtical retrace interrupt, which can be
used for colormap/cursor update just like other TURBOchannel framebuffers.


# 1.3 09-Nov-1998 nisimura

- Fix many errors in cursor image manipulation. Hardware expect 2
bit/pixel format, not planer format. Assign MSB for cursor mask and
LSB for cursor image, where 10 means mask color and 11 for image color.
Image bit order of Bt431 and Bt459 are opposite to MIPS/Alpha processors
while IMS G332 and DC503 (PCC) are indentical.
- Assume that cursor images are 32 pixel padded as ULTRIX/DU ws interface
do. It's natural to X server.
- XXX Vast majority of codes are duplicated between mfb<->tfb and cfb<->sfb.
Code sharing might be achieved in the context of TGA/SFB+ merge.


Revision tags: chs-ubc-base
# 1.2 30-Oct-1998 nisimura

- Assign copyright terms.


# 1.1 29-Oct-1998 nisimura

- Introduce MI NWSCONS drivers for TURBOchannel framebuffer option cards.

N.B., Digital UNIX never supports neither PMAG-AA (mfb) nor PMAG-BA (cfb)
for TC Alphas. PMAG-DV (xcfb) is Personal DECstation built in. All should
be good for console, but need much works for cursor/colormap completeness.


# 1.57 10-Nov-2019 chs

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.


Revision tags: netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.56 24-Jan-2018 riastradh

Fix integer overflows noted by Silvio Cesare of InfoSect.

Someone^TM should name these idioms so we can eliminate this class of
copypasta bug.


Revision tags: netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-7-2-RELEASE netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.55 11-Jan-2012 macallan

adjust wsfont_find()


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base
# 1.54 13-Nov-2010 uebayasi

branches: 1.54.8; 1.54.12;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.


Revision tags: uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10
# 1.53 15-May-2010 tsutsui

Clear RI_NO_AUTO in actual attach functions during autoconf(9)
for console devices that set the flag during consinit().


# 1.52 15-May-2010 tsutsui

Set RI_NO_AUTO in ri_flg if *fb_common_init() is invoked from cnattach.
Untested.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 jym-xensuspend-nbase
# 1.51 22-Aug-2009 tsutsui

branches: 1.51.2; 1.51.4;
u_intNN_t -> uintNN_t


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.50 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.49 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.48 27-Dec-2008 he

branches: 1.48.2;
Follow up on the removal of MALLOC(), use malloc() instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base simonb-wapbl-nbase simonb-wapbl-base
# 1.47 09-Jul-2008 joerg

branches: 1.47.2;
- device/softc split
- make sfbplus at least compilable


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.46 26-May-2008 nisimura

branches: 1.46.2; 1.46.4;
- assign 2 clause TNF license to the files cited as my ownership.
- abandon and remove my copyright notice from the three files were
copied in order to adapt HW I don't have; pvr.c, pm.c and stic.c


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.45 19-Oct-2007 ad

branches: 1.45.16; 1.45.18; 1.45.20; 1.45.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.44 06-Mar-2007 simonb

branches: 1.44.2; 1.44.14; 1.44.16; 1.44.20;
Fix some caddr_t rototill fallout.


# 1.43 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.42 12-Apr-2006 jmmv

branches: 1.42.14;
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@.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.41 31-Mar-2006 thorpej

Use ANSI function decls, apply static.


# 1.40 30-Mar-2006 thorpej

Use device_private().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.39 11-Dec-2005 christos

branches: 1.39.4; 1.39.6; 1.39.8; 1.39.10; 1.39.12;
merge ktrace-lwp.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base ktrace-lwp-base
# 1.38 27-Feb-2005 perry

branches: 1.38.4;
nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base kent-audio1-beforemerge
# 1.37 02-Jan-2005 mhitch

branches: 1.37.2; 1.37.4;
Fix and simplify incorrect check for screen blanking in WSDISPLAYIO_SVIDEO.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.36 20-Dec-2003 nisimura

- Minor coding modifications for VDAC register access.
- De-__P() this time.
Tested valid with 4MAXINE.


# 1.35 17-Dec-2003 ad

- Restore the display to a sane state when leaving mapped mode.
- OR updates into sc_changed, and protect with spltty()/splx().


# 1.34 13-Dec-2003 ad

Make this compile again.


# 1.33 13-Nov-2003 chs

eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.32 02-Oct-2002 thorpej

branches: 1.32.6;
Add trailing ; to CFATTACH_DECL.


# 1.31 01-Oct-2002 thorpej

Use CFATTACH_DECL().


Revision tags: gehenna-devsw-base
# 1.30 19-Aug-2002 itohy

Leaving overflow-sensitive code, very similar to what was fixed
in the previous changes to cfb.c / sfb.c / xcfb.c, would not be clever.
Just modify in the similar way.


# 1.29 06-Aug-2002 itojun

integer overflow. from silvio@qualys.com


# 1.28 04-Jul-2002 junyoung

alloc_attr -> allocattr

Approved by Matthias Drochner.


Revision tags: netbsd-1-6-base eeh-devprop-base
# 1.27 17-Mar-2002 atatat

branches: 1.27.4; 1.27.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.


# 1.26 13-Mar-2002 ad

Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.


Revision tags: newlock-base ifpoll-base
# 1.25 13-Nov-2001 lukem

add/cleanup RCSIDs


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.24 22-Aug-2001 nisimura

Nuke fb_devconfig data structure which was found unnecessary to have.


# 1.23 05-Aug-2001 jdolecek

use unsigned variable types as appropriate


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.22 09-Apr-2001 nathanw

branches: 1.22.2;
Fix spelling errors in comments.


# 1.21 27-Oct-2000 nisimura

branches: 1.21.2;
Fix errors in initializing the software copy of 256 entry colormap
stored in device softc. rasops_cmap[] array is orginazed in 256
iteration of 3 byte long RBG triplet, which does not match with
struct wsdisplay_cmap design.


# 1.20 12-Sep-2000 nisimura

Found glyph pixel order inverted on screen.


# 1.19 28-Jun-2000 mrg

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>


# 1.18 26-Jun-2000 simonb

Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
# 1.17 16-Mar-2000 nisimura

branches: 1.17.4;
Place 34 by 80 console at the center of screen.


# 1.16 14-Mar-2000 nisimura

Respect video console colour designation by configration file.


# 1.15 14-Mar-2000 nisimura

Switch to improved flexible video console text rasterizer provided by
rasops and wsfont.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.14 06-Dec-1999 drochner

update for changed struct wsdisplay_accessops:show_screen signature.
no functional changes


# 1.13 29-Nov-1999 nisimura

Const poisoning.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.12 19-Oct-1999 nisimura

branches: 1.12.2;
Enable 'WSSCREEN_REVERSE' scr-capability.


Revision tags: chs-ubc2-base
# 1.11 07-May-1999 nisimura

branches: 1.11.2; 1.11.4;
- Sweep abit preparing for code merge to have common 'vdacops' across
various graphics cards.


# 1.10 30-Apr-1999 nisimura

- Nuke debugging aids mistakenly committed.


# 1.9 30-Apr-1999 nisimura

- I finally learned CSR_A register of IMS G332 VDAC must be treated as
write only. Read-motify-write operation breaks its video mode.
- VDAC regiters are now initialized as ULTRIX does.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.8 29-Mar-1999 nisimura

branches: 1.8.4;
- Unnecessary to have '#include <machine/autoconf.h>' for those.


# 1.7 24-Mar-1999 mrg

completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.


# 1.6 11-Jan-1999 drochner

remove dummy "load_font" entries


Revision tags: kenh-if-detach-base
# 1.5 19-Nov-1998 mrg

fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.


XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
paddr_t (*d_mmap) __P((dev_t, off_t, int));

by someone!


# 1.4 19-Nov-1998 nisimura

- Fix an error in cursor color manipulation. 24bit RGB value was mistakenly
assigned to unsigned short variable.
- XXX PMAG-DV is supposed to emit virtical retrace interrupt, which can be
used for colormap/cursor update just like other TURBOchannel framebuffers.


# 1.3 09-Nov-1998 nisimura

- Fix many errors in cursor image manipulation. Hardware expect 2
bit/pixel format, not planer format. Assign MSB for cursor mask and
LSB for cursor image, where 10 means mask color and 11 for image color.
Image bit order of Bt431 and Bt459 are opposite to MIPS/Alpha processors
while IMS G332 and DC503 (PCC) are indentical.
- Assume that cursor images are 32 pixel padded as ULTRIX/DU ws interface
do. It's natural to X server.
- XXX Vast majority of codes are duplicated between mfb<->tfb and cfb<->sfb.
Code sharing might be achieved in the context of TGA/SFB+ merge.


Revision tags: chs-ubc-base
# 1.2 30-Oct-1998 nisimura

- Assign copyright terms.


# 1.1 29-Oct-1998 nisimura

- Introduce MI NWSCONS drivers for TURBOchannel framebuffer option cards.

N.B., Digital UNIX never supports neither PMAG-AA (mfb) nor PMAG-BA (cfb)
for TC Alphas. PMAG-DV (xcfb) is Personal DECstation built in. All should
be good for console, but need much works for cursor/colormap completeness.


# 1.56 24-Jan-2018 riastradh

Fix integer overflows noted by Silvio Cesare of InfoSect.

Someone^TM should name these idioms so we can eliminate this class of
copypasta bug.


Revision tags: netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE rmind-smpnet-nbase netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base rmind-smpnet-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-base2 netbsd-6-base
# 1.55 11-Jan-2012 macallan

adjust wsfont_find()


Revision tags: jmcneill-usbmp-pre-base2 jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 rmind-uvmplock-base
# 1.54 13-Nov-2010 uebayasi

branches: 1.54.8; 1.54.12;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.


Revision tags: uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10
# 1.53 15-May-2010 tsutsui

Clear RI_NO_AUTO in actual attach functions during autoconf(9)
for console devices that set the flag during consinit().


# 1.52 15-May-2010 tsutsui

Set RI_NO_AUTO in ri_flg if *fb_common_init() is invoked from cnattach.
Untested.


Revision tags: uebayasi-xip-base1 yamt-nfs-mp-base9 uebayasi-xip-base matt-premerge-20091211 yamt-nfs-mp-base8 jym-xensuspend-nbase
# 1.51 22-Aug-2009 tsutsui

branches: 1.51.2; 1.51.4;
u_intNN_t -> uintNN_t


Revision tags: yamt-nfs-mp-base7 jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-base
# 1.50 12-May-2009 cegger

struct device * -> device_t, no functional changes intended.


# 1.49 12-May-2009 cegger

struct cfdata * -> cfdata_t, no functional changes intended.


Revision tags: yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 nick-hppapmap-base2 nick-hppapmap-base mjf-devfs2-base
# 1.48 27-Dec-2008 he

branches: 1.48.2;
Follow up on the removal of MALLOC(), use malloc() instead.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base simonb-wapbl-nbase simonb-wapbl-base
# 1.47 09-Jul-2008 joerg

branches: 1.47.2;
- device/softc split
- make sfbplus at least compilable


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.46 26-May-2008 nisimura

branches: 1.46.2; 1.46.4;
- assign 2 clause TNF license to the files cited as my ownership.
- abandon and remove my copyright notice from the three files were
copied in order to adapt HW I don't have; pvr.c, pm.c and stic.c


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base bouyer-xeni386-merge1 vmlocking2-base3 bouyer-xeni386-nbase yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 bouyer-xeni386-base yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 matt-armv6-nbase jmcneill-base mjf-devfs-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base matt-armv6-base jmcneill-pm-base hpcarm-cleanup-base reinoud-bufcleanup-base
# 1.45 19-Oct-2007 ad

branches: 1.45.16; 1.45.18; 1.45.20; 1.45.22;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.44 06-Mar-2007 simonb

branches: 1.44.2; 1.44.14; 1.44.16; 1.44.20;
Fix some caddr_t rototill fallout.


# 1.43 04-Mar-2007 christos

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 abandoned-netbsd-4-base yamt-splraiseipl-base2 yamt-splraiseipl-base yamt-pdpolicy-base9 newlock2-base yamt-pdpolicy-base8 yamt-pdpolicy-base7 netbsd-4-base yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.42 12-Apr-2006 jmmv

branches: 1.42.14;
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@.


Revision tags: yamt-pdpolicy-base4 yamt-pdpolicy-base3
# 1.41 31-Mar-2006 thorpej

Use ANSI function decls, apply static.


# 1.40 30-Mar-2006 thorpej

Use device_private().


Revision tags: peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.39 11-Dec-2005 christos

branches: 1.39.4; 1.39.6; 1.39.8; 1.39.10; 1.39.12;
merge ktrace-lwp.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 yamt-readahead-base3 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 yamt-readahead-base2 netbsd-3-0-RC2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base netbsd-3-0-RC1 yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base yamt-km-base4 yamt-km-base3 netbsd-3-base kent-audio2-base ktrace-lwp-base
# 1.38 27-Feb-2005 perry

branches: 1.38.4;
nuke trailing whitespace


Revision tags: yamt-km-base2 yamt-km-base kent-audio1-beforemerge
# 1.37 02-Jan-2005 mhitch

branches: 1.37.2; 1.37.4;
Fix and simplify incorrect check for screen blanking in WSDISPLAYIO_SVIDEO.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base kent-audio1-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.36 20-Dec-2003 nisimura

- Minor coding modifications for VDAC register access.
- De-__P() this time.
Tested valid with 4MAXINE.


# 1.35 17-Dec-2003 ad

- Restore the display to a sane state when leaving mapped mode.
- OR updates into sc_changed, and protect with spltty()/splx().


# 1.34 13-Dec-2003 ad

Make this compile again.


# 1.33 13-Nov-2003 chs

eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge kqueue-base
# 1.32 02-Oct-2002 thorpej

branches: 1.32.6;
Add trailing ; to CFATTACH_DECL.


# 1.31 01-Oct-2002 thorpej

Use CFATTACH_DECL().


Revision tags: gehenna-devsw-base
# 1.30 19-Aug-2002 itohy

Leaving overflow-sensitive code, very similar to what was fixed
in the previous changes to cfb.c / sfb.c / xcfb.c, would not be clever.
Just modify in the similar way.


# 1.29 06-Aug-2002 itojun

integer overflow. from silvio@qualys.com


# 1.28 04-Jul-2002 junyoung

alloc_attr -> allocattr

Approved by Matthias Drochner.


Revision tags: netbsd-1-6-base eeh-devprop-base
# 1.27 17-Mar-2002 atatat

branches: 1.27.4; 1.27.6;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.


# 1.26 13-Mar-2002 ad

Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.


Revision tags: newlock-base ifpoll-base
# 1.25 13-Nov-2001 lukem

add/cleanup RCSIDs


Revision tags: thorpej-mips-cache-base thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base
# 1.24 22-Aug-2001 nisimura

Nuke fb_devconfig data structure which was found unnecessary to have.


# 1.23 05-Aug-2001 jdolecek

use unsigned variable types as appropriate


Revision tags: thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.22 09-Apr-2001 nathanw

branches: 1.22.2;
Fix spelling errors in comments.


# 1.21 27-Oct-2000 nisimura

branches: 1.21.2;
Fix errors in initializing the software copy of 256 entry colormap
stored in device softc. rasops_cmap[] array is orginazed in 256
iteration of 3 byte long RBG triplet, which does not match with
struct wsdisplay_cmap design.


# 1.20 12-Sep-2000 nisimura

Found glyph pixel order inverted on screen.


# 1.19 28-Jun-2000 mrg

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>


# 1.18 26-Jun-2000 simonb

Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base
# 1.17 16-Mar-2000 nisimura

branches: 1.17.4;
Place 34 by 80 console at the center of screen.


# 1.16 14-Mar-2000 nisimura

Respect video console colour designation by configration file.


# 1.15 14-Mar-2000 nisimura

Switch to improved flexible video console text rasterizer provided by
rasops and wsfont.


Revision tags: chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.14 06-Dec-1999 drochner

update for changed struct wsdisplay_accessops:show_screen signature.
no functional changes


# 1.13 29-Nov-1999 nisimura

Const poisoning.


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.12 19-Oct-1999 nisimura

branches: 1.12.2;
Enable 'WSSCREEN_REVERSE' scr-capability.


Revision tags: chs-ubc2-base
# 1.11 07-May-1999 nisimura

branches: 1.11.2; 1.11.4;
- Sweep abit preparing for code merge to have common 'vdacops' across
various graphics cards.


# 1.10 30-Apr-1999 nisimura

- Nuke debugging aids mistakenly committed.


# 1.9 30-Apr-1999 nisimura

- I finally learned CSR_A register of IMS G332 VDAC must be treated as
write only. Read-motify-write operation breaks its video mode.
- VDAC regiters are now initialized as ULTRIX does.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.8 29-Mar-1999 nisimura

branches: 1.8.4;
- Unnecessary to have '#include <machine/autoconf.h>' for those.


# 1.7 24-Mar-1999 mrg

completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.


# 1.6 11-Jan-1999 drochner

remove dummy "load_font" entries


Revision tags: kenh-if-detach-base
# 1.5 19-Nov-1998 mrg

fix problems in many d_mmap routines:
- returned EOPNOTSUPP rather than -1.
- no check for negative offset.
many of these fix potential security problems in these drivers.


XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
paddr_t (*d_mmap) __P((dev_t, off_t, int));

by someone!


# 1.4 19-Nov-1998 nisimura

- Fix an error in cursor color manipulation. 24bit RGB value was mistakenly
assigned to unsigned short variable.
- XXX PMAG-DV is supposed to emit virtical retrace interrupt, which can be
used for colormap/cursor update just like other TURBOchannel framebuffers.


# 1.3 09-Nov-1998 nisimura

- Fix many errors in cursor image manipulation. Hardware expect 2
bit/pixel format, not planer format. Assign MSB for cursor mask and
LSB for cursor image, where 10 means mask color and 11 for image color.
Image bit order of Bt431 and Bt459 are opposite to MIPS/Alpha processors
while IMS G332 and DC503 (PCC) are indentical.
- Assume that cursor images are 32 pixel padded as ULTRIX/DU ws interface
do. It's natural to X server.
- XXX Vast majority of codes are duplicated between mfb<->tfb and cfb<->sfb.
Code sharing might be achieved in the context of TGA/SFB+ merge.


Revision tags: chs-ubc-base
# 1.2 30-Oct-1998 nisimura

- Assign copyright terms.


# 1.1 29-Oct-1998 nisimura

- Introduce MI NWSCONS drivers for TURBOchannel framebuffer option cards.

N.B., Digital UNIX never supports neither PMAG-AA (mfb) nor PMAG-BA (cfb)
for TC Alphas. PMAG-DV (xcfb) is Personal DECstation built in. All should
be good for console, but need much works for cursor/colormap completeness.