summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include/pcb.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove ia64.marcel2014-07-071-75/+0
| | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan
* Add a convenience macro for the returns_twice attribute, and apply it todim2012-04-291-2/+2
| | | | | | | the prototypes of the appropriate functions (getcontext, savectx, setjmp, sigsetjmp and vfork). MFC after: 2 weeks
* Don't include <machine/_regset.h> when _MACHINE_REGSET_H_ in defined.marcel2010-03-211-0/+2
| | | | | | | This is not for multiple inclusion purposes, because _regset.h already handles this, but to enable inclusion of the MD header by cross-tools on non-ia64 installations. The cross-tool can include _regset.h itself before including MD headers that depend on it.
* As I said: the previous commit was untested... Remove an #endif whichmarcel2004-08-161-1/+0
| | | | should have ceased to exist when its corresponding #if was removed.
* Catch up with the drive-by renaming of IA32 to COMPAT_IA32. It mustmarcel2004-08-161-3/+1
| | | | | | | | | | have been rush hour... While here, move COMPAT_IA32 from opt_global.h to opt_compat.h like on amd64. Consequently, it's unsafe to use the option in pcb.h. We now unconditionally have the ia32 specific registers in the PCB. This commit is untested.
* Implement makectx(). The makectx() function is used by KDB to createmarcel2004-07-101-1/+5
| | | | | | | | | a PCB from a trapframe for purposes of unwinding the stack. The PCB is used as the thread context and all but the thread that entered the debugger has a valid PCB. This function can also be used to create a context for the threads running on the CPUs that have been stopped when the debugger got entered. This however is not done at the time of this commit.
* Cleanup prototypes in cpu.h, including fswintrberr and any referencesmarcel2003-08-121-1/+0
| | | | | | to it. Sort the remaining prototypes in cpu.h. No functional change.
* Revamp of the syscall path, exception and context handling. Themarcel2003-05-161-56/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* Rewrite cpu_switch(). The most notable change is the fact that we nowmarcel2002-10-301-36/+53
| | | | | | | | | | have f16-f31 as part of the context. The PCB has been reorganized to better match how we save and restore the (preserved) registers. This commit also moves the context restoriation to its own function (named pcb_restore), as we did with pcb_save. Only minimal effort has been put in writing optimal assembly. The expectation is that there will be more rounds of changes.
* The a.out md_coredump stuff isn't referenced anywhere anymore, andpeter2002-10-151-7/+0
| | | | hasn't been filled in for ages.. Nuked.
* o Move prototypes for restorectx and savectx from cpu.h to pcb.h,marcel2002-05-191-2/+6
| | | | o Remove Alpha specific contents of struct md_coredump.
* o Add ar.lc to the pcb.marcel2002-05-071-0/+1
| | | | | | | | | o Create pcb_save as the backend for savectx and cpu_switch. o While here, use explicit bundling for pcb_save and optimize for compactness (~87% density). o Not part of the commit is a backend pcb_restore. restorectx() still jumps halfway into cpu_switch().
* Add fields for saving/restoring the IA-32 state.dfr2002-04-101-0/+8
|
* Add a field to hold the current pmap of a thread.dfr2002-03-141-0/+1
|
* Axe pcb_schednest as it is no longer used.jhb2001-02-221-1/+0
|
* * Fix exception handling so that it actually works. We can now handledfr2000-10-121-0/+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/+1
| | | | | | | 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 :-).
* Next round of ia64 work, including fixes to context switching,dfr2000-09-301-3/+9
| | | | | implementing cpu_fork(), copy*str(), bcopy(), copy{in,out}(). With these changes, my test kernel reaches the mountroot prompt.
* This is the first snapshot of the FreeBSD/ia64 kernel. This kernel willdfr2000-09-291-0/+68
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