History log of /openbsd-current/sys/arch/sparc64/dev/pcons.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.29 14-May-2024 jsg

remove prototypes with no matching function


# 1.28 13-Apr-2024 jsg

correct indentation

no functional change, found by smatch warnings
ok miod@ bluhm@


Revision tags: OPENBSD_7_3_BASE OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.27 16-Oct-2022 jsg

Change function definitions using the identifier-list form used in the
1st edition of Kernighan and Ritchie's The C Programming Language, to
that of the parameter-type-list form described in the ANSI X3.159-1989
standard.

In ISO/IEC 9899:2023 drafts, there is only one form of function definition.
"N2432 Remove support for function definitions with identifier lists".

ok kettenis@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.26 24-Oct-2021 mpi

Constify struct cfattach.

ok visa@ a long time ago


Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.25 25-May-2020 jsg

change wsdisplay attribute type from long to uint32_t

miod explained it was initially a long as it was thought drivers may
need to allocate storage but in practice they don't need more than
32 bits for an attribute.

suggested and reviewed by miod@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.24 19-Feb-2018 mpi

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@


# 1.23 30-Dec-2017 guenther

Delete unnecessary <sys/file.h> includes

ok millert@ krw@


Revision tags: OPENBSD_6_2_BASE
# 1.22 30-Apr-2017 mpi

Rename Debugger() into db_enter().

Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.

ok deraadt@, kettenis@, visa@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.21 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.20 20-Oct-2013 miod

Use C99 named initializers for struct wsdisplay_accessops fields.
No functional change.


# 1.19 18-Oct-2013 miod

Make sure that, when a particular mapchar() can't find a proper glyph for the
requested character in the font it is using, it suggests a question mark
character, instead of a space, so that the existence of the non-representable
character becomes visible.

Note that this is consistent with pcdisplay which suggests a diamond for
missing glyphs.


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.18 28-Jun-2010 deraadt

Allow tty drivers to request larger buffers at attach time using a
max-baud-rate hint. Adjust TTYHOG (the nearly full logic) to this new
situation. The larger buffers are required by the very high speed
KDDI devices in Japan (CF com, or USB ucom) so those are the only two
drivers which currently ask for a larger buffer size.
ok yasuoka miod


# 1.17 12-Apr-2010 tedu

Some of the line disciplines want to check for suser. Better to pass them
a process instead of using curproc. ok deraadt


Revision tags: OPENBSD_4_7_BASE
# 1.16 09-Nov-2009 nicm

Every selwakeup() should have a matching KNOTE() (even if kqueue isn't
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).

Based on a diff from tedu.

ok deraadt


# 1.15 31-Oct-2009 deraadt

Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()
calls can go directly into selwakeup() safely
long discussion with nicm, murmers of consent from tedu and miod, noone
else seems to care of kqueue is busted as long as it makes their sockets
move data fast... pretty sad.


# 1.14 05-Sep-2009 miod

Change the wsdisplay_emulops return types from void to int; emulops will now
return zero on success and nonzero on failure.
This commit only performs mechanical changes for the existing emulops to
always return zero.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.13 14-Nov-2007 kettenis

Remove eeprom.h.


# 1.12 13-Nov-2007 kettenis

Remove bsd_openprom.h.


Revision tags: OPENBSD_4_2_BASE
# 1.11 29-Jun-2007 deraadt

sick of extra static messing up tracebacks; ok miod


Revision tags: OPENBSD_4_1_BASE
# 1.10 07-Mar-2007 miod

For unsupported (yet) Expert3D style frame buffers, attach pcons and attach
a really dumb wsdisplay to pcons, so that wskbd/wsmouse input drivers can be
used for input, and prom for output.

This is a band-aid for the release, so that people with such frame buffers
do not need to unplug them or switch to serial console to install OpenBSD.

Probably not the best way to do this, but this one has a minimal footprint
and no tentacles in wscons.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.9 26-Apr-2005 miod

Remove unused hooks for periodic pcons polling.


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 13-Sep-2004 deraadt

for pcons tty and kernel console (ie. boot -a) input, replace prom ^H
with ^? as that is what we have standardized on for all delete keys.
this got missed, meaning boot -a and RAMDISK console tty were gross.
ok miod


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.7 03-Oct-2003 miod

