Subject: Re: HEADS UP: gdamore-uart branch
To: Izumi Tsutsui <>
From: Garrett D'Amore <>
List: tech-kern
Date: 07/10/2006 08:25:40
Izumi Tsutsui wrote:
> I wrote:
>> I tested a kernel with options COM_REGMAP for com_dio on my hp425t
>> (68040 25MHz) but it doesn't probe com properly (probed as 16450
>> rather than 16550a) and doesn't work. (I haven't checked details yet)
> Ah, sorry, it's my fault. I just added #define COM_REGMAP to
> <dev/ic/comvar.h>, but com.c refers COM_REGMAP before including it.

Oops.  Well, COM_REGMAP is _supposed_ to be defined in opt_com.h.

> (Is it better to move CSR_* definitions to comvar.h?)

I don't think so, because the names aren't properly protected with a
COM_ prefix.  In other words, I worry they might collide with some bus
code somewhere that includes comvar.h for one reason or another.   The
macros are for the convenience use of com.c only really (and otherwise
aren't strictly necessary), so I kept them in the .c.  (Bus code that
could use this generally implicitly knows the register layout and
doesn't need the indexed operations.)

What I should do is _move_ these macros to below the #include's. 
Probably I just stuck them where they are because there was already the
cn_trap() macro there.  I will move them before I commit.

>> I mesured xfer rate via SLIP (9600bps, RTS/CTS flow control)
>> on getting a 1.8MB file from i386 by ftp(1):
>>  GENERIC on HEAD:		0.76KB/s (with 8 overflows)
>>  GENERIC on gdamore-uart:	0.75KB/s (with 6 overflows)
> GENERIC with COM_REGMAP on gadmore-uart also shows ~0.75KB/s.

Thanks.  I wonder why there is a measurable difference.  There is a
_very_ trivial extra register indirection for HEAD vs. gdamore-uart
(without COM_REGMAP), but I would not have expected it to be noticeable.

In any case, this hardware is so low end, then maybe it doesn't matter. 
Does anyone run NetBSD seriously on hardware slower than this (25MHz)?

    -- Garrett
> ---
> Izumi Tsutsui

Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
Phone: 951 325-2134  Fax: 951 325-2191