Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Technologic Systems TS-7200 Testing, Bugs, and Patches
All,
I have been working on getting -current running on a Technologic Systems TS-7200 ARM SBC. We've got a couple of these in the shop, they're the SBC from the "NetBSD Toaster" project from years ago. The goal was to get -current running so that we can get NetBSD ported to the TS-7600: we've got about 100 of them, and NetBSD doesn't support them yet.
Anyway, in the process we ran into three kernel bugs and a misconfiguration. From the nature of the bugs, I think it's pretty likely that no one has run NetBSD on a TS-7200 for a long time. The work is as follows, corresponding to the patch ordering:
1. Incorrect IPL lowering in ep93xx_intr.c in _splraise(): curcpl was being set to the requested level unconditionally. Past entropy rework caused a drop from IPL_SCHED to IPL_SOFTSERIAL. The VIC mask was being derived from curcpl at the next dispatch or splx() which resulted in IPL_VM devices being unmasked while IPL_VM spin mutexes were held.
2. RedBoot Ethernet DMA conflict: during start-up, RedBoot sets up Ethernet DMA for netbooting. The DMA engine was left running after handoff to NetBSD's bootloader, resulting in vm_page corruption if broadcast traffic was received before epe(4) attached.
3. epe(4) status-queue handling improvements: this fix came about as a symptom fixup before patch #1 was figured out. With #1 patched in, this one isn't strictly necessary, but if it had been in place, I'd have found the IPL bug quicker, so I think there's merit in having it in. Basically it's an improvement to mbuf handling that avoids a double free condition that the misconfigured IPL was triggering. With the IPL fix in, we tried to hose down the board with traffic to trigger this bug again, and we did manage to get the occasional oops out of the MAC. This patch results in logging of the attempted completion for an already reclaimed slot, the logging is ratelimited so that logs aren't spammed with it.
4. This is just an addition to the default TS7200 kernel to add in micphy(4), which is the PHY used on the TS-7200. It'd been running with ukphy(4), which does function, but micphy(4) adds better mediaopts support. We measured the kernel increase size to be around 4K.
The patches haven't been sent yet as send-pr says no LLM assistance. I wanted to discuss them here as they were completed with LLM assistance and I know that requires additional steps for acceptance. This email was not written with LLM assistance. I've been hacking on the NetBSD kernel for around 20 years, since college, and our company, Glitch Works, LLC uses NetBSD professionally for embedded work. What's the correct way forward to get these patches pulled in?
Thanks,
Jonathan Chapman
Glitch Works, LLC
glitch%glitchwrks.com@localhost (subscribed as lists%glitchwrks.com@localhost)
Home |
Main Index |
Thread Index |
Old Index