summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/frame.h
Commit message (Collapse)AuthorAgeFilesLines
* Duplicate the copyright from the i386/i386/machdep.c intokib2015-07-101-6/+36
| | | | | | | | | | | i386/include/frame.h after a code was moved from machdep.c to frame.h in r284925. Use include guards style similar to other guards. Noted by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Move CS_SECURE() and EFL_SECURE() macros to the machine/frame.h. Theykib2015-06-291-0/+8
| | | | | | | are useful for most implementations of sendsig(). Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Convert machine/elf.h, machine/frame.h, machine/sigframe.h,kib2013-02-201-97/+3
| | | | | | | | | | | | | | machine/signal.h and machine/ucontext.h into common x86 includes, copying from amd64 and merging with i386. Kernel-only compat definitions are kept in the i386/include/sigframe.h and i386/include/signal.h, to reduce amd64 kernel namespace pollution. The amd64 compat uses its own definitions so far. The _MACHINE_ELF_WANT_32BIT definition is to allow the sys/boot/userboot/userboot/elf32_freebsd.c to use i386 ELF definitions on the amd64 compile host. The same hack could be usefully abused by other code too.
* Tweak how the MD code calls the fooclock() methods some. Instead ofjhb2005-12-221-25/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | passing a pointer to an opaque clockframe structure and requiring the MD code to supply CLKF_FOO() macros to extract needed values out of the opaque structure, just pass the needed values directly. In practice this means passing the pair (usermode, pc) to hardclock() and profclock() and passing the boolean (usermode) to hardclock_cpu() and hardclock_process(). Other details: - Axe clockframe and CLKF_FOO() macros on all architectures. Basically, all the archs were taking a trapframe and converting it into a clockframe one way or another. Now they can just extract the PC and usermode values directly out of the trapframe and pass it to fooclock(). - Renamed hardclock_process() to hardclock_cpu() as the latter is more accurate. - On Alpha, we now run profclock() at hz (profhz == hz) rather than at the slower stathz. - On Alpha, for the TurboLaser machines that don't have an 8254 timecounter, call hardclock() directly. This removes an extra conditional check from every clock interrupt on Alpha on the BSP. There is probably room for even further pruning here by changing Alpha to use the simplified timecounter we use on x86 with the lapic timer since we don't get interrupts from the 8254 on Alpha anyway. - On x86, clkintr() shouldn't ever be called now unless using_lapic_timer is false, so add a KASSERT() to that affect and remove a condition to slightly optimize the non-lapic case. - Change prototypeof arm_handler_execute() so that it's first arg is a trapframe pointer rather than a void pointer for clarity. - Use KCOUNT macro in profclock() to lookup the kernel profiling bucket. Tested on: alpha, amd64, arm, i386, ia64, sparc64 Reviewed by: bde (mostly)
* Change the i386 code to pass the interrupt vector as a separate argumentjhb2005-12-051-31/+1
| | | | | | | | | | | | | | | | | | | rather than embedding it in the intrframe as if_vec. This reduces diffs with amd64 somewhat. - Remove cf_vec from clockframe (it wasn't used anyway) and stop pushing dummy vector arguments for ipi_bitmap_handler() and lapic_handle_timer() since clockframe == trapframe now. - Fix ddb to handle stack traces across interrupt entry points that just have a trapframe on their stack and not a trapframe + vector. - Change intr_execute_handlers() to take a trapframe rather than an intrframe pointer. - Change lapic_handle_intr() and atpic_handle_intr() to take a vector and trapframe rather than an intrframe. - GC struct intrframe now that nothing uses it anymore. - GC CLOCK_TO_TRAPFRAME() and INTR_TO_TRAPFRAME(). Reviewed by: bde Requested by: peter
* Update for the KDB framework:marcel2004-07-101-2/+1
| | | | | | | | | | o s/ddb_on_nmi/kdb_on_nmi/g o Rename sysctl machdep.ddb_on_nmi to machdep.kdb_on_nmi o Make debugging support conditional upon KDB instead of DDB. o Call kdb_reenter() when kdb_active is non-zero. o Call kdb_trap() to enter the debugger when not already active. o Update comments accordingly. o Remove misplaced prototype of kdb_trap().
* Remove advertising clause from University of California Regent'simp2004-04-071-4/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Initiate de-orbit burn for fpu-less operation. 386+387 is stillpeter2003-07-221-1/+0
| | | | | theoretically supportable, but you'd really be happier with FreeBSD 2.1.8 on it.
* Remove __P.alfred2002-03-201-2/+2
|
* Interrupt frames don't include the saved cpl anymore since cpl is dead.jhb2000-10-061-2/+0
|
* sigset_t change (part 3 of 5)marcel1999-09-291-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------- By introducing a new sigframe so that the signal handler operates on the new siginfo_t and on ucontext_t instead of sigcontext, we now need two version of sendsig and sigreturn. A flag in struct proc determines whether the process expects an old sigframe or a new sigframe. The signal trampoline handles which sigreturn to call. It does this by testing for a magic cookie in the frame. The alpha uses osigreturn to implement longjmp. This means that osigreturn is not only used for compatibility with existing binaries. To handle the new sigset_t, setjmp saves it in sc_reserved (see NOTE). the struct sigframe has been moved from frame.h to sigframe.h to handle the complex header dependencies that was caused by the new sigframe. NOTE: For the i386, the size of jmp_buf has been increased to hold the new sigset_t. On the alpha this has been prevented by using sc_reserved in sigcontext.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much morecracauer1999-07-061-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than a review, this was a nice puzzle. This is supposed to be binary and source compatible with older applications that access the old FreeBSD-style three arguments to a signal handler. Except those applications that access hidden signal handler arguments bejond the documented third one. If you have applications that do, please let me know so that we take the opportunity to provide the functionality they need in a documented manner. Also except application that use 'struct sigframe' directly. You need to recompile gdb and doscmd. `make world` is recommended. Example program that demonstrates how SA_SIGINFO and old-style FreeBSD handlers (with their three args) may be used in the same process is at http://www3.cons.org/tmp/fbsd-siginfo.c Programs that use the old FreeBSD-style three arguments are easy to change to SA_SIGINFO (although they don't need to, since the old style will still work): Old args to signal handler: void handler_sn(int sig, int code, struct sigcontext *scp) New args: void handler_si(int sig, siginfo_t *si, void *third) where: old:code == new:second->si_code old:scp == &(new:si->si_scp) /* Passed by value! */ The latter is also pointed to by new:third, but accessing via si->si_scp is preferred because it is type-save. FreeBSD implementation notes: - This is just the framework to make the interface POSIX compatible. For now, no additional functionality is provided. This is supposed to happen now, starting with floating point values. - We don't use 'sigcontext_t.si_value' for now (POSIX meant it for realtime-related values). - Documentation will be updated when new functionality is added and the exact arguments passed are determined. The comments in sys/signal.h are meant to be useful. Reviewed by: BDE
* Yet another place I missed when increasing trapframe size, which causes problemluoqi1999-05-111-1/+3
| | | | | | to SIGFPE handling. Reviewed by: Bruce Evans <bde@zeta.org.au>
* Enable vmspace sharing on SMP. Major changes are,luoqi1999-04-281-1/+5
| | | | | | | | | | | | | | | | | - %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup. Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com>
* VM86 kernel support.dyson1997-08-091-1/+30
| | | | | | | Work done by BSDI, Jonathan Lemon <jlemon@americantv.com>, Mike Smith <msmith@gsoft.com.au>, Sean Eric Fagan <sef@kithrup.com>, and probably alot of others. Submitted by: Jnathan Lemon <jlemon@americantv.com>
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fix a bunch of spelling errors in the comment fields ofmpp1996-01-301-4/+4
| | | | a bunch of system include files.
* Make math_emulators LKMable.phk1995-12-141-2/+2
|
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-3/+5
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-0/+26
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* WINE/user LDT support from John Brezak, ported to FreeBSD by Jeffrey Hsudg1994-01-311-4/+1
| | | | <hsu@soda.berkeley.edu>.
* Convert syscall to trapframe. Based on work done by John Brezak.dg1994-01-031-24/+1
|
* Make everything compile with -Wtraditional. Make it easier to distributewollman1993-12-191-1/+3
| | | | | | | | | | | a binary link-kit. Make all non-optional options (pagers, procfs) standard, and update LINT to reflect new symtab requirements. NB: -Wtraditional will henceforth be forgotten. This editing pass was primarily intended to detect any constructions where the old code might have been relying on traditional C semantics or syntax. These were all fixed, and the result of fixing some of them means that -Wall is now a realistic possibility within a few weeks.
* From: Jeffrey Hsu <hsu@soda.berkeley.edu>alm1993-12-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | The following patch adds the addr argument to signal handlers. The kernel with the patch is no more and no less in compliance or in violation of POSIX and ANSI C than the kernel before the patch. The added functionality this addr argument provides is quite useful. It enables an entire class of algorithms which use mprotect to trace memory references. Beside garbage collectors, I have heard of this technique being applied to debuggers and profilers. The only benchmarking I've performed is using akcl to compile maxima: without the kernel patch, it takes 7 hours to compile maxima, while with stratified garbage collection, it only takes 50 minutes. Basically, I can't think of a reason not to add the addr argument and there is a compelling need for it. If you find the patch acceptable, please let me know so I can send my FreeBSD akcl config files to wfs for inclusion in the core akcl release. The old 386BSD config files there won't work on either NetBSD or FreeBSD.
* Fixed comments that start within a comment, so code compiles cleanly withwollman1993-11-171-2/+2
| | | | -Wcomment.
* Made all header files idempotent and moved incorrect common data fromwollman1993-11-071-1/+5
| | | | | headers into a related source file. Added cons.h as first step towards moving i386/i386/cons.h to machine/cons.h where it belongs.
* All:rgrimes1993-10-081-1/+18
| | | | | | | | | | | | | | | | | | | | | | | Remove patch kit headers, and add $Id$ This is mostly to align some more code with NetBSD. cpu.h: Remove the old function vs. include configuration stuff that was ifdefed out when we went to inline functions. Remove the define of resettodr that made it a nop, there is already a function that makes it a nop, no need to #define one. Remove the #defines of processor types, they are now defined in cputypes.h, #include that file. Add struct cpu_nameclass for support of cpu types. frame.h: include sys/signal.h, it will be needed in the future. put the sigframe structure here that was in machdep.c pcb.h: Add multiple inclusion protection. Add pcb_ldt and pcb_ldt_len to pcb structure, this is for the user mode ldt.
* Initial import, 0.1 + pk 0.2.4-B1rgrimes1993-06-121-0/+116
OpenPOWER on IntegriCloud