[GH-ISSUE #5] ppc barebones drivers #5

Closed
opened 2026-11-03 22:02:03 -07:00 by gitea-mirror · 2 comments
Owner

Originally created by @raynorpat on GitHub (Oct 10, 2025).
Original GitHub issue: https://github.com/RhapsodiOS/RhapsodiOS/issues/5

Originally assigned to: @raynorpat on GitHub.

The PPC port has many more drivers than the i386 port, there are still several missing drivers that need to be created and tested

ppc driver list

This compares Mac OS X Server 1.2v3 (kernel 5.6) with our tree, as of 2026-10-18 (branch ppc-qemu). In 1.2v3 a driver is either compiled into mach_kernel (its class is in the kernel and listed in the built-in config table in autoconf_ppc.m) or loaded from /private/Drivers/ppc/*.config/*_reloc by BootX/driverLoader. Many have both forms; the on-disk copy of an in-kernel driver goes unused while the kernel's class matches.

"QEMU" means seen working on our kernel under qemu-system-ppc -M mac99 (vm/ppc-guest.py). On -M g3beige (Gossamer), both stock 5.6 and our kernel get Cuda/ADB and the display up and detect the Heathrow IDE. Our kernel has not yet booted past that point there; see #62.

Built into the 5.6 kernel

5.6 driver Matches Our source Built into our kernel QEMU
BMacEnet bmac bmac+ kernel-7/bsd/dev/ppc/drvBMacEnet yes —
UniNEnet (Sawtooth GMAC) gmac kernel-7/bsd/dev/ppc/drvUniNEnet yes (ppc-qemu) yes (en0 on sungem)
MaceEnet mace kernel-7/.../drvMaceEnet yes —
DEC21x4 apple21143, 21x4x PCI IDs kernel-7/.../drvDEC21x4 (reconstructed from 5.6) yes (ppc-qemu) not tested built in
DECchip21041 pci1011,14 kernel-7/.../drvDECchip21040 yes —
Apple96_SCSI 53c94 kernel-7/.../drvApple96_SCSI yes —
AppleMesh_SCSI mesh kernel-7/.../drvAppleMesh_SCSI yes —
EIDE (IdeController/AtapiController) + ATADisk ide ata ATA pci1095,646 kernel-7/.../drvPPCATA, drvATADisk yes yes (root disk, CD)
ApplePMU via-pmu kernel-7/.../drvPMU yes —
AppleCuda via-cuda kernel-7/.../drvCuda yes yes (ADB kbd/mouse)
AppleUSBCMD USB OHCI kernel-7/.../drvUSBCMD yes not tested (USB off)
AppleOHare pci106b,7 kernel-7/.../drvOHare yes —
Symbios8xx apple53C8xx Apple53C875Card kernel-7/.../drvSymbios8xx yes —
AttoScsi ATTO,ExpressPCIProLVD ATTO,ExpressPCIProUL2D kernel-7/.../drvAttoScsiController (reconstructed from Sym8xx and 5.6) yes (ppc-qemu) no hardware
AdaptecU2SCSI ADPT,2940U2B … ADPT,2940U2W ADPT,2940UW kernel-7/.../drvAdaptecU2SCSI (OSM and CHIM reconstructed from 5.6) yes (ppc-qemu) no hardware
PowerSupply redundant-power-supply kernel-7/.../drvPowerSupply (reconstructed, with hw.powersupply sysctl) yes (ppc-qemu) no hardware
IOMacRiscPCIBridge / VCI / Grackle / IOPCIBridge bandit uni-north / chaos / grackle / pci-bridge driverkit-3/libDriver/ppc yes yes (UniNorth; Grackle on g3beige)
IONDRVFramebuffer display driverkit-3/libDriver/ppc yes yes

Loadable drivers in /private/Drivers/ppc

1.2v3 bundle Class Our source QEMU
IOADBDevice ADBServer drivers-ppc/input/drvIOADBDevice —
IOApplePCIBus, IONDRVSupport, IODisplay (in-kernel classes) driverkit-3 —
drvPPC53c96 Apple96_SCSI drivers-ppc/scsi/drvPPC53c96 —
drvPPCMesh AppleMesh_SCSI drivers-ppc/scsi/drvPPCMesh —
drvPPCSym8xx Sym8xxController drivers-ppc/scsi/drvPPCSym8xx —
drvPPCATA IdeDisk, IdeController, AtapiController drivers-ppc/ide/drvPPCATA (kernel ATA sources, disk class renamed to IdeDisk; ppc package builds since f972a4be7) not load-tested; ATA is built into our kernel
drvPPCBMac BMacEnet drivers-ppc/network/drvPPCBMac —
drvPPCMace MaceEnet drivers-ppc/network/drvPPCMace —
drvPPCDec21040 DECchip21041 drivers-ppc/network/drvPPCDec21040 —
DEC21x4Ethernet DEC21x4 drivers-ppc/network/drvDEC21x4Ethernet (stub replaced by the reconstructed driver) stock binary attaches to tulip; superseded by the built-in DEC21x4 on our kernel
drvPPCGem GemEnet (Sun GEM card) drivers-ppc/network/drvPPCGem (register encodings match the stock binary since c3e7c2920; _startChip and the counter clear fixed) not needed on sungem (UniNEnet)
drvPPCGNic GNicEnet drivers-ppc/network/drvPPCGNic —
drvPPCCuda / drvPPCPMU / drvPPCOHare drivers-ppc/input/drvPPCCuda, input/drvPPCPMU, bus/drvPPCOHare —
PPCSerialPort PPCSerialPort drivers-ppc/input/drvPPCSerialPort registers, "couldn't get interrupts" (#63)
PPCAwacs PPCAwacs drivers-ppc/sound/drvPPCAwacs no hardware on mac99
drvPPCBurgundy PPCBurgundy drivers-ppc/sound/drvPPCBurgundy no hardware on mac99
(not in 1.2v3) TAS audio drivers-ppc/sound/drvPPCTASAudio —
Floppy FloppyController drivers-ppc/ide/drvPPCSwimFloppy probe skipped without a swim3; no panic (#63)
SCSITape, SCSIServer, PortServer, BPF src/drvSCSITape, drvSCSIServer, drvPortServer, drvBPF PortServer/BPF load

Open items

  • All built-in 5.6 drivers are reconstructed and built in on ppc-qemu (AttoScsi and AdaptecU2SCSI were the last).
  • Serial interrupts on Sawtooth: #63.
  • Old World clock calibration and the g3beige boot: #62.
Originally created by @raynorpat on GitHub (Oct 10, 2025). Original GitHub issue: https://github.com/RhapsodiOS/RhapsodiOS/issues/5 Originally assigned to: @raynorpat on GitHub. The PPC port has many more drivers than the i386 port, there are still several missing drivers that need to be created and tested ## ppc driver list This compares Mac OS X Server 1.2v3 (kernel 5.6) with our tree, as of 2026-10-18 (branch `ppc-qemu`). In 1.2v3 a driver is either compiled into `mach_kernel` (its class is in the kernel and listed in the built-in config table in `autoconf_ppc.m`) or loaded from `/private/Drivers/ppc/*.config/*_reloc` by BootX/driverLoader. Many have both forms; the on-disk copy of an in-kernel driver goes unused while the kernel's class matches. "QEMU" means seen working on our kernel under `qemu-system-ppc -M mac99` (`vm/ppc-guest.py`). On `-M g3beige` (Gossamer), both stock 5.6 and our kernel get Cuda/ADB and the display up and detect the Heathrow IDE. Our kernel has not yet booted past that point there; see #62. ### Built into the 5.6 kernel | 5.6 driver | Matches | Our source | Built into our kernel | QEMU | |---|---|---|---|---| | BMacEnet | `bmac bmac+` | `kernel-7/bsd/dev/ppc/drvBMacEnet` | yes | — | | UniNEnet (Sawtooth GMAC) | `gmac` | `kernel-7/bsd/dev/ppc/drvUniNEnet` | yes (ppc-qemu) | yes (en0 on sungem) | | MaceEnet | `mace` | `kernel-7/.../drvMaceEnet` | yes | — | | DEC21x4 | `apple21143`, 21x4x PCI IDs | `kernel-7/.../drvDEC21x4` (reconstructed from 5.6) | yes (ppc-qemu) | not tested built in | | DECchip21041 | `pci1011,14` | `kernel-7/.../drvDECchip21040` | yes | — | | Apple96_SCSI | `53c94` | `kernel-7/.../drvApple96_SCSI` | yes | — | | AppleMesh_SCSI | `mesh` | `kernel-7/.../drvAppleMesh_SCSI` | yes | — | | EIDE (IdeController/AtapiController) + ATADisk | `ide ata ATA pci1095,646` | `kernel-7/.../drvPPCATA`, `drvATADisk` | yes | yes (root disk, CD) | | ApplePMU | `via-pmu` | `kernel-7/.../drvPMU` | yes | — | | AppleCuda | `via-cuda` | `kernel-7/.../drvCuda` | yes | yes (ADB kbd/mouse) | | AppleUSBCMD | USB OHCI | `kernel-7/.../drvUSBCMD` | yes | not tested (USB off) | | AppleOHare | `pci106b,7` | `kernel-7/.../drvOHare` | yes | — | | Symbios8xx | `apple53C8xx Apple53C875Card` | `kernel-7/.../drvSymbios8xx` | yes | — | | AttoScsi | `ATTO,ExpressPCIProLVD ATTO,ExpressPCIProUL2D` | `kernel-7/.../drvAttoScsiController` (reconstructed from Sym8xx and 5.6) | yes (ppc-qemu) | no hardware | | AdaptecU2SCSI | `ADPT,2940U2B … ADPT,2940U2W ADPT,2940UW` | `kernel-7/.../drvAdaptecU2SCSI` (OSM and CHIM reconstructed from 5.6) | yes (ppc-qemu) | no hardware | | PowerSupply | `redundant-power-supply` | `kernel-7/.../drvPowerSupply` (reconstructed, with `hw.powersupply` sysctl) | yes (ppc-qemu) | no hardware | | IOMacRiscPCIBridge / VCI / Grackle / IOPCIBridge | `bandit uni-north` / `chaos` / `grackle` / `pci-bridge` | `driverkit-3/libDriver/ppc` | yes | yes (UniNorth; Grackle on g3beige) | | IONDRVFramebuffer | `display` | `driverkit-3/libDriver/ppc` | yes | yes | ### Loadable drivers in `/private/Drivers/ppc` | 1.2v3 bundle | Class | Our source | QEMU | |---|---|---|---| | IOADBDevice | ADBServer | `drivers-ppc/input/drvIOADBDevice` | — | | IOApplePCIBus, IONDRVSupport, IODisplay | (in-kernel classes) | `driverkit-3` | — | | drvPPC53c96 | Apple96_SCSI | `drivers-ppc/scsi/drvPPC53c96` | — | | drvPPCMesh | AppleMesh_SCSI | `drivers-ppc/scsi/drvPPCMesh` | — | | drvPPCSym8xx | Sym8xxController | `drivers-ppc/scsi/drvPPCSym8xx` | — | | drvPPCATA | IdeDisk, IdeController, AtapiController | `drivers-ppc/ide/drvPPCATA` (kernel ATA sources, disk class renamed to IdeDisk; ppc package builds since f972a4be7) | not load-tested; ATA is built into our kernel | | drvPPCBMac | BMacEnet | `drivers-ppc/network/drvPPCBMac` | — | | drvPPCMace | MaceEnet | `drivers-ppc/network/drvPPCMace` | — | | drvPPCDec21040 | DECchip21041 | `drivers-ppc/network/drvPPCDec21040` | — | | DEC21x4Ethernet | DEC21x4 | `drivers-ppc/network/drvDEC21x4Ethernet` (stub replaced by the reconstructed driver) | stock binary attaches to tulip; superseded by the built-in DEC21x4 on our kernel | | drvPPCGem | GemEnet (Sun GEM card) | `drivers-ppc/network/drvPPCGem` (register encodings match the stock binary since c3e7c2920; `_startChip` and the counter clear fixed) | not needed on sungem (UniNEnet) | | drvPPCGNic | GNicEnet | `drivers-ppc/network/drvPPCGNic` | — | | drvPPCCuda / drvPPCPMU / drvPPCOHare | | `drivers-ppc/input/drvPPCCuda`, `input/drvPPCPMU`, `bus/drvPPCOHare` | — | | PPCSerialPort | PPCSerialPort | `drivers-ppc/input/drvPPCSerialPort` | registers, "couldn't get interrupts" (#63) | | PPCAwacs | PPCAwacs | `drivers-ppc/sound/drvPPCAwacs` | no hardware on mac99 | | drvPPCBurgundy | PPCBurgundy | `drivers-ppc/sound/drvPPCBurgundy` | no hardware on mac99 | | (not in 1.2v3) | TAS audio | `drivers-ppc/sound/drvPPCTASAudio` | — | | Floppy | FloppyController | `drivers-ppc/ide/drvPPCSwimFloppy` | probe skipped without a swim3; no panic (#63) | | SCSITape, SCSIServer, PortServer, BPF | | `src/drvSCSITape`, `drvSCSIServer`, `drvPortServer`, `drvBPF` | PortServer/BPF load | ### Open items - All built-in 5.6 drivers are reconstructed and built in on `ppc-qemu` (AttoScsi and AdaptecU2SCSI were the last). - Serial interrupts on Sawtooth: #63. - Old World clock calibration and the g3beige boot: #62.
gitea-mirror 2026-11-03 22:02:03 -07:00
Author
Owner

@raynorpat commented on GitHub (Oct 15, 2025):

I've got most of the driver frameworks complete for the ppc specific items

<!-- gh-comment-id:3406772344 --> @raynorpat commented on GitHub (Oct 15, 2025): I've got most of the driver frameworks complete for the ppc specific items
Author
Owner

@raynorpat commented on GitHub (Oct 23, 2026):

The last two built-in 5.6 drivers are reconstructed and built into the ppc kernel on ppc-qemu.

  • AttoScsi: rebuilt from Sym8xx plus the 5.6 differences (new interrupt queueing, 895/896 clocking, LVD sense, period tables). The ppc kernel links with it.
  • AdaptecU2SCSI: all 476 bodies are recovered from 5.6, the OSM/controller plus all 392 CHIM functions with firmware and tables. The ppc kernel links with it, and all 444 reference driver symbols are present. Firmware and tables match 5.6 byte for byte. The body comparison against 5.6 found no behavioral differences beyond labelled divergences, and 2781 frozen routine cases pass on the linked kernel. The config entry now matches 5.6 and adds ADPT,2940U2W ADPT,2940UW.
  • Labelled fixes to 5.6 bugs:
    • AttoScsi: MinSEPeriod unset, the LVD flag cleared instead of set, and the async SDTR message given the sync period.
    • AdaptecU2SCSI: a NULL write in ProbeTarget, the parity-retry double completion in NormalPostRoutine, and an IOB leak in threadExecuteRequest:.

Neither driver has been run on hardware or under QEMU, since mac99 has no matching SCSI card. Serial interrupts (#63) and the g3beige boot (#62) stay open in their own issues.

<!-- gh-comment-id:6363259799 --> @raynorpat commented on GitHub (Oct 23, 2026): The last two built-in 5.6 drivers are reconstructed and built into the ppc kernel on `ppc-qemu`. - **AttoScsi:** rebuilt from Sym8xx plus the 5.6 differences (new interrupt queueing, 895/896 clocking, LVD sense, period tables). The ppc kernel links with it. - **AdaptecU2SCSI:** all 476 bodies are recovered from 5.6, the OSM/controller plus all 392 CHIM functions with firmware and tables. The ppc kernel links with it, and all 444 reference driver symbols are present. Firmware and tables match 5.6 byte for byte. The body comparison against 5.6 found no behavioral differences beyond labelled divergences, and 2781 frozen routine cases pass on the linked kernel. The config entry now matches 5.6 and adds `ADPT,2940U2W ADPT,2940UW`. - **Labelled fixes to 5.6 bugs:** - AttoScsi: `MinSEPeriod` unset, the LVD flag cleared instead of set, and the async SDTR message given the sync period. - AdaptecU2SCSI: a NULL write in `ProbeTarget`, the parity-retry double completion in `NormalPostRoutine`, and an IOB leak in `threadExecuteRequest:`. Neither driver has been run on hardware or under QEMU, since mac99 has no matching SCSI card. Serial interrupts (#63) and the g3beige boot (#62) stay open in their own issues.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github-starred/RhapsodiOS#5
No description provided.