cvs commit: src/sys/amd64/amd64 exception.S machdep.c
Peter Wemm
peter at FreeBSD.org
Tue Sep 9 12:32:11 PDT 2003
peter 2003/09/09 12:32:09 PDT
FreeBSD src repository
Modified files:
sys/amd64/amd64 exception.S machdep.c
Log:
Clean up get/set_mcontext() and get/set_fpcontext(). These are operated
on data structures on the kernel stack which are guaranteed to be 16 byte
aligned by gcc, the amd64 ABI and __aligned(16).
Ensire the tss_rsp0 initial stack pointer is 16 byte aligned in case
sizeof(pcb) becomes odd at some point. This is convenient for the
interrupt handler case because the ring crossing pushes cause the
required odd alignment before the call to the C code.
Have fast_syscall add an additional 8 bytes to ensure that the trapframe
has the correct odd alignment for the call to C code. Note that there are
no checks to make sure that the trapframe size is appropriate for this.
This makes get/setfpcontext work properly (finally). You get a GPF in
kernel mode if any of this is botched without the alignment fixup code
that is apparently needed on i386.
Revision Changes Path
1.111 +2 -2 src/sys/amd64/amd64/exception.S
1.589 +28 -64 src/sys/amd64/amd64/machdep.c
More information about the cvs-src
mailing list