Subject: kern/10328: 'en' driver uses vtophys, kernel printf %b
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/08/2000 10:16:11
>Number:         10328
>Category:       kern
>Synopsis:       'en' driver uses vtophys, kernel printf %b
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 08 10:17:00 PDT 2000
>Originator:     Chris Demetriou
>Release:        NetBSD-current sources as of 20000606

the 'en' ATM driver (in particular, its source file
sys/dev/ic/midway.c) uses the deprecated (for MI driver
use), non-portable vtophys() interface.  It should
be using the bus_dma routines.

The same file also uses the kernel printf() %b format.
This is deprecated, and bitmask_snprintf() should be used
for the vtophys() problem: read the source, or try to include the
'tl' driver for an arch which doesn't include vtophys().  (Even
on some which compile, the use of vtophys() will probably be
incorrect and result in incorrect operation.)

for the printf() %b problem: read the source, or try to compile
with a stock GNU gcc cross-compiler (e.g. targetted for mips-elf)
which doesn't include our __kprintf__ attribute.  in versions ofgcc
which don't support our __kprintf__ attribute, no special attribute
will be defined for kernel printf(), and so it will assume that it
behaves like standard (user-land) printf(), which doesn't support %b.