> In x86 there are at least three different ways to call a system > call, int $0x80, sysenter, and syscall. In 64 bit mode I think syscall > is pretty much guaranteed to be there so glibc uses it directly, or at > least that's been my experience. For 32 bit x86, though, sysenter, the > preferred of the two remaining instructions, is not necessarily present > or enabled. What Linux does to handle this situation is that there's a > vsyscall page which the kernel defines and which is mapped into the user > level process at an address the kernel provides through an auxiliary > vector on the initial stack frame. When it wants to do a system call, it > jumps to the right location on the vsyscall page and the right > instruction is there. Otherwise, system calls happen through the > relatively slow int $0x80 interface. > > This is generally fine and it's not hard to put that page in place > and put something useful on it, but in order to exactly match native > execution in M5 I need to put the exact same instructions on my vsyscall > page as appears in Linux. I don't know how this all works as far as > licensing goes. Do we have to use GPL if I copy the bytes that implement > a portion of that page into M5 for compatibility?
How many instructions are we talking about? If it's only a handful and there is only one way you can do things, I think it should be ok. Nate _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
