Project

General

Profile

Actions

Feature #9929

closed

uts: boot console mirror with diag-device

Added by Toomas Soome over 4 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

When boot property diag-device is defined, mirror early console output to it and also use it for possible input.


Related issues

Related to illumos gate - Feature #9930: uts: kmdb should use "diag-device" when setClosedToomas Soome2018-10-26

Actions
Actions #1

Updated by Joshua M. Clulow over 4 years ago

  • Description updated (diff)

Testing Notes

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.

  • 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. At some point early in boot, this log message was emitted after which the debugger was only useable on the framebuffer:

NOTICE: Kernel debugger present: disabling console power management.
Actions #2

Updated by Electric Monk over 4 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 60cbda0dc36aea401b9a65de04800c0a8b48647f

commit  60cbda0dc36aea401b9a65de04800c0a8b48647f
Author: Toomas Soome <tsoome@me.com>
Date:   2018-11-20T07:48:59.000Z

    9929 uts: boot console mirror with diag-device
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: Joshua M. Clulow <josh@sysmgr.org>

Actions #3

Updated by Joshua M. Clulow over 4 years ago

  • Related to Feature #9930: uts: kmdb should use "diag-device" when set added
Actions

Also available in: Atom PDF