AMD64 - Make signals operational, fix reg mappings, fix %fs management, trace
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 2 Apr 2009 00:57:01 +0000 (17:57 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 2 Apr 2009 00:57:01 +0000 (17:57 -0700)
commit5b9f6cc4be80527177ee4b19a289116490881da0
tree7c1e0e8143f2f990261f83a1a0bfa5246f9deb73
parent4648abf34c6553cd0279cfaac35eb1989d4ec7af
AMD64 - Make signals operational, fix reg mappings, fix %fs management, trace

Adjust sigframe, trapframe, mcontext, ucontext, and regs.  Add tf_xflags
too all structures.  Reorder struct regs to match the register layout
in the other structures.

Implement the commented out signaling code.  Signals now work, or at least
do not crash programs.  Theoretically the FP state is also saved and restored.

The exec() code failed to adjust gd_user_fs and gd_user_gs when setting
the msr registers for the user %fs and %gs, causing %fs to unexpectedly
change in running user programs.

Implement trace/debug support functions to set %rip and to single-step.

Define the missing vkernel flag FP_SOFTFP.
16 files changed:
sys/cpu/amd64/include/asmacros.h
sys/cpu/amd64/include/frame.h
sys/cpu/amd64/include/pmap.h
sys/cpu/amd64/include/psl.h
sys/cpu/amd64/include/reg.h
sys/cpu/amd64/include/signal.h
sys/cpu/amd64/include/ucontext.h
sys/platform/pc64/amd64/exception.S
sys/platform/pc64/amd64/genassym.c
sys/platform/pc64/amd64/ipl.s
sys/platform/pc64/amd64/machdep.c
sys/platform/pc64/amd64/support.s
sys/platform/pc64/amd64/swtch.s
sys/platform/pc64/amd64/trap.c
sys/platform/pc64/icu/icu_vector.s
sys/platform/pc64/include/pcb.h