Stuart Turner - 2004-10-09

Hey, I was wanting to do some work similar to coLinux, so I was looking through the coLinux code.  I was wondering if someone could give me a bit more detail about passage.c in [coLinux]/src/colinux/arch/i386.  I know it has to do with switching from linux to windows, but I'm afraid I don't quite understand what it is really doing.  If I understand it right, it is changing all of the system registers to point to coLinux code, effectively changing the running os to the linux kernel loaded.  If so, then how does it intercept system calls made through the amd syscall or the intel sysenter opcode?  If it doesn't, then how does coLinux keep the system stable as a program progresses into the Windows kernel?  Also, are there plans to attempt to intercept system calls made through these opcodes, because the amd64 abi relies on syscall, if I remember correctly, or are there no plans to include amd64?
Thanks in advance,
Stuart Turner