History log of /src/sys/ddb/db_output.c |
Revision | | Date | Author | Comments |
1.38 |
| 07-Oct-2023 |
ad | Oops, fix crash(8) build
|
1.37 |
| 07-Oct-2023 |
ad | Add db_print_timespec().
|
1.36 |
| 26-Jan-2020 |
uwe | Fix typo in comment.
|
1.35 |
| 12-Sep-2019 |
uwe | branches: 1.35.2; db_putchar - check if we need to wrap at $maxwidth after whitespace. That fixes orphaned first character in something like:
|Stopped in ... longsymbol+0xf00: | |i |nsn
|
1.34 |
| 16-Sep-2018 |
mrg | branches: 1.34.4; call cnpollc(1) and cnpollc(0) around cngetc().
(christos has a good idea to add a function that does all 3, and we should switch all the callers in this sequence to use it (and fix the MD ones missing it still). not all can, as eg, line-grabbing functions can use cngetsn(), which only calls cnpollc() twice.)
|
1.33 |
| 01-Sep-2012 |
matt | branches: 1.33.32; 1.33.38; 1.33.40; Use _KERNEL_OPT
|
1.32 |
| 01-Sep-2012 |
matt | Make DB_MAX_LINES a kernel option
|
1.31 |
| 17-Jul-2011 |
joerg | branches: 1.31.2; Retire varargs.h support. Move machine/stdarg.h logic into MI sys/stdarg.h and expect compiler to provide proper builtins, defaulting to the GCC interface. lint still has a special fallback. Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and derive va_list as required by standards.
|
1.30 |
| 07-Mar-2009 |
ad | Make ddb compile and work in userspace. Mostly this is comprised of three types of changes:
- Add a few new methods to replace stuff like p_find(), CPU_INFO_FOREACH.
- Use db_read_bytes() instead of accessing kernel structures directly, and similar changes.
- Add ifdef _KERNEL where the above hasn't been done, and an XXX comment.
|
1.29 |
| 11-Dec-2005 |
christos | branches: 1.29.74; 1.29.84; 1.29.90; merge ktrace-lwp.
|
1.28 |
| 29-May-2005 |
christos | Add lots of const.
|
1.27 |
| 15-Feb-2002 |
simonb | branches: 1.27.16; ANSIfy, KNF. Make some variables and functions static when not used outside of a module. Make variables in headers extern. Delete the unused db_find_watchpoint() function.
|
1.26 |
| 12-Nov-2001 |
lukem | add RCSIDs
|
1.25 |
| 01-Jul-2001 |
mrg | branches: 1.25.2; allow one to #define DB_MAX_LINE and DB_MAX_WIDTH independantly.
|
1.24 |
| 24-Feb-2001 |
cgd | branches: 1.24.2; Avoid crud after #endif.
|
1.23 |
| 09-Aug-2000 |
tv | Add two new functions, db_format_radix() and db_format_hex(), which supplant the former %r and %z nonstandard kprintf strings.
|
1.22 |
| 30-Mar-2000 |
augustss | Die, register, die!
|
1.21 |
| 08-Mar-2000 |
jdolecek | Fix obvious off-by-one error in db_output(). Fixes kern/9570 by John Hawkinson.
|
1.20 |
| 28-Oct-1999 |
lukem | - change db_cmd_list() to list commands vertically rather than horizontally - sort entries in the various command tables, so that the `help' lists are easier to use. this included hacking db_machine_commands_install() to search for the "machine" entry to change the `more cmds' pointer, rather than assuming it was the first entry - add a `sync' command, which is effectively `reboot 0x100'. - remove db_help_cmd(); it was unused (and was almost a duplicate of db_cmd_list()). - move some extern decls to db_output.h, since they're used in more than one place now - rename NEXT_TAB to DB_NEXT_TAB and move to db_output.h
|
1.19 |
| 12-Apr-1999 |
pk | branches: 1.19.2; 1.19.4; 1.19.6; Quote "AS IS" as in the majority of Carnegy Mellon notices.
|
1.18 |
| 06-Apr-1999 |
pk | Fix a pasto in copyright text which has been procreating like rabbits..
|
1.17 |
| 24-Oct-1997 |
chuck | branches: 1.17.8; kill db_ksprintn, db_printf_guts, kdbprintf, db_printf. db_printf moves to kern/subr_prf.c and uses the new kprintf located there.
|
1.16 |
| 03-Feb-1997 |
cgd | needs systm.h for prototypes
|
1.15 |
| 28-Oct-1996 |
fvdl | Make this compile with -Wcast-qual
|
1.14 |
| 25-Sep-1996 |
christos | Recognize %.2x as %02x
|
1.13 |
| 01-Apr-1996 |
christos | Fix cut'n'paste'o in %p previous fix.
|
1.12 |
| 31-Mar-1996 |
christos | Recognize %p formats so that ps/m works in ddb
|
1.11 |
| 30-Mar-1996 |
christos | - Fix db_printf format args. - Recognize ':' as recursive printf; fixes PR/835 - cleanup error(1) output.
|
1.10 |
| 05-Feb-1996 |
christos | DDB prototype changes.
|
1.9 |
| 16-Oct-1995 |
mycroft | Fix nits pointed out by GCC 2.7.
|
1.8 |
| 29-Jun-1994 |
deraadt | knf
|
1.7 |
| 29-Jun-1994 |
cgd | New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD'
|
1.6 |
| 18-Dec-1993 |
mycroft | Canonicalize all #includes.
|
1.5 |
| 02-Aug-1993 |
mycroft | branches: 1.5.2; Add RCS identifiers, remove some completely useless RCS logs and patchkit headers, and a few other insignificant changes.
|
1.4 |
| 15-Jul-1993 |
brezak | Add 'ps' command. Add -more- pager to output from Mach ddb.
|
1.3 |
| 20-May-1993 |
cgd | add explicit rcs id
|
1.2 |
| 21-Mar-1993 |
cgd | after 0.2.2 "stable" patches applied
|
1.1 |
| 21-Mar-1993 |
cgd | branches: 1.1.1; Initial revision
|
1.1.1.1 |
| 21-Mar-1993 |
cgd | initial import of 386bsd-0.1 sources
|
1.5.2.1 |
| 14-Nov-1993 |
mycroft | Canonicalize all #includes.
|
1.17.8.2 |
| 12-Apr-1999 |
pk | branches: 1.17.8.2.2; Pullup copyright text corrections.
|
1.17.8.1 |
| 07-Apr-1999 |
pk | Pull up from trunk: copyright text warts.
|
1.17.8.2.2.1 |
| 21-Jun-1999 |
thorpej | Sync w/ -current.
|
1.19.6.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.19.4.1 |
| 15-Nov-1999 |
fvdl | Sync with -current
|
1.19.2.2 |
| 12-Mar-2001 |
bouyer | Sync with HEAD.
|
1.19.2.1 |
| 20-Nov-2000 |
bouyer | Update thorpej_scsipi to -current as of a month ago
|
1.24.2.3 |
| 28-Feb-2002 |
nathanw | Catch up to -current.
|
1.24.2.2 |
| 14-Nov-2001 |
nathanw | Catch up to -current.
|
1.24.2.1 |
| 24-Aug-2001 |
nathanw | Catch up with -current.
|
1.25.2.2 |
| 16-Mar-2002 |
jdolecek | Catch up with -current.
|
1.25.2.1 |
| 10-Jan-2002 |
thorpej | Sync kqueue branch with -current.
|
1.27.16.1 |
| 10-Nov-2005 |
skrll | Sync with HEAD. Here we go again...
|
1.29.90.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Commit is split, to avoid a "too many arguments" protocol error.
|
1.29.84.1 |
| 28-Apr-2009 |
skrll | Sync with HEAD.
|
1.29.74.1 |
| 04-May-2009 |
yamt | sync with head.
|
1.31.2.1 |
| 30-Oct-2012 |
yamt | sync with head
|
1.33.40.2 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.33.40.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.33.38.1 |
| 30-Sep-2018 |
pgoyette | Ssync with HEAD
|
1.33.32.1 |
| 27-Sep-2018 |
martin | Pull up following revision(s) (requested by mrg in ticket #1037):
sys/dev/usb/uhub.c: revision 1.139 sys/external/bsd/dwc2/dwc2.c: revision 1.55 sys/ddb/db_output.c: revision 1.34 sys/ddb/db_command.c: revision 1.160 sys/dev/usb/ehci.c: revision 1.264 sys/dev/usb/xhci.c: revision 1.99 sys/dev/usb/ehci.c: revision 1.265 sys/kern/subr_userconf.c: revision 1.27 sys/dev/usb/ehcivar.h: revision 1.46 sys/dev/usb/ohci.c: revision 1.287 sys/dev/usb/uhci.c: revision 1.284 sys/dev/usb/usbdi.c: revision 1.178 sys/dev/usb/usb.c: revision 1.172 sys/dev/pci/xhci_pci.c: revision 1.14 sys/dev/usb/usb.c: revision 1.173 sys/dev/usb/usb.c: revision 1.174 share/man/man4/usb.4: revision 1.110 sys/ddb/db_command.c: revision 1.159 sys/dev/usb/usb_subr.c: revision 1.227 sys/dev/usb/uhcivar.h: revision 1.56 (all via patch)
consolidate the handling of polling across HC drivers, and generic USB: - don't take mutexes if polling - normalise the code across all drivers - add some not yet code to block discovery to/from polling - minor CSE - adjust comment for usbd_set_polling() to reality now i properly understand what it is used for and why.
this, with a hack to make RB_ASKNAME to wait 5 seconds allows boot -a work with USB keyboards. there are still multiple issues remaining: - discovery and polling need to be mutually exclusive - attachment of ukbd and wskbd is not handled by config_pending, and the 5 second delay isn't going to always be enough.
call cnpollc(1) and cnpollc(0) around cngetc(). (christos has a good idea to add a function that does all 3, and we should switch all the callers in this sequence to use it (and fix the MD ones missing it still). not all can, as eg, line-grabbing functions can use cngetsn(), which only calls cnpollc() twice.)
When this file is used when not building the kernel (eg: /usr/sbin/crash) make cnpollc() go away.
reorder some struct members to remove holes.
add config_pending usage to uhub and general USB device attachment. - call config_pending_incr() and config_pending_decr() around attaching devices against "usbdevif" attribute.
uhub: - convert sc_explorepending and sc_running to bool. add new sc_first_explore. - call config_pending_incr() at the start of uhub_attach(). dropped in uhub_explore(), if this is the first explore.
implement a gross hack to fix "boot -a" on systems with usb keyboards on systems with ehci handover to uhci (and maybe ohci), and fix a similar problem for "boot -s".
there is effort to ensure that all devices attached via USB are probed before RB_ASKNAME or RB_SINGLE attempts to ask any questions on the console, and largely this works, often by chance, today, for USB disks and root. i've recently pushed this more into uhub and general USB device attachment as well, and kept a config_pending reference across the first explore of a bus. these fix many issues with directly attached hubs.
however, on systems where devices connected to ehci ports are handed over to a companion uhci or ohci port, it may not be the first, or even second, bus explore that finds the device finally before attachment, and at this point all config_pending references are dropped.
there is no direct communication between drivers, the potentials are looked up but their device_t is only used for generic things like the name, so informing the correct companion to expect a device and deal with the config_pending references is not possible without some fairly ugly layer violations or multi-level callbacks (eg, we have "ehci0", and usually an the relevant companion, eg, "uhci2", but it is the uhub that uhci2 has attached that will deal with the device attachment.)
with the above fixes to generic USB code, the disown happens during the first explore. the hack works by, at this point, checking if (a) root is not mounted, (b) single user or ask name are set, and (c) if the hack as not been triggered already. if all 3 conditions are true, then a config_pending_incr() is called and a callback is triggered for (default) 5 seconds to call config_pending_decr(). ehci detach pauses waiting for this callback if scheduled.
this allows enough time for the uhub and the ukbd/wskbd to attach before the RK_ASKROOT prompts appear. testing shows it takes between 1.5 and 2 seconds for the keyboard to appear after the disown occurs.
Index: dev/usb/ehcivar.c - new sc_compcallout, sc_compcallout, sc_complock, and a state for th handover hack.
Index: dev/usb/ehci.c ehci_init(): - use aprint_normal_dev() instead of manual device_xname(). - initialise sc_compcallout, sc_compcallout, sc_complock, and sc_comp_state. ehci_detach(): - if there are companion controllers, tear own the above, including waiting if there is a callback scheduled. ehci_disown_callback(): - new callout to call config_pending_decr() in the the future. schedule this ca ehci_disown_sched_callback(): - if booting to single user or asking names, call config_pending_incr() and schedule the callout above, default 5 second delay. ehci_disown(): - if disowning a port call ehci_disown_sched_callback(). deal with partial attach failures in usb_attach vs usb_detach aka PR 53598. - make sure xhci's sc->sc_ios is NULL if failure happens. - rearrange usb_attach() / usb_doattach() to make it simpler to clean up. - move usb_async_intr softint into usb_once_init(). previously, each USB controller would start a new one, and leave the old one leaked. - handle controller interrupts without a bus attached
remove usb(4)'s "flags 1" code. it has been dead for a while, as it runs during the interrupts part of configuration now, and all the devices try attach as early as possible, including any root or boot required disk or keyboard device, which is what this flag was for.
|
1.34.4.1 |
| 26-Jan-2020 |
martin | Pull up following revision(s) (requested by uwe in ticket #654):
sys/ddb/db_output.c: revision 1.35 sys/ddb/db_output.c: revision 1.36
db_putchar - check if we need to wrap at $maxwidth after whitespace.
That fixes orphaned first character in something like: |Stopped in ... longsymbol+0xf00: | |i |nsn
Fix typo in comment.
|
1.35.2.1 |
| 29-Feb-2020 |
ad | Sync with head.
|