Project

General

Profile

Feature #9930

uts: kmdb should use "diag-device" when set

Added by Toomas Soome 9 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2018-10-26
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

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

Related to illumos gate - Feature #9929: uts: boot console mirror with diag-deviceClosed2018-10-26

Actions

History

#1

Updated by Joshua Clulow 8 months ago

  • Related to Feature #9929: uts: boot console mirror with diag-device added
#2

Updated by Joshua Clulow 8 months 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 and diag-device unset
  • booting with console=text and diag-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 the ok prompt, entered set diag-device=ttya and then boot

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 the ok prompt, entered boot -kd
  • booting with console=ttya, and at the ok prompt, entered boot -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 the ok prompt, entered set diag-device=ttya and then boot -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.

#3

Updated by Electric Monk 8 months 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>

#4

Updated by Electric Monk 8 months 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>

Also available in: Atom PDF