summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include/reg.h
Commit message (Collapse)AuthorAgeFilesLines
* Provide groundwork for 32-bit binary compatibility on non-x86 platforms,nwhitehorn2010-03-111-0/+9
| | | | | | | | | for upcoming 64-bit PowerPC and MIPS support. This renames the COMPAT_IA32 option to COMPAT_FREEBSD32, removes some IA32-specific code from MI parts of the kernel and enhances the freebsd32 compatibility code to support big-endian platforms. Reviewed by: kib, jhb
* Replace uint64_t with unsigned long in struct dbreg.marcel2004-03-201-2/+2
|
* Revamp of the syscall path, exception and context handling. Themarcel2003-05-161-33/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* At great personal risk, add a __packed and __aligned(x) define thatpeter2002-09-231-1/+1
| | | | | | | | | | expand to __attribute__((packed)) and __attribute__((aligned(x))) respectively. Replace the handful of gcc-ism's that use __attribute__((aligned(16))) etc around the kernel with __aligned(16). There are over 400 __attribute__((packed)) to deal with, that can come later. I just want to use __packed in new code rather than add more gcc-ism's.
* Renamed poorly named setregs to exec_setregs. Moved its prototype tojake2002-08-291-1/+0
| | | | imgact.h with the other exec support functions.
* Flesh-out ptrace support. This obviously needs more work.marcel2002-05-201-0/+1
|
* Add missing #endifmarcel2002-05-101-4/+18
|
* Remove __P.alfred2002-03-201-9/+9
| | | | Reviewd by: peter
* [partially forced commit due to pilot error in earlier commit attempt]des2001-10-211-0/+10
| | | | | | | | | | | | | | | | | {set,fill}_{,fp,db}regs() fixup: - Add dummy {set,fill}_dbregs() on architectures that don't have them. - KSEfy the powerpc versions (struct proc -> struct thread). - Some architectures had the prototypes in md_var.h, some in reg.h, and some in both; for consistency, move them to reg.h on all platforms. These functions aren't really MD (the implementation is MD, but the interface is MI), so they should move to an MI header, but I haven't figured out which one yet. Run-tested on i386, build-tested on Alpha, untested on other platforms.
* KSE Milestone 2julian2001-09-121-2/+2
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* * Fix exception handling so that it actually works. We can now handledfr2000-10-121-2/+2
| | | | | | | | | | | | | | | | exceptions from both kernel and user mode. * Fix context switching so that we can switch back to a proc which we switched away from (we were saving the state in the wrong place). * Implement lazy switching of the high-fp state. This needs to be looked at again for SMP to cope with the case of a process migrating from one processor to another while it has the high-fp state. * Make setregs() work properly. I still think this should be called cpu_exec() or something. * Various other minor fixes. With this lot, we can execve() /sbin/init and we get all the way up to its first syscall. At that point, we stop because syscall handling is not done yet.
* Next round of fixes to the ia64 code. This includes simulated clock anddfr2000-10-041-0/+6
| | | | | | | disk drivers along with a load of fixes to context switching, fork handling and a load of other stuff I can't remember now. This takes us as far as start_init() before it dies. I guess now I will have to finish off the VM system and syscall handling :-).
* This is the first snapshot of the FreeBSD/ia64 kernel. This kernel willdfr2000-09-291-0/+58
not work on any real hardware (or fully work on any simulator). Much more needs to happen before this is actually functional but its nice to see the FreeBSD copyright message appear in the ia64 simulator.
OpenPOWER on IntegriCloud