Merge tty_attach() in ttymalloc() and tty_detach() in ttyfree(). The need for
separate tty registering is gone now that sparc has switched to wscons, and
this makes the code less error-prone.

Also, remove tests for ttymalloc() failure, since it uses M_WAITOK.

ok millert@ deraadt@, tested by various people as well besides me...


Revision tags: OPENBSD_3_4_BASE
# 1.6 15-Aug-2003 tedu

change arguments to suser. suser now takes the process, and a flags
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 14-Mar-2002 millert

Final __P removal plus some cosmetic fixups


# 1.4 14-Mar-2002 millert

First round of __P removal in sys


Revision tags: UBC_BASE
# 1.3 08-Dec-2001 miod

branches: 1.3.2;
db_console is declared in <ddb/db_var.h>. Fix a typo while there, too.


Revision tags: OPENBSD_3_0_BASE
# 1.2 04-Sep-2001 art

branches: 1.2.4;
Don't forget tty_attach. Should fix the timeout related panics.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications


# 1.28 13-Apr-2024 jsg

correct indentation

no functional change, found by smatch warnings
ok miod@ bluhm@


Revision tags: OPENBSD_7_3_BASE OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.27 16-Oct-2022 jsg

Change function definitions using the identifier-list form used in the
1st edition of Kernighan and Ritchie's The C Programming Language, to
that of the parameter-type-list form described in the ANSI X3.159-1989
standard.

In ISO/IEC 9899:2023 drafts, there is only one form of function definition.
"N2432 Remove support for function definitions with identifier lists".

ok kettenis@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.26 24-Oct-2021 mpi

Constify struct cfattach.

ok visa@ a long time ago


Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.25 25-May-2020 jsg

change wsdisplay attribute type from long to uint32_t

miod explained it was initially a long as it was thought drivers may
need to allocate storage but in practice they don't need more than
32 bits for an attribute.

suggested and reviewed by miod@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.24 19-Feb-2018 mpi

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@


# 1.23 30-Dec-2017 guenther

Delete unnecessary <sys/file.h> includes

ok millert@ krw@


Revision tags: OPENBSD_6_2_BASE
# 1.22 30-Apr-2017 mpi

Rename Debugger() into db_enter().

Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.

ok deraadt@, kettenis@, visa@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.21 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.20 20-Oct-2013 miod

Use C99 named initializers for struct wsdisplay_accessops fields.
No functional change.


# 1.19 18-Oct-2013 miod

Make sure that, when a particular mapchar() can't find a proper glyph for the
requested character in the font it is using, it suggests a question mark
character, instead of a space, so that the existence of the non-representable
character becomes visible.

Note that this is consistent with pcdisplay which suggests a diamond for
missing glyphs.


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.18 28-Jun-2010 deraadt

Allow tty drivers to request larger buffers at attach time using a
max-baud-rate hint. Adjust TTYHOG (the nearly full logic) to this new
situation. The larger buffers are required by the very high speed
KDDI devices in Japan (CF com, or USB ucom) so those are the only two
drivers which currently ask for a larger buffer size.
ok yasuoka miod


# 1.17 12-Apr-2010 tedu

Some of the line disciplines want to check for suser. Better to pass them
a process instead of using curproc. ok deraadt


Revision tags: OPENBSD_4_7_BASE
# 1.16 09-Nov-2009 nicm

Every selwakeup() should have a matching KNOTE() (even if kqueue isn't
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).

Based on a diff from tedu.

ok deraadt


# 1.15 31-Oct-2009 deraadt

Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()
calls can go directly into selwakeup() safely
long discussion with nicm, murmers of consent from tedu and miod, noone
else seems to care of kqueue is busted as long as it makes their sockets
move data fast... pretty sad.


# 1.14 05-Sep-2009 miod

Change the wsdisplay_emulops return types from void to int; emulops will now
return zero on success and nonzero on failure.
This commit only performs mechanical changes for the existing emulops to
always return zero.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.13 14-Nov-2007 kettenis

Remove eeprom.h.


# 1.12 13-Nov-2007 kettenis

