mirror of
https://github.com/RhapsodiOS/RhapsodiOS.git
synced 2026-11-03 22:01:40 -07:00
[GH-ISSUE #63] ppc: 0700_Devices probe failures on Sawtooth (serial interrupts, Floppy panic, missing built-in drivers) #56
Labels
No labels
bug
documentation
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github-starred/RhapsodiOS#56
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @raynorpat on GitHub (Oct 18, 2026).
Original GitHub issue: https://github.com/RhapsodiOS/RhapsodiOS/issues/63
Booting our ppc kernel (branch
ppc-qemu) with the Mac OS X Server 1.2v3 disk on QEMUmac99(Sawtooth),/etc/startup/0700_Devicesprints:0700_DevicesrunsdriverLoader D=<name>for a fixed list on every ppc machine, and_IOProbeDriverreports when nothing in the device tree matches the driver'sMatching. So most of these are expected, but a few are real problems.Expected on mac99 (no hardware)
awacs davbus) and drvPPCBurgundy (burgundy davbus): QEMU's mac99 has no sound node. A real Sawtooth has adavbus/Screamer, so check this on hardware or with a QEMU that models audio.vm/ppc-guest.pyloads it by name and addspci1011,19to its match.Needs work
ch-a/ch-b: couldn't get interrupts.IOTreeDevice -resolveInterruptsbuilds the escc channels' interrupt list, thensetInterruptList:fails. On mac99 the ESCC sits under mac-io with two-cell MPIC specifiers. Check what thech-a/ch-bnodes carry, and what our newmapInterrupts:path (b25b3c196) makes of them. The trailing "No Such Device, device PPCSerialPort" is the seconddriverLoaderpass afterPortServer.mpic_register_int(PMAC_DEV_FLOPPY), and 136 is not insawtooth_interrupts, which panics with "Interrupt 136 not found". The stock 5.6 kernel does the same. A probe for absent hardware should fail cleanly;mpic_register_intshould not panic for an unknown device.vm/ppc-guest.pycurrently drops the Floppy load from0700_Devices.UniNEnet(gmac, the Sawtooth's built-in Ethernet),DEC21x4(apple21143plus the 21x4x PCI IDs),AttoScsiandPowerSupply.src/kernel-7/bsd/dev/ppc/drvUniNEnetexists but is in neitherconf/files.ppcnorautoconf_ppc.m, so on our kernel a Sawtooth's GMAC only works through a patcheddrvPPCGemloadable.Related: #61, #62.
@raynorpat commented on GitHub (Oct 18, 2026):
Item 3 (built-in drivers) on branch
ppc-qemu:UniNEnet is built in now (
b6e11b19d): it's inconf/files.ppcand in the built-in table (gmac, priority 7200, as in 5.6). The reconstruction needed fixes before it worked:_initTxRingran off its pagelog2(n)instead oflog2(n/32)(4096 entries instead of 128)_startChipwas namedchipIdVerified, so the MAC was never enabledself + 0x5c4writeIOPMPowerState,relativeTimeout:, two-argumentattachToNetworkWithAddress::, MII names)It also keeps the RX MAC summary bit masked. That is a divergence from 5.6, which unmasks it, but nothing services it. On QEMU mac99,
en0now comes from UniNEnet ("Ethernet(UniN): Link is up at 100Mb - Full Duplex"), with no patched loadable.AdaptecU2SCSI stays out of the build. Its source is far from compiling (duplicate methods, missing types and APIs, no HIM core), so it needs a reconstruction pass. Its built-in table entry now has 5.6's full match list.
AttoScsi (
AttoScsiInit.m/AttoScsiMisc.mempty), PowerSupply (no source) and in-kernel DEC21x4 (only the loadable project) are unchanged.sawtooth_interruptsnow matches the 5.6 table source for source (c14acd573). That needed new device ids in drvPExpert'sinterrupts.h(PMAC_DMA_UIDE,PMAC_DEV_UIDE,USB0/1,CARD12-25), andPMAC_DEV_PDS, which is unused, moved to 282 so no value is duplicated.@raynorpat commented on GitHub (Oct 18, 2026):
Status on branch
ppc-qemu(local):PPCSerialPort
couldn't get interrupts: still open.Floppy panic: fixed in
97dc15f7f. The kernel skips the Floppy probe when there is no swim3, and an interrupt missing from the table now warns instead of panicking.Built-in drivers. These are now built in as 5.6 has them:
b6e11b19d)582f67fd1)hw.powersupplysysctl (62700b0a9)Built-in Ethernet uses 5.6's load priority, 7200 (
492a0d32b), and UniNEnet links after DEC21x4 as in 5.6 (016e76f77). The loadableDEC21x4Ethernetproject's stub was replaced with the reconstructed driver (3b78bd622). AttoScsi (emptyAttoScsiInit.m/AttoScsiMisc.m) and AdaptecU2SCSI (doesn't compile) are still out of the build.I haven't booted the built-in DEC21x4 and PowerSupply in QEMU yet.
@raynorpat commented on GitHub (Oct 23, 2026):
Update on branch
ppc-qemu(not pushed yet): every driver the 5.6 kernel has built in is now reconstructed and built into ours.b6e11b19d); drives QEMU mac99's sungem582f67fd1); also matchespci1011,19(79679149d, a labelled divergence from 5.6), so it drives QEMU g3beige's tulip62700b0a9)f93514f04)f7765cdb5, merged indd8c20603)Item 2, the Floppy panic, was fixed in
97dc15f7f.Still open: item 1.
PPCSerialPortstill logsch-a/ch-b: couldn't get interruptson mac99, and nothing on the branch has touched it. Leaving this issue open for that.AttoScsi and AdaptecU2SCSI have no hardware under QEMU's ppc machines, so neither has been run under QEMU or on hardware yet.
@raynorpat commented on GitHub (Oct 23, 2026):
Item 1, the serial
couldn't get interruptslines, is fixed onppc-qemu(not pushed yet), which closes this issue's last open item.Cause. The serial ports were never broken; the message came from duplicate device-tree nodes. On mac99, OpenBIOS (like Apple's New World firmware) has both
esccandescc-legacyunder mac-io. Each hasch-a/ch-bchildren with identical interrupts:0x25/0x04/0x05for ch-a.PPCSerialPortmatchesch-a ch-b, so theesccchannels registered. Then theescc-legacychannels tried to allocate the same IRQ items inIOTreeDevice -resolveInterruptsand failed.Fix.
2d710454fmakesIODeviceTreeBus -probeBusskipescc-legacy, next to the existingAAPL,ignoreskip. It's labelled as a divergence from 5.6.Checked on QEMU mac99, with the guest's serial port on a TCP socket:
PPCSerialPort0 [ch-a]andPPCSerialPort1 [ch-b].couldn't get interruptslines are gone./dev/cuaapasses data both ways: host to guest (PING-RX-12345, which needs the receive interrupt) and guest to host (TX-FROM-GUEST).Two more fixes were needed to rebuild the kernel from the current branch. Both came in when master was merged into ppc-qemu:
65dd3fa09: restoreskeylargo_string_property_is, which the merge dropped. The kernel didn't link without it.816e04420: the DAVbus probe hung Sawtooth boot. It walked mac-io's children with a heap-allocated DT iterator fromconfigure_sawtooth, beforekalloc_init, sokfreespun inlock_write. It now uses a new allocation-freeDTIterateChildren.davbus_binding_testpasses (122 checks, 0 failures) after adding aDTFindChildEntrymock; that mock had been missing since the earlier i2c lookup change.The g3beige serial gap, where OpenBIOS lists one SCC interrupt instead of three, is tracked in #79.