• Hello, Guest! Welcome back, and be sure to check out this post for more info about the recent service interruption and migration.

Kernel Panics on NetBSD 1.3.3 on Mac IIsi w/ MacCon Nubus ethernet card

NoTrueSpaceman

Active member
After getting my MacCon network card working great in MacOS 7, I went on to tackle other OS's.

I have an installation of NetBSD 1.3.3 that boots and seemed stable back before I got the ethernet card working. Now that I have the card working, it kernel panics after a bit.

Q1: Does anyone know the best way to go debugging this? My thought was to remove the ethernet card in various ways (first unplug the ethernet cord, then try w/ no card at all).

Q2: Is there a better version of NetBSD to be using? 1.3.3 was one I picked by its release date and after going through a few READMEs and INSTALLs.

Q3: Before I got the first kernel panic, when I was using the local console, I'd get pretty regular "ae0: receive buffer overflow" or similar messages. Obviously this seems like a problem - how could I prevent it? I suspect that it's probably happening when MacOS is running, but it just doesn't report it. (ae0 is the ethernet card device)

Thanks y'all!

 

cheesestraws

Well-known member
Well, mac68k is still an active port of NetBSD, so I'd probably try the most recent version and see if it goes away.

 
Q2: Is there a better version of NetBSD to be using? 1.3.3 was one I picked by its release date and after going through a few READMEs and INSTALLs.

Q3: Before I got the first kernel panic, when I was using the local console, I'd get pretty regular "ae0: receive buffer overflow" or similar messages. Obviously this seems like a problem - how could I prevent it? I suspect that it's probably happening when MacOS is running, but it just doesn't report it. (ae0 is the ethernet card device)

Thanks y'all!


It's possibly an early driver issue on the NetBSD side, but if you're using pre-7.5 Mac OS to initialize the hardware that could be a contributing factor.

I see mbuf related commits to the relevant if_ae driver in the years after 1.3 was released in 1998: https://github.com/NetBSD/src/commits/trunk/sys/arch/mac68k/dev/if_ae.c.

Suggest trying 1.6 (2002) as a lean system that includes most of the changes.  Worth a try as another data point.

I'm generally running 1.6 with Ken Nakatas color X server on a few Macs, but not with a Maccon card.  Later releases work fine but the build toolchains are more suited to faster hardware.

The X server is at https://ftp.netbsd.org/pub/NetBSD/arch/mac68k/contrib/Xmac68kColor/ because it was not formally contributed.

 

NoTrueSpaceman

Active member
I finally got some time to revisit this project.

I upgraded MacOS to the full 7.5.3 version and grabbed the NetBSD 6.1.2 ISO (it is the most recent available here). After partitioning up a drive, the installer hangs at selecting the terminal type. It seems that my keyboard is not detected.

Google hasn't shown any helpful results.

I suspect that it has something to do with how I'm using a PS2->ADB adapter made from an Arduino. It works great in MacOS (and on my PowerPC) and actually also worked fine in NetBSD 1.1.3. :sad:

I think the only thing I can do now is try some other random versions of NetBSD to see if any of them work. The ISO image made it very simple so I guess I'll do a binary search. v1.1.3 works with my ADB adapter, v6.1.2 is no good. The midpoint is v3.1!

I suppose I should also mention I'm using the NETBSD_INSTALLSBC.GZ kernel image because the normal one hung on boot with a kernel panic.

 

NoTrueSpaceman

Active member
First, here's the info on the adapter I'm using:

https://github.com/Difegue/Chaotic-Realm/tree/master/adbduino

I built that with an Arduino and I'm using that sketch unmodified. At least, as far as I can tell. It has been a while. :huh:

I downloaded the 9.1 and latest-20201228 .gz kernel/rootdisks.

9.1 didn't give any (noticeably) different log info on boot than did 6.1.2.

Neither did latest-20201228.

They all log

...

adb0 at obio0

...

adb0 (direct, IIsi series): 0 targets

...

Terminal type? [vt220]
At this point, there is no keyboard response.

Picture attached for latest-20201228 case.

This is using MacOS 7.5.3 and BSD Booter 2.0.0.

maciisi-netbsd-no-keyboard.png

 

