I never dug that deep into her work. If I were to guess, I would say that
this was aimed at user-space sorts of code. It was aimed at making it
possible to run large old 370 binaries in Power PC architecture machines.
If I recall correctly, there was some discussion of migrating off of the
S370 (later S390 and then z-system) ISA to the Power PC architecture. My
sense was that this was a research study to understand whether a naive
translation like this could work.
I can not imagine trying to translate system code in this way.
=====
<https://www.mindthegapdialogs.com/home>
On Wed, Jul 10, 2024 at 1:07 PM segaloco via TUHS <tuhs(a)tuhs.org> wrote:
On Wednesday, July 10th, 2024 at 7:12 AM, Marc Donner
<
marc.donner(a)gmail.com> wrote:
The basic technique was to load pages of 360
machine code unmodified
into Power PC memory, marking the pages as dirty. If the
machine branched
into one of these pages the VM trap handler would take the page and
translate all of its code from 370 instructions to Power PC instructions.
Once that was done the branch, suitably recalculated, was reinstated.
Was this under the assumption everything else going on (bus architecture,
memory map, exception/trap handling, etc.) was exactly the same or was the
MMU for instance in the picture translating from 370 addresses to their
equivalents on whatever PowerPC machine was in play?
That or was this only expected to work on PIC, user-level code and
anything touching for instance privilege escalation or with explicit
address pointers, I/O port access, etc. just understood to not be
applicable to such a direct translation? To tie it back to UNIX, for
instance, was this thing also able to detect that a UNIX system call was
being made and translate the 370 syscall mechanism into the PowerPC syscall
mechanism?
My main experience with emulation is console video games so in that realm,
you're dealing not only with a different CPU architecture but system bus,
memory map, peripheral controllers, etc. Essentially you're not just
speaking another language, you're on another planet entirely. This has
lead to a entrenched belief in my mind that this sort of "direct
translation" of CPU operations is a non-starter in emulation hence my
curiosity. If there's some historic approach to emulation efficiently
handling system architecture diversity beyond just CPU instructions, I'm
certainly interested!
- Matt G.
P.S. Feeling trepid about continuing this thread on TUHS rather than COFF,
but resisting the urge to bump it (again). To keep it on topic, I'd mostly
be interested in how this sort of thing would handle the UNIX system call
mechanism, because that would certainly illuminate the general idea of
translating something more complicated than an algorithm.