Feature #9930
closeduts: kmdb should use "diag-device" when set
100%
Description
When the diag-device
boot property is set, kmdb should appear on the diag device instead of the regular console -- even after the loading of the console drivers disables early boot mirroring. This enables the engineer to use the serial port for the debugger while the regular console is on the framebuffer, enabling debugging of the framebuffer console software itself.
This change also documents the diag-device
property in eeprom(1M)
.
Related issues
Updated by Joshua M. Clulow over 4 years ago
- Related to Feature #9929: uts: boot console mirror with diag-device added
Updated by Joshua M. Clulow over 4 years ago
- Subject changed from uts: add diag-device to uts: kmdb should use "diag-device" when set
- Description updated (diff)
Testing Notes¶
Regression Testing¶
In a BIOS (not UEFI) virtual machine with both a framebuffer (VGA) and serial console (COM1/ttya), I performed the following sequence of boots with this change installed:
- booting with
console=ttya
anddiag-device
unset - booting with
console=text
anddiag-device
unset
In both cases, the loader and the subsequent OS console appeared only on the nominated device, and no interaction was possible on the other device.
- booting with
console=text
, and at theok
prompt, enteredset diag-device=ttya
and thenboot
The SunOS banner, and an early notice (NOTICE: driver uhci disabled
) appeared on both the framebuffer and COM1. Subsequent output from startup scripts and the login prompt appeared only on the VGA console as expected.
- booting with
console=text
, and at theok
prompt, enteredboot -kd
- booting with
console=ttya
, and at theok
prompt, enteredboot -kd
The debugger appeared only on the appropriate interface, and worked as well it usually does.
New Feature Testing¶
With this change, kmdb remains available on the diag device after the console driver is loaded. To confirm:
- booting with
console=text
, and at theok
prompt, enteredset diag-device=ttya
and thenboot -kd
The debugger appeared mirrored on both consoles, and I was able to use ::bp newproc
to catch some early function calls from both consoles. After the console drivers were loaded and the VGA font was loaded, kmdb was then only available on the serial port as expected.
Updated by Electric Monk over 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit dbad7380d7852483de489e640f3a64b386115d59
commit dbad7380d7852483de489e640f3a64b386115d59 Author: Toomas Soome <tsoome@me.com> Date: 2018-11-20T22:42:48.000Z 9930 uts: kmdb should use "diag-device" when set Reviewed by: John Levon <john.levon@joyent.com> Approved by: Joshua M. Clulow <josh@sysmgr.org>
Updated by Electric Monk over 4 years ago
git commit 8e9dfb97a84bbf797669c3ee2aabcc48b9ee13ff
commit 8e9dfb97a84bbf797669c3ee2aabcc48b9ee13ff Author: Toomas Soome <tsoome@me.com> Date: 2018-11-20T23:28:58.000Z 9930 uts: kmdb should use "diag-device" when set (missed kmdb "input-device" fix) Reviewed by: John Levon <john.levon@joyent.com> Approved by: Joshua M. Clulow <josh@sysmgr.org>