Remove bsd_openprom.h.


Revision tags: OPENBSD_4_2_BASE
# 1.11 29-Jun-2007 deraadt

sick of extra static messing up tracebacks; ok miod


Revision tags: OPENBSD_4_1_BASE
# 1.10 07-Mar-2007 miod

For unsupported (yet) Expert3D style frame buffers, attach pcons and attach
a really dumb wsdisplay to pcons, so that wskbd/wsmouse input drivers can be
used for input, and prom for output.

This is a band-aid for the release, so that people with such frame buffers
do not need to unplug them or switch to serial console to install OpenBSD.

Probably not the best way to do this, but this one has a minimal footprint
and no tentacles in wscons.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.9 26-Apr-2005 miod

Remove unused hooks for periodic pcons polling.


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 13-Sep-2004 deraadt

for pcons tty and kernel console (ie. boot -a) input, replace prom ^H
with ^? as that is what we have standardized on for all delete keys.
this got missed, meaning boot -a and RAMDISK console tty were gross.
ok miod


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.7 03-Oct-2003 miod

Merge tty_attach() in ttymalloc() and tty_detach() in ttyfree(). The need for
separate tty registering is gone now that sparc has switched to wscons, and
this makes the code less error-prone.

Also, remove tests for ttymalloc() failure, since it uses M_WAITOK.

ok millert@ deraadt@, tested by various people as well besides me...


Revision tags: OPENBSD_3_4_BASE
# 1.6 15-Aug-2003 tedu

change arguments to suser. suser now takes the process, and a flags
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 14-Mar-2002 millert

Final __P removal plus some cosmetic fixups


# 1.4 14-Mar-2002 millert

First round of __P removal in sys


Revision tags: UBC_BASE
# 1.3 08-Dec-2001 miod

branches: 1.3.2;
db_console is declared in <ddb/db_var.h>. Fix a typo while there, too.


Revision tags: OPENBSD_3_0_BASE
# 1.2 04-Sep-2001 art

branches: 1.2.4;
Don't forget tty_attach. Should fix the timeout related panics.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications


# 1.27 16-Oct-2022 jsg

Change function definitions using the identifier-list form used in the
1st edition of Kernighan and Ritchie's The C Programming Language, to
that of the parameter-type-list form described in the ANSI X3.159-1989
standard.

In ISO/IEC 9899:2023 drafts, there is only one form of function definition.
"N2432 Remove support for function definitions with identifier lists".

ok kettenis@


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.26 24-Oct-2021 mpi

Constify struct cfattach.

ok visa@ a long time ago


Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.25 25-May-2020 jsg

change wsdisplay attribute type from long to uint32_t

miod explained it was initially a long as it was thought drivers may
need to allocate storage but in practice they don't need more than
32 bits for an attribute.

suggested and reviewed by miod@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.24 19-Feb-2018 mpi

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@


# 1.23 30-Dec-2017 guenther

Delete unnecessary <sys/file.h> includes

ok millert@ krw@


Revision tags: OPENBSD_6_2_BASE
# 1.22 30-Apr-2017 mpi

Rename Debugger() into db_enter().

Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.

ok deraadt@, kettenis@, visa@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.21 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.20 20-Oct-2013 miod

Use C99 named initializers for struct wsdisplay_accessops fields.
No functional change.


# 1.19 18-Oct-2013 miod

Make sure that, when a particular mapchar() can't find a proper glyph for the
requested character in the font it is using, it suggests a question mark
character, instead of a space, so that the existence of the non-representable
character becomes visible.

Note that this is consistent with pcdisplay which suggests a diamond for
missing glyphs.


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.18 28-Jun-2010 deraadt

Allow tty drivers to request larger buffers at attach time using a
max-baud-rate hint. Adjust TTYHOG (the nearly full logic) to this new
situation. The larger buffers are required by the very high speed
KDDI devices in Japan (CF com, or USB ucom) so those are the only two
drivers which currently ask for a larger buffer size.
ok yasuoka miod


# 1.17 12-Apr-2010 tedu

Some of the line disciplines want to check for suser. Better to pass them
a process instead of using curproc. ok deraadt


