Subject: Re: Emulation pointer wanted
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 09/14/1999 15:02:08
At 02:29 PM 9/14/99 , der Mouse wrote:
>I was pondering some of the "build lab" problems, and it occurred to me
>that while cross-compiling is nice, it would be nicer to run native
>compilers for the slow ports (such as sun3 and vax).  But of course
>you'd really like to run them on fast hardware.

I've had the exact same thoughts.  

>I was thinking of doing this as an emulation package in the kernel,
>having the kernel load the emulator executable somewhere "out of the
>way" (as if by an address-unspecified mmap) and then turn control over
>to it after loading the executable itself "normally".  Then you could
>use, say, the VAX native toolchain, building VAX native executables,
>but running on some killer Alpha or something, far faster than a real
>VAX.  Of course, the emulation wouldn't be perfect; any kmem groveler,
>for example, is instant toast.  But it should be fairly straightforward
>to make it good enough to run the toolchain.

It should be done so that you can run nested emulations (Linux on i386 on
alpha).

>This shouldn't be hard to do.  I believe I could build, say, a VAX
>emulator to run on a SPARC (I pick those simply because they are the
>two architectures I know best).  As I see it, there are three issues:
>
>(a) Emulating the instructions
>(b) Emulating failure modes

This includes writing out core's appropriate for the emulated
architecture.

>(c) Emulating syscalls

This may also depend on the emulations.  However, maybe some
of the netbsd32 work may be useful.

>(d) Getting it started

I just got faster hardware instead.  (I'm still looking for a
DS5000/260 and a VS4000/96 :-)
-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message