NetBSD Problem Report #36248

From martin@duskware.de  Sun Apr 29 20:52:10 2007
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id AB8C063B960
	for <gnats-bugs@gnats.netbsd.org>; Sun, 29 Apr 2007 20:52:09 +0000 (UTC)
Message-Id: <20070429204709.28BE063B964@narn.NetBSD.org>
Date: Sun, 29 Apr 2007 20:47:09 +0000 (UTC)
From: si1356@yahoo.co.uk
Reply-To: si1356@yahoo.co.uk
To: netbsd-bugs-owner@NetBSD.org
Subject: ADM5120 kernel trap when writing to serial device.
X-Send-Pr-Version: www-1.0

>Number:         36248
>Category:       port-evbmips
>Synopsis:       ADM5120 kernel trap when writing to serial device.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-evbmips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 29 20:55:00 +0000 2007
>Originator:     Simon H.
>Release:        Current
>Organization:
>Environment:
No uname on target board.
>Description:

I didn't know the minor device number for the second serial port
on the adm5120 (it has two) so I created a number of different device nodes to try them out:  uart0, uart1, uart2, uart3 etc... all with major number 77, and increasing minor numbers from zero.

I tried to send some text to each of the devices in turn using echo.
The first two devices both echoed back to the console (which was on the
serial port).  This in itself may be a bug, but when I tried to echo to the third device (with minor number 2), this caused: 

trap: TLB miss (load or instr. fetch) in kernel mode
status=0xf003, cause=0x30000008, epc=0x801215e4, vaddr=0x3c
pid=25 cmd=sh usp=0x7fffda80 ksp=0xc2f75c98
Stopped in pid 25.1 (sh) at     netbsd:uart_open+0x40:  lw      s0,60(v0)

I was expecting to see 'device not configured', or something like that.

>How-To-Repeat:
Create device nodes:

mknod /dev/uart0 c 77 0
mknod /dev/uart1 c 77 1
mknod /dev/uart2 c 77 2
mknod /dev/uart3 c 77 3

echo "hello" > /dev/uart2


>Fix:

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.