Andy Ruhl | 8 Jun 07:36 2015

Atheros SOC AR9331 router

I bought an interesting device recently. Search Amazon for "Tbmax
router". 2 RJ45 ethernet ports, wifi, USB, and USB power. And a nicely
accessible serial port. I bought a USB to serial adapter that plugs
right in, search for "JBtek serial".

Some more info on it here:

I had to swap tx and rx to get the serial console on mine.

I'm not a developer so I can't get NetBSD working on it. Looks like
someone might be trying according to this:

If it could boot from USB this could be really good.


Andrew Parker | 7 Mar 03:55 2015

NetBSD on Cavium Octeon

I'd like to try getting NetBSD running on a Ubiquiti Edgerouter Lite and am wondering if anybody has tried
this or had any success with it?

John D. Baker | 19 Feb 07:01 2015

wsfonts that don't work w/LOONGSON (Lemote YeeLoong)

I wanted to use the recently-added "glass10x19" and/or "glass10x25" VT220-
like fonts in my custom LOONGSON-based kernel, but the wsfont subsystem
ignores them and falls back to one of the other fonts in the stock
LOONGSON kernel "gallant12x22" or "bold8x16".

If I disable the stock fonts, and leave only my added fonts, then the
kernel hangs, sometimes printing a message (in the PMON font) claiming
the font table is empty.

This got me curious about the other fonts listed in
"sys/dev/wsfont/files.wsfont".  Below are the ones which are ignored if


The rest provide a working console, although FONT_LUCIDA16x29 and
FONT_SONY12x24 are a bit too large for a comfortably-sized terminal
on a 1024x600 display panel.

Are there any clues as to why the above-listed fonts are ignored on
evbmips/LOONGSON?  I know FONT_GLASS10x19 works on macppc and i386.


|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
(Continue reading)

John D. Baker | 10 Feb 03:10 2015

latest evbmips/LOONGSON observations

After reading this post:

I dug out my Yeeloong and went hunting:

eventually producing a working 7.99.4 kernel.  A mips/loongson guru
should take a look at this.

Along the way, I tried a few things I hadn't before--taking some cues
from OpenBSD/loongson.

I tried the "wsfb" driver for Xorg and it works quite well, if a bit
sluggish.  The show-stopper is that the screen-saver operates backwards.

After an initial delay, the next keyboard/mouse event blanks the
screen immediately.  After an idle period, the screen is restored, but
the next keyboard/mouse event just blanks it again.

I've added 'xset s off' to my ".xinitrc". to keep it from blanking.

Without an "xorg.conf", the auto-detected "siliconmotion" driver crashes
complaining about:

[  3406.966] (EE) Failed to load /usr/X11R7/lib/modules/drivers/
/usr/X11R7/lib/modules/drivers/ Undefined symbol "exaOffscreenFree"
(symnum = 101)

(Continue reading)

John D. Baker | 6 Feb 01:23 2015

Re: netbsd-7 LOONGSON kernel doesn't work

On Tue, 23 Dec 2014 19:03:17 -0400 (AST), Jared McNeill
<jmcneill <at>> wrote:

> I found my old Lemote Yeeloong netbook today and thought I'd try
> netbsd-7 on it. Not much luck:

