NetBSD Problem Report #53738

From clare@csel.org  Sat Nov 24 16:21:10 2018
Return-Path: <clare@csel.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 79E2E7A166
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 24 Nov 2018 16:21:10 +0000 (UTC)
Message-Id: <20181124160921.6DD827B0BD@devel.csel.org>
Date: Sun, 25 Nov 2018 01:09:21 +0900 (JST)
From: clare@csel.org
Reply-To: clare@csel.org
To: gnats-bugs@NetBSD.org
Subject: the bootloader does not accept console inputs in PCEngines APU2
X-Send-Pr-Version: 3.95

>Number:         53738
>Category:       port-amd64
>Synopsis:       the bootloader does not accept console inputs in PCEngines APU2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 24 16:25:00 +0000 2018
>Last-Modified:  Sat Nov 24 17:35:00 +0000 2018
>Originator:     Shinichi Doyashiki
>Release:        NetBSD 8.0_STABLE
>Organization:
	at home
>Environment:
System: NetBSD devel.csel.org 8.0_STABLE NetBSD 8.0_STABLE (APU1C_8) #4: Sun Nov 11 19:47:16 JST 2018 clare@devel.csel.org:/export/stage/stable-8/src/sys/arch/amd64/compile/APU1C_8 amd64
Architecture: x86_64
Machine: amd64
>Description:
        The PCEngines APUx system is only works in serial console.
	The its BIOS handles console input/output via serial port
	by the default, but the bootloader configured in serial
	console mode does not accept inputs from serial console.
	The bootloader should take inputs from serial port in serial
	console mode.

>How-To-Repeat:
	1. get APU2D4 system board from PCEngines.
	2. get most recent mainline BIOS (firmware) from github
	   and install to the box.  https://pcengines.github.io/
	3. installboot -v -o console=com,speed=115200 [device] [bootxx]
	4. reboot.
	5. you will see the bootloader does not accept any inputs.

>Fix:
	Unknown yet.

	To a workaround, you can use the kernel option CONS_OVERRIDE
	to enforce kernel using serial console, and leave the bootloader
	to use the BIOS (PC console) to input/output.  the recent
	APU2D4's BIOS can provide input/output from serial console
	for the bootloader.

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-amd64/53738: the bootloader does not accept console inputs
 in PCEngines APU2
Date: Sat, 24 Nov 2018 17:48:53 +0100

 On Sat, Nov 24, 2018 at 04:25:00PM +0000, clare@csel.org wrote:
 > >How-To-Repeat:
 > 	1. get APU2D4 system board from PCEngines.
 > 	2. get most recent mainline BIOS (firmware) from github
 > 	   and install to the box.  https://pcengines.github.io/
 > 	3. installboot -v -o console=com,speed=115200 [device] [bootxx]

 Not sure what "console=com" will do, but according to the man page
 it should be console=com0 - and it will use the hardware addresses that
 the BIOS tells it, so maybe some bios settings are breaking things.

 If the bios only does serial, it may be worth to try console=pc instead
 and rely on the bios redirection.

 Martin

From: clare@csel.org
To: gnats-bugs@NetBSD.org
Cc: Martin Husemann <martin@duskware.de>, port-amd64-maintainer@netbsd.org,
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-amd64/53738: the bootloader does not accept console inputs
 in PCEngines APU2
Date: Sun, 25 Nov 2018 02:26:44 +0900

 On Sat, 24 Nov 2018 16:50:01 +0000 (UTC)
 Martin Husemann <martin@duskware.de> wrote:

 > The following reply was made to PR port-amd64/53738; it has been noted by GNATS.
 > 
 > From: Martin Husemann <martin@duskware.de>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: port-amd64/53738: the bootloader does not accept console inputs
 >  in PCEngines APU2
 > Date: Sat, 24 Nov 2018 17:48:53 +0100
 > 
 >  On Sat, Nov 24, 2018 at 04:25:00PM +0000, clare@csel.org wrote:
 >  > >How-To-Repeat:
 >  > 	1. get APU2D4 system board from PCEngines.
 >  > 	2. get most recent mainline BIOS (firmware) from github
 >  > 	   and install to the box.  https://pcengines.github.io/
 >  > 	3. installboot -v -o console=com,speed=115200 [device] [bootxx]
 >  
 >  Not sure what "console=com" will do, but according to the man page
 >  it should be console=com0 - and it will use the hardware addresses that
 >  the BIOS tells it, so maybe some bios settings are breaking things.
 >  
 >  If the bios only does serial, it may be worth to try console=pc instead
 >  and rely on the bios redirection.

 console=com0,speed=115200,ioaddr=0x3f8 does not work for the APU2,
 but console=pc does.  The its BIOS does redirection, but the kernel
 did not know about serial console.

 the APU2 have no video hardware.

 using console=pc is acceptable, but detecting serial console is the
 kernel's responsibility?


 -- 
 Shinichi Doyashiki <clare@csel.org>

From: Martin Husemann <martin@duskware.de>
To: clare@csel.org
Cc: gnats-bugs@NetBSD.org, port-amd64-maintainer@netbsd.org,
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-amd64/53738: the bootloader does not accept console inputs
 in PCEngines APU2
Date: Sat, 24 Nov 2018 18:32:17 +0100

 On Sun, Nov 25, 2018 at 02:26:44AM +0900, clare@csel.org wrote:
 > the APU2 have no video hardware.
 > 
 > using console=pc is acceptable, but detecting serial console is the
 > kernel's responsibility?

 Yeah, but this one is tricky as the BIOS is lying to the bootloader,
 and the bootloader passes the info on to the kernel.

 We could add a special boot option to tell the kernel about the real
 console com speed.

 Martin

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.