On Wed, Sep 23, 2009 at 2:49 PM, Vince Weaver <[email protected]> wrote:
>
> In most cases the Linux syscalls are fairly similar across ISA's.  The
> biggest outlier is Alpha, which unfortunately seems to be the original
> version that the rest of m5 cut-and-pasted from.

Worse yet, the original implementation was for Tru64 on Alpha, so the
Alpha Linux syscalls may even be derived from that...

> The big difference is 32-bit/64-bit, it would be nice if somehow those
> were done up generically, that's where a lot of the current code
> duplication seems to be coming from.
>
> It's a shame we can't latch onto an existing syscall implementation.
> Qemu's for example is pretty complete, and handles things like endianess
> that I don't think m5 worries much about yet.

Endianness is a huge pain indeed.  Does qemu actually do system call
emulation?  I thought it just did full-system emulation (like our FS
mode).  That's actually much easier to get right as far as endianness,
and I believe we do cross-endian just fine in FS mode too, since it's
only a matter of swizzling the bytes properly between simualted memory
and simulated processor registers.  It's having to translate
individual arguments in syscall emulation that's very challenging.

Unfortunately, even if qemu does have it all figured out, since it's
gpl (last time I looked) we can't steal their code without
compromising our bsd license which is not something we'd consider.

Steve
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to