Revision tags: OPENBSD_4_7_BASE
# 1.16 09-Nov-2009 nicm

Every selwakeup() should have a matching KNOTE() (even if kqueue isn't
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).

Based on a diff from tedu.

ok deraadt


# 1.15 31-Oct-2009 deraadt

Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()
calls can go directly into selwakeup() safely
long discussion with nicm, murmers of consent from tedu and miod, noone
else seems to care of kqueue is busted as long as it makes their sockets
move data fast... pretty sad.


# 1.14 05-Sep-2009 miod

Change the wsdisplay_emulops return types from void to int; emulops will now
return zero on success and nonzero on failure.
This commit only performs mechanical changes for the existing emulops to
always return zero.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.13 14-Nov-2007 kettenis

Remove eeprom.h.


# 1.12 13-Nov-2007 kettenis

Remove bsd_openprom.h.


Revision tags: OPENBSD_4_2_BASE
# 1.11 29-Jun-2007 deraadt

sick of extra static messing up tracebacks; ok miod


Revision tags: OPENBSD_4_1_BASE
# 1.10 07-Mar-2007 miod

For unsupported (yet) Expert3D style frame buffers, attach pcons and attach
a really dumb wsdisplay to pcons, so that wskbd/wsmouse input drivers can be
used for input, and prom for output.

This is a band-aid for the release, so that people with such frame buffers
do not need to unplug them or switch to serial console to install OpenBSD.

Probably not the best way to do this, but this one has a minimal footprint
and no tentacles in wscons.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.9 26-Apr-2005 miod

Remove unused hooks for periodic pcons polling.


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 13-Sep-2004 deraadt

for pcons tty and kernel console (ie. boot -a) input, replace prom ^H
with ^? as that is what we have standardized on for all delete keys.
this got missed, meaning boot -a and RAMDISK console tty were gross.
ok miod


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.7 03-Oct-2003 miod

Merge tty_attach() in ttymalloc() and tty_detach() in ttyfree(). The need for
separate tty registering is gone now that sparc has switched to wscons, and
this makes the code less error-prone.

Also, remove tests for ttymalloc() failure, since it uses M_WAITOK.

ok millert@ deraadt@, tested by various people as well besides me...


Revision tags: OPENBSD_3_4_BASE
# 1.6 15-Aug-2003 tedu

change arguments to suser. suser now takes the process, and a flags
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 14-Mar-2002 millert

Final __P removal plus some cosmetic fixups


# 1.4 14-Mar-2002 millert

First round of __P removal in sys


Revision tags: UBC_BASE
# 1.3 08-Dec-2001 miod

branches: 1.3.2;
db_console is declared in <ddb/db_var.h>. Fix a typo while there, too.


Revision tags: OPENBSD_3_0_BASE
# 1.2 04-Sep-2001 art

branches: 1.2.4;
Don't forget tty_attach. Should fix the timeout related panics.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications


# 1.26 24-Oct-2021 mpi

Constify struct cfattach.

ok visa@ a long time ago


Revision tags: OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
# 1.25 25-May-2020 jsg

change wsdisplay attribute type from long to uint32_t

miod explained it was initially a long as it was thought drivers may
need to allocate storage but in practice they don't need more than
32 bits for an attribute.

suggested and reviewed by miod@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.24 19-Feb-2018 mpi

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@


# 1.23 30-Dec-2017 guenther

Delete unnecessary <sys/file.h> includes

ok millert@ krw@


Revision tags: OPENBSD_6_2_BASE
# 1.22 30-Apr-2017 mpi

Rename Debugger() into db_enter().

Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.

ok deraadt@, kettenis@, visa@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.21 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.20 20-Oct-2013 miod

Use C99 named initializers for struct wsdisplay_accessops fields.
No functional change.


# 1.19 18-Oct-2013 miod

Make sure that, when a particular mapchar() can't find a proper glyph for the
requested character in the font it is using, it suggests a question mark
character, instead of a space, so that the existence of the non-representable
character becomes visible.

Note that this is consistent with pcdisplay which suggests a diamond for
missing glyphs.


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.18 28-Jun-2010 deraadt

