3 ms·
QEMU has POWER emulation and can even (I’ve heard) run AIX, so in principle could be extended to run IBM i too. The problems are instructions which only IBM i u
by skissane 2y ago
QEMU has POWER emulation and can even (I’ve heard) run AIX, so in principle could be extended to run IBM i too. The problems are instructions which only IBM i uses, for which public documentation is missing or incomplete, and hence QEMU doesn’t emulate-but blog posts like this could help in closing that gap.
Another gap is there are firmware APIs that only IBM i uses, so QEMU doesn’t implement those either - and again, public documentation is missing. Of course, people could reverse engineer these calls and implement them. An option (even if only a temporary one) might be to dump the firmware of an actual system and emulate it rather than trying to directly implement the firmware calls. My understanding is (beware my info could be wrong, a lot of this is just my own guesses) is parts of the firmware are actually modules loaded from disk (“LIDs”), and part of the boot process is actually loading these extensions and adding them to the firmware image on the system board.
Of course, there is also the legal issue. But the reality is that most people who run z/OS on Hercules are doing so illegally, and while in theory IBM could sue them, in practice IBM only appears interest in that if you try to turn it into a business, as opposed to just a hobby. Technically it may be possible to legally run z/OS under Hercules, if you have a real mainframe licensed to run z/OS, and then you run Hercules on that mainframe. And similarly, in theory, if you have a POWER box licensed to run IBM i, it might be legal to run it on that box under an open source emulator (if one existed). However, I suspect very few people have ever done that. (And ask your lawyer to check the fine print of IBM’s licensing agreements, because even though in theory they should allow that, it all depends on precisely how they are worded.) So, I doubt technical illegality is really that big an issue in practice.
I think the real problem here is a cultural issue. IBM mainframes historically were really open in exposing their internals, and so lots of customers and vendors developed deep expertise in z/OS internals, even to the point of writing custom kernel modules (nucleus modules to use the proper terminology). So there is a big skill base of people available to work on Hercules. By contrast, IBM i internals have historically been much more hidden from customers, leaving most of the people who know them well either (ex-)IBM employees, or partner vendor (ex-)employees who have signed IBM NDAs - obviously those people worry that working on an open source emulator might risk negative legal attention from IBM. Plus people with mainframe internals skills have always been a numerically larger community than people with IBM i internals skills
- shrubble 2y agoThere is a personal/dev license of z/OS called ATDT I think, which you could run legally on Hercules.
- skissane 2y agozPDT (which also goes by a few other names, including ZD&T, RDz-I think they are all essentially the same software just with somewhat different licensing) let you legally run z/OS under emulation. While it is intended to use with IBM’s emulator, maybe you can use Hercules instead-you’d have to check the fine print. But the problem with those products, is they cost approximately US$5000 a year - beyond the means of all but the most dedicated hobbyist At one point there was a “ZD&T Learners Edition”, which was only US$120 a year-much more reasonable. The problem is (1) it was only ever available to people in the US, which excludes many people (including me), (2) I am led to believe it has been discontinued and is no longer available
- kotaKat 2y agoI wanted to poke around ZD&T Learners Edition but I was slightly annoyed that I couldn't just pick it up and self-explore, IBM wanted me to "prove" myself with challenges or professional experience. Hercules it is for me...
- rbanffy 2y ago> public documentation is missing This is key. The AS/400 was never as documented as the IBM mainframe lines. I suspect the 360 open documentation was forced upon IBM by the many antitrust lawsuits. The AS/400 and its ancestors were never subject to these pressures.
- skissane 2y agoThere was more documentation available for System/38. Apparently, System/38 even had source code available on microfiche. (Unclear who if anyone still has it in their possession.) By the time AS/400 came along, IBM had already become a lot more secretive. But CISC AS/400 was essentially System/38 Version 2.0, so a lot of the System/38 information still applied. It was more a matter of studying the system to work out where the changes/extensions were. And RISC AS/400 was about as secretive, and less of the old System/38 documentation is applicable. On the other hand, it has a lot in common with AIX and Linux on POWER. One of the more amusing oddities of AS/400, in my opinion, is some small part of it is descended from OS/2: if you look at the system header files, you will find very vestigial copies of a small number of OS/2 headers – bse.h, bsedos.h, bseerr.h. However, although this basic structure of header files is copied from OS/2, almost all the functions are missing–only two actual OS/2 API functions are present (DosSetRelMaxFH and DosSetFileLocks). My guess is at some point they planned to port more OS/2 APIs to AS/400, but hadn't got very far when they abandoned the whole idea.