NoTrueSpaceman

Active member
And I had to double check in case I had gone crazy - here is a screen shot of the same machine but using the install-GENERICSBC.gz image from NetBSD 1.3.3.

Note that it says

...

adb: bus subsystem

adb: standard keyboard at 2

adb: relative positioning device (mouse?) (1) at 3

...

adb0 at obio0 (ADB event device)

...
Then I showed the keyboard working down where it's asking for a root fs device.

Also note all the ncr5380 messages that aren't in the other screenshot. We're talking decades of difference between the two, of course.

Also a few times above I said "1.1.3". Those are incorrect. It's always been 1.3.3 that I've been working with. Namely because it was supposed to work in 4MB of RAM. As you can see in the screen shots, that is no longer a concern.

Would it be helpful to walk up the versions until I find the first one that breaks? By this point I have a system for trying out these kernels/kernel+fs.

NOTE:

After re-reading this thread again I realize that the recommendation was for "1.6" not "6.1". I'm giving that a shot now.

maciisi-netbsd-keyboard-ok.png

 

cheesestraws

Well-known member
Wild speculation here: how long does it take to get to the ADB initialisation in the newer releases?  Is there some kind of race condition where the arduino isn't ready/booted before ADB discovery takes place?

 

NoTrueSpaceman

Active member
They appear to be about the same. Also, I'm booting NetBSD from MacOS, so the Arduino is booted and running (and working in MacOS) before NetBSD starts.

 

NoTrueSpaceman

Active member
Also, I should mention I'm using RaSCSI to emulate two HDDs (and occasionally a CDROM drive). It too is booted and stable by this time (and worked fine using NetBSD 1.3.3).

 

NoTrueSpaceman

Active member
I just checked versions
1.4 GENERICSBC

1.4.1 GENERICSBC

1.4.2 INSTALLSBC

1.4.3 INSTALLSBC

1.5.3 INSTALLSBC

And the keyboard (adapter) doesn't seem to work with any of them.

What's kind of amazing to me now is that somehow I picked the exact last version that works. I suppose the next step is to look at the difference between the kernel in 1.3.3 and 1.4.

 

NoTrueSpaceman

Active member
http://archive.netbsd.org/pub/NetBSD-archive/NetBSD-1.4/LAST_MINUTE

Mentions

[mac68k]

Distribution kernels were generated with a slightly modified
GENERIC configuration file based on reliability testing that
continued up to the eleventh hour. To duplicate the distribution
kernel with a stock source tree, you must first uncomment the line
containing "options ADB_DEBUG" in the GENERIC kernel configuration
file. No known security risks are associated with this option,
whether enabled or disabled.



http://archive.netbsd.org/pub/NetBSD-archive/NetBSD-1.4/CHANGES

Mentions

...
mac68k: switch to split ADB driver (kbd/ms/aed). [ender 19981023]
...



Those are the only two things that stand out to me.

 

NoTrueSpaceman

Active member
I just spent some time looking at diffs between the adb subsystem - there are definitely changes though its hard to point at anything specific. The ADB hardware of the Mac IIsi is specifically called out as a separate architecture to support in both versions. A vast majority of the changes in the files I was looking through were relate to that DEBUG #define. The split driver thing seems to have been moving a bunch of functions to a new file elsewhere. It'll be harder to see if anything was changed in that move.

And of course, there are other changes mentioned to the mac68k arch so it could be one of those. There is a line about using the interrupt system (or something?) from the hp990 (or something?) arch

It might be easier for me to add debugging info to my ADB adapter and/or monitor it's traffic with an oscope than to dig too far into the NetBSD source. Ostensibly in the last 22 years since NetBSD v1.4 has come out, keyboard support has worked just fine for "real" ADB keyboards.

Last I looked at the code for that adapter, it was a real mess - the author of the version I'm using glued a bunch of other projects together. No shade on them - it works great on MacOS both on my 68k and PPC machines. Their notes on it indicate it was a quick job they got working and didn't worry about it further.

ADB is _relatively_ well documented, so I suppose I could begin work on a clean implementation specifically around the NetBSD system. ADB looks to make more sense than PS/2, at the least.

 
Top