Allow tty drivers to request larger buffers at attach time using a
max-baud-rate hint. Adjust TTYHOG (the nearly full logic) to this new
situation. The larger buffers are required by the very high speed
KDDI devices in Japan (CF com, or USB ucom) so those are the only two
drivers which currently ask for a larger buffer size.
ok yasuoka miod


# 1.17 12-Apr-2010 tedu

Some of the line disciplines want to check for suser. Better to pass them
a process instead of using curproc. ok deraadt


Revision tags: OPENBSD_4_7_BASE
# 1.16 09-Nov-2009 nicm

Every selwakeup() should have a matching KNOTE() (even if kqueue isn't
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).

Based on a diff from tedu.

ok deraadt


# 1.15 31-Oct-2009 deraadt

Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()
calls can go directly into selwakeup() safely
long discussion with nicm, murmers of consent from tedu and miod, noone
else seems to care of kqueue is busted as long as it makes their sockets
move data fast... pretty sad.


# 1.14 05-Sep-2009 miod

Change the wsdisplay_emulops return types from void to int; emulops will now
return zero on success and nonzero on failure.
This commit only performs mechanical changes for the existing emulops to
always return zero.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.13 14-Nov-2007 kettenis

Remove eeprom.h.


# 1.12 13-Nov-2007 kettenis

Remove bsd_openprom.h.


Revision tags: OPENBSD_4_2_BASE
# 1.11 29-Jun-2007 deraadt

sick of extra static messing up tracebacks; ok miod


Revision tags: OPENBSD_4_1_BASE
# 1.10 07-Mar-2007 miod

For unsupported (yet) Expert3D style frame buffers, attach pcons and attach
a really dumb wsdisplay to pcons, so that wskbd/wsmouse input drivers can be
used for input, and prom for output.

This is a band-aid for the release, so that people with such frame buffers
do not need to unplug them or switch to serial console to install OpenBSD.

Probably not the best way to do this, but this one has a minimal footprint
and no tentacles in wscons.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.9 26-Apr-2005 miod

Remove unused hooks for periodic pcons polling.


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 13-Sep-2004 deraadt

for pcons tty and kernel console (ie. boot -a) input, replace prom ^H
with ^? as that is what we have standardized on for all delete keys.
this got missed, meaning boot -a and RAMDISK console tty were gross.
ok miod


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.7 03-Oct-2003 miod

Merge tty_attach() in ttymalloc() and tty_detach() in ttyfree(). The need for
separate tty registering is gone now that sparc has switched to wscons, and
this makes the code less error-prone.

Also, remove tests for ttymalloc() failure, since it uses M_WAITOK.

ok millert@ deraadt@, tested by various people as well besides me...


Revision tags: OPENBSD_3_4_BASE
# 1.6 15-Aug-2003 tedu

change arguments to suser. suser now takes the process, and a flags
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 14-Mar-2002 millert

Final __P removal plus some cosmetic fixups


# 1.4 14-Mar-2002 millert

First round of __P removal in sys


Revision tags: UBC_BASE
# 1.3 08-Dec-2001 miod

branches: 1.3.2;
db_console is declared in <ddb/db_var.h>. Fix a typo while there, too.


Revision tags: OPENBSD_3_0_BASE
# 1.2 04-Sep-2001 art

branches: 1.2.4;
Don't forget tty_attach. Should fix the timeout related panics.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications


# 1.25 25-May-2020 jsg

change wsdisplay attribute type from long to uint32_t

miod explained it was initially a long as it was thought drivers may
need to allocate storage but in practice they don't need more than
32 bits for an attribute.

suggested and reviewed by miod@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.24 19-Feb-2018 mpi

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@


# 1.23 30-Dec-2017 guenther

Delete unnecessary <sys/file.h> includes

ok millert@ krw@


Revision tags: OPENBSD_6_2_BASE
# 1.22 30-Apr-2017 mpi

Rename Debugger() into db_enter().

Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.

ok deraadt@, kettenis@, visa@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.21 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.20 20-Oct-2013 miod

Use C99 named initializers for struct wsdisplay_accessops fields.
No functional change.


# 1.19 18-Oct-2013 miod

