freebsd-nq/sys/ia64/include
Marcel Moolenaar f2c49dd248 Revamp of the syscall path, exception and context handling. The
prime objectives are:
o  Implement a syscall path based on the epc inststruction (see
   sys/ia64/ia64/syscall.s).
o  Revisit the places were we need to save and restore registers
   and define those contexts in terms of the register sets (see
   sys/ia64/include/_regset.h).

Secundairy objectives:
o  Remove the requirement to use contigmalloc for kernel stacks.
o  Better handling of the high FP registers for SMP systems.
o  Switch to the new cpu_switch() and cpu_throw() semantics.
o  Add a good unwinder to reconstruct contexts for the rare
   cases we need to (see sys/contrib/ia64/libuwx)

Many files are affected by this change. Functionally it boils
down to:
o  The EPC syscall doesn't preserve registers it does not need
   to preserve and places the arguments differently on the stack.
   This affects libc and truss.
o  The address of the kernel page directory (kptdir) had to
   be unstaticized for use by the nested TLB fault handler.
   The name has been changed to ia64_kptdir to avoid conflicts.
   The renaming affects libkvm.
o  The trapframe only contains the special registers and the
   scratch registers. For syscalls using the EPC syscall path
   no scratch registers are saved. This affects all places where
   the trapframe is accessed. Most notably the unaligned access
   handler, the signal delivery code and the debugger.
o  Context switching only partly saves the special registers
   and the preserved registers. This affects cpu_switch() and
   triggered the move to the new semantics, which additionally
   affects cpu_throw().
o  The high FP registers are either in the PCB or on some
   CPU. context switching for them is done lazily. This affects
   trap().
o  The mcontext has room for all registers, but not all of them
   have to be defined in all cases. This mostly affects signal
   delivery code now. The *context syscalls are as of yet still
   unimplemented.

Many details went into the removal of the requirement to use
contigmalloc for kernel stacks. The details are mostly CPU
specific and limited to exception_save() and exception_restore().
The few places where we create, destroy or switch stacks were
mostly simplified by not having to construct physical addresses
and additionally saving the virtual addresses for later use.

Besides more efficient context saving and restoring, which of
course yields a noticable speedup, this also fixes the dreaded
SMP bootup problem as a side-effect. The details of which are
still not fully understood.

This change includes all the necessary backward compatibility
code to have it handle older userland binaries that use the
break instruction for syscalls. Support for break-based syscalls
has been pessimized in favor of a clean implementation. Due to
the overall better performance of the kernel, this will still
be notived as an improvement if it's noticed at all.

Approved by: re@ (jhb)
2003-05-16 21:26:42 +00:00
..
pc use __packed. 2002-09-23 18:54:32 +00:00
_inttypes.h Since printf(3) now supports the `j' conversion specifier, use that 2002-06-30 05:48:03 +00:00
_limits.h Style fixes. 2003-05-04 22:13:04 +00:00
_regset.h This file creates register sets based on the runtime specification. 2003-05-15 08:36:03 +00:00
_stdint.h Create a new header <machine/_stdint.h> for storing MD parts of 2002-07-29 17:41:23 +00:00
_types.h - Add vm_paddr_t, a physical address type. This is required for systems 2003-03-25 00:07:06 +00:00
acpica_machdep.h Resolve conflicts arising from the ACPI CA 20020725 import. 2002-07-30 19:35:32 +00:00
asm.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
atomic.h Simplify IA64_CMPXCHG to avoid having braced-groups in expressions. 2002-05-19 20:19:07 +00:00
bootinfo.h Use one of the bi_spare entries for the DIG64 HCDP table address. 2002-12-08 20:32:56 +00:00
bus_memio.h
bus_pio.h
bus.h Revamp the newbus functions: 2003-04-29 09:50:03 +00:00
clock.h Replace the hardcoding of 255 as the clock interrupt vector with 2003-01-06 01:39:25 +00:00
clockvar.h
cpu.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
cpufunc.h Revamp the newbus functions: 2003-04-29 09:50:03 +00:00
critical.h Stage-2 commit of the critical*() code. This re-inlines cpu_critical_enter() 2002-04-01 23:51:23 +00:00
db_machdep.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
dig64.h More MFp4: DIG64 structures. 2002-12-18 18:52:20 +00:00
efi.h
elf.h Infrastructure tweaks to allow having both an Elf32 and an Elf64 executable 2002-07-20 02:56:12 +00:00
endian.h Be careful not to define GCC-specific optimizations in the non-GCC 2002-09-23 04:32:17 +00:00
exec.h
float.h Correct LDBL_* constants based on values from i386. 2003-03-27 20:38:22 +00:00
floatingpoint.h
fpu.h
frame.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
ia64_cpu.h o Remove namespace pollution from param.h: 2002-05-19 04:42:19 +00:00
ieee.h
ieeefp.h s/_ALPHA_/_MACHINE_/ 2002-05-13 05:01:05 +00:00
in_cksum.h
inst.h
intr.h Don't hardcode the address of the local (S)APIC (aka processor 2003-01-05 22:14:30 +00:00
intrcnt.h Bump the number of interrupts from 65 to 257. This is a waste of 2003-01-05 22:00:19 +00:00
ioctl_bt848.h
ioctl_meteor.h
kse.h Add a copy of the sparc64 machine/kse.h to satisfy depencies.. 2002-06-29 18:07:50 +00:00
limits.h Deprecate machine/limits.h in favor of new sys/limits.h. 2003-04-29 13:36:06 +00:00
mca.h Remove the definition of struct mca_guid and use the generic 2002-05-29 05:19:07 +00:00
md_var.h Remove special casing for running in the simulator from the kernel 2003-02-01 22:50:09 +00:00
mutex.h
nexusvar.h Convert NEXUS_ACCESSOR to use the __BUS_ACCESSOR 2002-08-22 19:47:10 +00:00
pal.h
param.h Kill MID_MACHINE, its a.out specific, the only platform that supports 2003-04-30 23:16:33 +00:00
pcb.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
pci_cfgreg.h
pcpu.h Remove unused MD fields (pc_pending_ipis, pc_next_asn and 2001-12-30 09:39:41 +00:00
pmap.h Don't use the tpa instruction to implement pmap_kextract. The tpa 2003-04-22 01:48:43 +00:00
proc.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
profile.h Change critical_t to register_t for intr_disable/restore. 2002-03-21 09:50:11 +00:00
pte.h
ptrace.h Move the definition of PT_[GS]ET{,DB,FP}REGS from the MD ptrace.h to the 2002-03-16 00:25:53 +00:00
reg.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
reloc.h
resource.h
rse.h
runq.h Move the "- 1" into the RQB_FFS(mask) macro itself so that 2002-06-20 06:21:20 +00:00
sal.h Remove special casing for running in the simulator from the kernel 2003-02-01 22:50:09 +00:00
sapicreg.h
sapicvar.h List the IO SAPIC delivery mode definitions. 2002-10-04 01:33:30 +00:00
setjmp.h Fix threaded applications on ia64 that are linked dynamicly. We did 2003-03-05 04:39:24 +00:00
sigframe.h Split 4.x and 5.x signal handling so that we can keep 4.x signal 2002-10-25 19:10:58 +00:00
signal.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
smp.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
stdarg.h o Add conditionals to allow va_list to be defined in other headers. 2002-10-06 22:01:07 +00:00
sysarch.h
ucontext.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
unwind.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
varargs.h Add conditionals to allow va_list to be defined in other headers. 2002-10-06 22:02:06 +00:00
vmparam.h Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00