NetBSD Problem Report #46240

From mm_lists@pulsar-zone.net  Thu Mar 22 07:04:05 2012
Return-Path: <mm_lists@pulsar-zone.net>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 783B863B946
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 22 Mar 2012 07:04:05 +0000 (UTC)
Message-Id: <201203220704.q2M74B3n025714@ginseng.pulsar-zone.net>
Date: Thu, 22 Mar 2012 03:04:11 -0400
From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@gnats.NetBSD.org
Subject: options(4) and/or ddb(4) should mention ddb_vgapost

>Number:         46240
>Category:       kern
>Synopsis:       options(4) and/or ddb(4) should mention ddb_vgapost
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 22 07:05:00 +0000 2012
>Originator:     Matthew Mondor
>Release:        NetBSD 6.0_BETA
>Organization:
>Environment:
System: NetBSD ninja.xisop 6.0_BETA NetBSD 6.0_BETA (GENERIC_MM) #2:
Tue Mar 20 12:14:05 EDT 2012
root@ninja.xisop:/usr/obj/sys/arch/amd64/compile/GENERIC_MM amd64
Architecture: x86_64 Machine: amd64
>Description:

Although I've seen in GENERIC the VGA_POST option, there is lacking
documentation for it in options(4) and ddb(4).  However, it's very
useful to use ddb on systems running X11.

I remembered that it was possible to put something in
ddb.commandonenter to make ddb invoke a command to restore console
using that functionality, I also had no idea what to put there, and
documentation wasn't helpful.  Grepping the ddb sources also were
useless, as it's not even a ddb command but simply a function which can
be invoked from it.

I used to use crash dumps, but with large RAM systems these take too
long to dump and copy back.

Thus I recommend to document both VGA_POST in options(4) and make
mention of "call ddb_vgapost" in ddb(4).

>How-To-Repeat:
>Fix:

Suggested diffs attached.
--MP_/73SK5CdGr5nvHni50eVr/Yv
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=ddb.diff

--- ddb.4.orig	2012-03-22 02:49:03.000000000 -0400
+++ ddb.4	2012-03-22 02:56:47.000000000 -0400
@@ -208,6 +208,14 @@
 with
 .Xr sysctl 8 .
 Multiple commands can be separated by a semi-colon.
+On some systems, this can be used to restore the text console display mode
+from X11, using
+.Nm "call ddb_vgapost" .
+This requires that a kernel be configured with the
+.Nm VGA_POST
+option.  See
+.Xr options 4
+for more information.

 .Sh COMMAND SYNTAX
 The general command syntax is:

--MP_/73SK5CdGr5nvHni50eVr/Yv
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=options.diff

--- options.4.orig	2012-03-22 02:49:15.000000000 -0400
+++ options.4	2012-03-22 03:01:02.000000000 -0400
@@ -533,6 +533,15 @@
 This option adds more verbose descriptions to the
 .Em help
 command.
+.It Cd options VGA_POST
+This option adds kernel support for VGA POST, allowing to restore console text mode (available on x86).
+It then is possible to use
+.Nm call ddb_vgapost
+within the commands given in
+.Nm DDB_COMMANDONENTER
+or in the
+.Em ddb.commandonenter
+.Xr sysctl 3 .
 .It Cd options KGDB
 Compiles in a remote kernel debugger stub for diagnosing kernel problems
 using the

--MP_/73SK5CdGr5nvHni50eVr/Yv--

>Unformatted:
 --MP_/73SK5CdGr5nvHni50eVr/Yv
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.