Make sure that, when a particular mapchar() can't find a proper glyph for the
requested character in the font it is using, it suggests a question mark
character, instead of a space, so that the existence of the non-representable
character becomes visible.

Note that this is consistent with pcdisplay which suggests a diamond for
missing glyphs.


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.18 28-Jun-2010 deraadt

Allow tty drivers to request larger buffers at attach time using a
max-baud-rate hint. Adjust TTYHOG (the nearly full logic) to this new
situation. The larger buffers are required by the very high speed
KDDI devices in Japan (CF com, or USB ucom) so those are the only two
drivers which currently ask for a larger buffer size.
ok yasuoka miod


# 1.17 12-Apr-2010 tedu

Some of the line disciplines want to check for suser. Better to pass them
a process instead of using curproc. ok deraadt


Revision tags: OPENBSD_4_7_BASE
# 1.16 09-Nov-2009 nicm

Every selwakeup() should have a matching KNOTE() (even if kqueue isn't
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).

Based on a diff from tedu.

ok deraadt


# 1.15 31-Oct-2009 deraadt

Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()
calls can go directly into selwakeup() safely
long discussion with nicm, murmers of consent from tedu and miod, noone
else seems to care of kqueue is busted as long as it makes their sockets
move data fast... pretty sad.


# 1.14 05-Sep-2009 miod

Change the wsdisplay_emulops return types from void to int; emulops will now
return zero on success and nonzero on failure.
This commit only performs mechanical changes for the existing emulops to
always return zero.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.13 14-Nov-2007 kettenis

Remove eeprom.h.


# 1.12 13-Nov-2007 kettenis

Remove bsd_openprom.h.


Revision tags: OPENBSD_4_2_BASE
# 1.11 29-Jun-2007 deraadt

sick of extra static messing up tracebacks; ok miod


Revision tags: OPENBSD_4_1_BASE
# 1.10 07-Mar-2007 miod

For unsupported (yet) Expert3D style frame buffers, attach pcons and attach
a really dumb wsdisplay to pcons, so that wskbd/wsmouse input drivers can be
used for input, and prom for output.

This is a band-aid for the release, so that people with such frame buffers
do not need to unplug them or switch to serial console to install OpenBSD.

Probably not the best way to do this, but this one has a minimal footprint
and no tentacles in wscons.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.9 26-Apr-2005 miod

Remove unused hooks for periodic pcons polling.


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 13-Sep-2004 deraadt

for pcons tty and kernel console (ie. boot -a) input, replace prom ^H
with ^? as that is what we have standardized on for all delete keys.
this got missed, meaning boot -a and RAMDISK console tty were gross.
ok miod


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.7 03-Oct-2003 miod

Merge tty_attach() in ttymalloc() and tty_detach() in ttyfree(). The need for
separate tty registering is gone now that sparc has switched to wscons, and
this makes the code less error-prone.

Also, remove tests for ttymalloc() failure, since it uses M_WAITOK.

ok millert@ deraadt@, tested by various people as well besides me...


Revision tags: OPENBSD_3_4_BASE
# 1.6 15-Aug-2003 tedu

change arguments to suser. suser now takes the process, and a flags
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 14-Mar-2002 millert

Final __P removal plus some cosmetic fixups


# 1.4 14-Mar-2002 millert

First round of __P removal in sys


Revision tags: UBC_BASE
# 1.3 08-Dec-2001 miod

branches: 1.3.2;
db_console is declared in <ddb/db_var.h>. Fix a typo while there, too.


Revision tags: OPENBSD_3_0_BASE
# 1.2 04-Sep-2001 art

branches: 1.2.4;
Don't forget tty_attach. Should fix the timeout related panics.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications


# 1.24 19-Feb-2018 mpi

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@


# 1.23 30-Dec-2017 guenther

Delete unnecessary <sys/file.h> includes

ok millert@ krw@


Revision tags: OPENBSD_6_2_BASE
# 1.22 30-Apr-2017 mpi

Rename Debugger() into db_enter().

Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.

ok deraadt@, kettenis@, visa@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.21 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.20 20-Oct-2013 miod

Use C99 named initializers for struct wsdisplay_accessops fields.
No functional change.


# 1.19 18-Oct-2013 miod

