Contributed by dwc on from the dept.
I recently laid my hands on an HP C3700 workstation. My first real exposure to UNIX was on an HP workstation, and I've always admired how solidly these machines are built. The original idea was to try and make some progress on OpenBSD/hppa64. Since the problems with hppa64 were mostly in supporting the host bridges, I started reading through the (somewhat limited) documentation that HP made available to the folks porting Linux to PA-RISC. I soon realised that these machines were built to support running a 32-bit kernel as well as a 64-bit kernel. And I wondered how much effort it would be to make my machine run OpenBSD/hppa instead of OpenBSD/hppa64. I was pretty sure there'd be people who'd appreciate faster OpenBSD/hppa machines.
So I started hacking, using the code Michael Shalayeff already wrote for OpenBSD/hppa64, and adding the missing bits. Soon I had code to walk the PCI bus and see what hardware was in the box. But the fun really started when I realised that the interrupt controllers in the machine were the same I/O SAPICs that Intel uses for Itanium. Once I had the interrupts working, the onboard network controller worked...sort of. The box spewed out watchdog timeout messages, but things worked well enough to boot from an NFS root. But it really shouldn't spit out those messages, so what was going on here.
I started reading Linux source code, and after fighting off the headache, I realised that the virtually indexed caches were back to haunt me. DMA on these machines is cache coherent. Which means that you don't need to flush the memory caches before doing DMA like on most other machines. However, since the caches are virtually indexed, this means the Astro chip responsible for the DMA needs to know about the virtual address of DMA memory as well as its physical address. Otherwise it won't be able to determine whether data it needs is in the cache or not. The way to provide these virtual addresses is by using an IOMMU. Usually IOMMU's are used the map 32-bit PCI bus addresses to 64-bit memory address, such that PCI devices designed for 32-bit machines can be used in 64-bit machines. But for these HP machines we need to use the IOMMU even in 32-bit mode. So I turned to OpenBSD/sparc64 (Sun UltraSPARC machines all have IOMMU's too) for inspiration and wrote code to deal with Astro's IOMMU.
This indeed fixed my watchdog problems and made it possible to access the internal disks, making my C3700 self hosting. And it looks as if most HP four digit B/C/J-class workstations will work. Not all of my code is in the tree yet, but the latest snapshots have the missing bits. So if you have one of these machines, give it a go and send in a dmesg.
This doesn't mean that hppa64 is off the table. I'd love to run my machine in 64-bit mode too; another 32 bits really help with address space randomization. It would really help if I had another disk for my machine, and these machines use some HP-specific brackets. So if anybody could donate one of those to me (preferably with a disk in it)...
Hacking on these boxes brought up memories of working on HP big iron, waiting for minutes for the beasts to boot, only to miss the "To discontinue, press any key within 10 seconds." prompt and having to wait for minutes again...
(Comments are closed)