I see the same thing with 7.99.4 LOONGSON kernel from just a few hours
ago (first time I've tried since 6.99.40).

I tried booting my custom YEELOONG root-on-NFS kernel, but for some
reason it claimed the font table was empty and hung (I tried putting
the recently-added GLASS10x19 and GLASS10x25 VT220-like fonts in it).

I'll see about reverting my change to see if I get a kernel that works
and if not, start bisecting...


|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

Jared McNeill | 24 Dec 00:03 2014

netbsd-7 LOONGSON kernel doesn't work

I found my old Lemote Yeeloong netbook today and thought I'd try netbsd-7 
on it. Not much luck:

Two issues:

   1- Not sure why it's using wd0 for boot device, since it's the
      INSTALL_LOONGSON kernel.
   2- The panic.

Last kernel I had on this was quite old -- 6.99.7 -- so not sure what has 
changed since then.

Here are the kernels I tried:

Any hints?


John D. Baker | 1 Feb 09:03 2014

Other interesting mips breakage...

I should have looked at port-mips <at>  more diligently before my latest spate
of PR filing.  The very issues I filed about were discussed here at length.

In light of that, I'd welcome input on issues already being pursued in
absence of an active PR.  What I've come to observe since evbmips/LOONGSON
became operational again (on my Lemote YEELOONG, since that's the only
mips/evbmips machine I have):

X server:  the undefined symbol issues seem to have been resolved, but
now the server complains that it can't load the "int10" module, saying
that it doesn't exist.  Also what looks like a NULL pointer dereference.

The 'dig' utility dies with segfault in pthread_getspecific().

Can't build anything from pkgsrc as the C compiler dies with bus error
compiling the first real source in "pkgtools/digest".  (It works well
enough to complete the "./configure" script, though.)

If there are hints on the above, please share.  I suspect the most
obvious thing to try is nuke OBJDIR and DESTDIR from orbit, just to
make sure.

A few things that persist from early 6.99.x days:

PR/48564: 'tar' corrupts files extracted to NFS.  I originally saw this as
a result of bizzare modifications suggested when running 'etcupdate' on
my NFS-root installation.  Then LOONGSON kernel build breakage, etc.
intervened.  Finally, I sat down and analyzed what the nature of the
data corruption was.

(Continue reading)

Rajasekhar Pulluru | 2 Jan 16:42 2014

kmem_alloc vs malloc


Need some help on understanding below issue.

When driver A invokes kmem_alloc, see panic due to TLB miss in driver B.
This issue happens during kernel bootup. At this time, show map output
shows, resident memory = wired memory.

When the kmem_alloc in driver A is replaced by malloc, don't see any issue
with driver B.

kmem_alloc allocates wired memory. malloc allocates uninitialized memory in
kernel address space.

How does the issue go away replacing kmem_alloc with malloc ? Is it related?

Thanks & Regards,

Rajasekhar Pulluru | 26 Dec 14:18 2013

trap: cpu0, TLB miss (load or instr. fetch) in kernel mode

Dear group members,

Need your help.

While porting usb driver to evbmips, receive below trap during system
bootup. Couldn't see backtrace as program counter is 0. how to proceed

pid 0(system): trap: cpu0, TLB miss (load or instr. fetch) in kernel mode
status=0x8203, cause=0x108, epc=0, vaddr=0xdeadbeef
tf=0x85011d20 ksp=0x85011e60 ra=0xffffffff80272a88 ppl=0x17108128
kernel: TLB miss (load or instr. fetch) trap
Stopped in pid 0.4 (system) at  0:      invalid address.
db> show reg
at          0xffffffc0
v0          0
v1          0x82        _KERNEL_OPT_NLOOP+0x1
a0          0
a1          0x1 _KERNEL_OPT_NINET
a2          0x8 _KERNEL_OPT_NINET+0x7
a3          0x812782a0  cpu_info_store
a4          0x2 _KERNEL_OPT_NINET+0x1
a5          0x1 _KERNEL_OPT_NINET
a6          0x80        _KERNEL_OPT_DDB_HISTORY_SIZE+0x1c
a7          0x81e794f8  ipl_eimr_map+0x18
t0          0x82a8a000  _prop_data_pool+0x5ea58
t1          0x1 _KERNEL_OPT_NINET
t2          0x85010000
t3          0x8027bfd4  tc_init+0x13c
s0          0xd13dc000
(Continue reading)

John D. Baker | 15 Dec 22:13 2013

all userland dies with SIGSEGV on LOONGSON (Lemote YEELOONG)

Now that evbmips64-el builds again for LOONGSON processors, I set about
doing just that.

The result is that all userland programs die with SIGSEGV, usually upon
exit (they otherwise seem to work OK).

Examining results with 'gdb' produces similar results in all examples

Core was generated by '<progname>'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0xqqqqqqqq in _ftext ()
#2  0xrrrrrrrr in ?? ()
warning: GDB can't find the start of the function at 0xssssssss.

where "0xssssssss" is exactly 2 less than "0xrrrrrrrr".

Upon exit, 'gdb' itself incurs SIGSEGV.


|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

(Continue reading)

Rajasekhar Pulluru | 3 Dec 17:09 2013

usb xhci driver


I would need some help on the xhci driver that was recently added.

I am trying to backport xhci driver to old netbsd port (5.1) (on the board
with xhci controller). With this, I couldn't see usb device getting created
i.e, no mass storage device though I have usb stick inserted into usb port.

Below are some of the xhci related logs.If I am correct, xhci_new_device
should be invoked twice once for the root hub port and the other for the
usb device, but it is getting invoked only once for root hub and not for
the usb device.

There is some issue in enumerating the usb port.

xhci0: xHCI version 1.0
xhci0: maxslots 64, maxintrs 8, maxports 2
xhci0: ac64 1 ctxsz 64
xhci0: xECP 960
xhci0: ECR 960: 00000401
xhci0: ECR 970: 02000402
xhci0: SP: 02000402 20425355 00080101
xhci0: ECR 980: 03000002
xhci0: SP: 03000002 20425355 00000102
xhci: sc_hs_port_start 1, sc_hs_port_count 1
xhci0: PAGESIZE 0x00000001
xhci0: sc_pgsz 0x00001000
xhci0: sc_maxslots 0x00000040
xhci0: sc_maxspbuf 1
xhci0: config 0x00000040
(Continue reading)