Make sure that, when a particular mapchar() can't find a proper glyph for the
requested character in the font it is using, it suggests a question mark
character, instead of a space, so that the existence of the non-representable
character becomes visible.

Note that this is consistent with pcdisplay which suggests a diamond for
missing glyphs.


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.18 28-Jun-2010 deraadt

Allow tty drivers to request larger buffers at attach time using a
max-baud-rate hint. Adjust TTYHOG (the nearly full logic) to this new
situation. The larger buffers are required by the very high speed
KDDI devices in Japan (CF com, or USB ucom) so those are the only two
drivers which currently ask for a larger buffer size.
ok yasuoka miod


# 1.17 12-Apr-2010 tedu

Some of the line disciplines want to check for suser. Better to pass them
a process instead of using curproc. ok deraadt


Revision tags: OPENBSD_4_7_BASE
# 1.16 09-Nov-2009 nicm

Every selwakeup() should have a matching KNOTE() (even if kqueue isn't
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).

Based on a diff from tedu.

ok deraadt


# 1.15 31-Oct-2009 deraadt

Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()
calls can go directly into selwakeup() safely
long discussion with nicm, murmers of consent from tedu and miod, noone
else seems to care of kqueue is busted as long as it makes their sockets
move data fast... pretty sad.


# 1.14 05-Sep-2009 miod

Change the wsdisplay_emulops return types from void to int; emulops will now
return zero on success and nonzero on failure.
This commit only performs mechanical changes for the existing emulops to
always return zero.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.13 14-Nov-2007 kettenis

Remove eeprom.h.


# 1.12 13-Nov-2007 kettenis

Remove bsd_openprom.h.


Revision tags: OPENBSD_4_2_BASE
# 1.11 29-Jun-2007 deraadt

sick of extra static messing up tracebacks; ok miod


Revision tags: OPENBSD_4_1_BASE
# 1.10 07-Mar-2007 miod

For unsupported (yet) Expert3D style frame buffers, attach pcons and attach
a really dumb wsdisplay to pcons, so that wskbd/wsmouse input drivers can be
used for input, and prom for output.

This is a band-aid for the release, so that people with such frame buffers
do not need to unplug them or switch to serial console to install OpenBSD.

Probably not the best way to do this, but this one has a minimal footprint
and no tentacles in wscons.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.9 26-Apr-2005 miod

Remove unused hooks for periodic pcons polling.


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 13-Sep-2004 deraadt

for pcons tty and kernel console (ie. boot -a) input, replace prom ^H
with ^? as that is what we have standardized on for all delete keys.
this got missed, meaning boot -a and RAMDISK console tty were gross.
ok miod


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.7 03-Oct-2003 miod

Merge tty_attach() in ttymalloc() and tty_detach() in ttyfree(). The need for
separate tty registering is gone now that sparc has switched to wscons, and
this makes the code less error-prone.

Also, remove tests for ttymalloc() failure, since it uses M_WAITOK.

ok millert@ deraadt@, tested by various people as well besides me...


Revision tags: OPENBSD_3_4_BASE
# 1.6 15-Aug-2003 tedu

change arguments to suser. suser now takes the process, and a flags
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 14-Mar-2002 millert

Final __P removal plus some cosmetic fixups


# 1.4 14-Mar-2002 millert

First round of __P removal in sys


Revision tags: UBC_BASE
# 1.3 08-Dec-2001 miod

branches: 1.3.2;
db_console is declared in <ddb/db_var.h>. Fix a typo while there, too.


Revision tags: OPENBSD_3_0_BASE
# 1.2 04-Sep-2001 art

branches: 1.2.4;
Don't forget tty_attach. Should fix the timeout related panics.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications


# 1.23 30-Dec-2017 guenther

Delete unnecessary <sys/file.h> includes

ok millert@ krw@


Revision tags: OPENBSD_6_2_BASE
# 1.22 30-Apr-2017 mpi

Rename Debugger() into db_enter().

Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.

ok deraadt@, kettenis@, visa@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.21 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.20 20-Oct-2013 miod

Use C99 named initializers for struct wsdisplay_accessops fields.
No functional change.


# 1.19 18-Oct-2013 miod

Make sure that, when a particular mapchar() can't find a proper glyph for the
requested character in the font it is using, it suggests a question mark
character, instead of a space, so that the existence of the non-representable
character becomes visible.

Note that this is consistent with pcdisplay which suggests a diamond for
missing glyphs.


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.18 28-Jun-2010 deraadt

Allow tty drivers to request larger buffers at attach time using a
max-baud-rate hint. Adjust TTYHOG (the nearly full logic) to this new
situation. The larger buffers are required by the very high speed
KDDI devices in Japan (CF com, or USB ucom) so those are the only two
drivers which currently ask for a larger buffer size.
ok yasuoka miod


# 1.17 12-Apr-2010 tedu

Some of the line disciplines want to check for suser. Better to pass them
a process instead of using curproc. ok deraadt


Revision tags: OPENBSD_4_7_BASE
# 1.16 09-Nov-2009 nicm

Every selwakeup() should have a matching KNOTE() (even if kqueue isn't
supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and
remove it from any occurences where both are used, except one for kqueue itself
and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag).

Based on a diff from tedu.

ok deraadt


# 1.15 31-Oct-2009 deraadt

Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()
calls can go directly into selwakeup() safely
long discussion with nicm, murmers of consent from tedu and miod, noone
else seems to care of kqueue is busted as long as it makes their sockets
move data fast... pretty sad.


# 1.14 05-Sep-2009 miod

Change the wsdisplay_emulops return types from void to int; emulops will now
return zero on success and nonzero on failure.
This commit only performs mechanical changes for the existing emulops to
always return zero.


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.13 14-Nov-2007 kettenis

Remove eeprom.h.


# 1.12 13-Nov-2007 kettenis

Remove bsd_openprom.h.


Revision tags: OPENBSD_4_2_BASE
# 1.11 29-Jun-2007 deraadt

sick of extra static messing up tracebacks; ok miod


Revision tags: OPENBSD_4_1_BASE
# 1.10 07-Mar-2007 miod

For unsupported (yet) Expert3D style frame buffers, attach pcons and attach
a really dumb wsdisplay to pcons, so that wskbd/wsmouse input drivers can be
used for input, and prom for output.

This is a band-aid for the release, so that people with such frame buffers
do not need to unplug them or switch to serial console to install OpenBSD.

Probably not the best way to do this, but this one has a minimal footprint
and no tentacles in wscons.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.9 26-Apr-2005 miod

Remove unused hooks for periodic pcons polling.


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.8 13-Sep-2004 deraadt

for pcons tty and kernel console (ie. boot -a) input, replace prom ^H
with ^? as that is what we have standardized on for all delete keys.
this got missed, meaning boot -a and RAMDISK console tty were gross.
ok miod


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.7 03-Oct-2003 miod

Merge tty_attach() in ttymalloc() and tty_detach() in ttyfree(). The need for
separate tty registering is gone now that sparc has switched to wscons, and
this makes the code less error-prone.

Also, remove tests for ttymalloc() failure, since it uses M_WAITOK.

ok millert@ deraadt@, tested by various people as well besides me...


Revision tags: OPENBSD_3_4_BASE
# 1.6 15-Aug-2003 tedu

change arguments to suser. suser now takes the process, and a flags
argument. old cred only calls user suser_ucred. this will allow future
work to more flexibly implement the idea of a root process. looks like
something i saw in freebsd, but a little different.
use of suser_ucred vs suser in file system code should be looked at again,
for the moment semantics remain unchanged.
review and input from art@ testing and further review miod@


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE UBC_SYNC_A UBC_SYNC_B
# 1.5 14-Mar-2002 millert

Final __P removal plus some cosmetic fixups


# 1.4 14-Mar-2002 millert

First round of __P removal in sys


Revision tags: UBC_BASE
# 1.3 08-Dec-2001 miod

branches: 1.3.2;
db_console is declared in <ddb/db_var.h>. Fix a typo while there, too.


Revision tags: OPENBSD_3_0_BASE
# 1.2 04-Sep-2001 art

branches: 1.2.4;
Don't forget tty_attach. Should fix the timeout related panics.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications