summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/reg.h
Commit message (Collapse)AuthorAgeFilesLines
* Copy i386 reg.h to x86 and merge with amd64 reg.h. Replace i386/amd64/pc98tijl2012-03-181-138/+3
| | | | | | | | | | | | | | | | | reg.h with stubs. The tREGISTER macros are only made visible on i386. These macros are deprecated and should not be available on amd64. The i386 and amd64 versions of struct reg have been renamed to struct __reg32 and struct __reg64. During compilation either __reg32 or __reg64 is defined as reg depending on the machine architecture. On amd64 the i386 struct is also available as struct reg32 which is used in COMPAT_FREEBSD32 code. Most of compat/ia32/ia32_reg.h is now IA64 only. Reviewed by: kib (previous version)
* Use exact width integer types in amd64/i386 reg.h to prepare for a merge.tijl2012-03-181-31/+31
| | | | The only real change is replacing long with int on i386.
* To avoid excessive code duplication create wrapper for fill regsdchagin2011-02-161-0/+1
| | | | | from stack frame. Change the trap() code to use newly created function instead of explicit regs assignment.
* Cosmetic tweak to use a type suffix instead of a cast to force a constantjhb2010-03-291-1/+1
| | | | to be a long.
* 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
* Add all segment registers for the amd64 CPU to struct reg and mcontext.kib2009-04-011-2/+6
| | | | | | | | | | | | | To keep these structures ABI-compatible, half the size of r_trapno, r_err, mc_trapno, mc_flags. Add fsbase and gsbase to mcontext on both amd64 and i386. Add flags to amd64 mcontext to indicate that it contains valid segments or bases. In collaboration with: pho Discussed with: peter Reviewed by: jhb
* Add support for 8 byte hardware watches in long mode. Kernel hardwarejhb2006-11-171-0/+1
| | | | | watches support 8 byte watches. For userland, we disallow 8 byte watches for 32-bit tasks.
* - Add macro constants for the various fields in %dr7 and use them in placejhb2006-11-171-0/+12
| | | | | | | of various scattered magic values. - Pretty print the address of hardware watchpoints in 'show watch' rather than just displaying hex. - Expand address field width on amd64 for 64-bit pointers.
* Various whitespace and style fixes.jhb2006-11-151-5/+7
|
* Remove advertising clause from University of California Regent's license,imp2004-04-051-4/+0
| | | | | | per letter dated July 22, 1999 and email from Peter Wemm. Approved by: core, peter
* Add dbreg struct definitions for /proc/*/dbregs and a place to store thepeter2004-01-281-1/+14
| | | | registers in the pcb
* Update the graffiti.peter2003-11-081-0/+1
|
* Rename npx* to fpu*. I haven't done the flags/function names yet.peter2003-11-081-1/+1
|
* As suggested by the gdb folks, pad the 'struct fpreg' to a full 512 bytespeter2003-05-231-0/+1
| | | | | to match the native fxsave/fxrstor object size since thats apparently what the Linux/NetBSD folks do.
* Commit MD parts of a loosely functional AMD64 port. This is based onpeter2003-05-011-76/+26
| | | | | | | | | | | | | | | | | | | | | | a heavily stripped down FreeBSD/i386 (brutally stripped down actually) to attempt to get a stable base to start from. There is a lot missing still. Worth noting: - The kernel runs at 1GB in order to cheat with the pmap code. pmap uses a variation of the PAE code in order to avoid having to worry about 4 levels of page tables yet. - It boots in 64 bit "long mode" with a tiny trampoline embedded in the i386 loader. This simplifies locore.s greatly. - There are still quite a few fragments of i386-specific code that have not been translated yet, and some that I cheated and wrote dumb C versions of (bcopy etc). - It has both int 0x80 for syscalls (but using registers for argument passing, as is native on the amd64 ABI), and the 'syscall' instruction for syscalls. int 0x80 preserves all registers, 'syscall' does not. - I have tried to minimize looking at the NetBSD code, except in a couple of places (eg: to find which register they use to replace the trashed %rcx register in the syscall instruction). As a result, there is not a lot of similarity. I did look at NetBSD a few times while debugging to get some ideas about what I might have done wrong in my first attempt.
* Properly parenthesize the DBREG_DRX macro's variables to allow foralfred2002-11-071-1/+1
| | | | DBREG_DRX(&dbregs, n) usage.
* Change the definition of the debugging registers to be an array, sophk2002-10-201-9/+6
| | | | | | | that we can index into it, rather than do pointer gymnastics on a structure containing 8 elements. Verified by: MD5 hash on the produced .o files.
* Renamed poorly named setregs to exec_setregs. Moved its prototype tojake2002-08-291-1/+0
| | | | imgact.h with the other exec support functions.
* Remove __P.alfred2002-03-201-7/+7
|
* [partially forced commit due to pilot error in earlier commit attempt]des2001-10-211-3/+6
| | | | | | | | | | | | | | | | | {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-4/+4
| | | | | | | | | | | | | | 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
* Add a couple of debug register helper functions to assist in settingbsd2000-09-211-0/+6
| | | | | | and clearing watchpoints. Reviewed by: jwd@FreeBSD.org, -hackers@
* Document the support in the kernel for hardware debug registers on theobrien2000-02-121-0/+3
| | | | | | ix86 platform which allows for hardware watchpoints, etc... Submitted by: Brian Dean <brdean@unx.sas.com>
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-1/+1
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Implement support for hardware debug registers on the i386.jlemon1999-07-091-1/+14
| | | | Submitted by: Brian Dean <brdean@unx.sas.com>
* Enable vmspace sharing on SMP. Major changes are,luoqi1999-04-281-19/+19
| | | | | | | | | | | | | | | | | - %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>
* Restore support for executing BSD/OS binaries on the i386 by passingjdp1999-04-031-2/+2
| | | | | | | | the address of the ps_strings structure to the process via %ebx. For other kinds of binaries, %ebx is still zeroed as before. Submitted by: Thomas Stephens <tas@stephens.org> Reviewed by: jdp
* Add new functions fill_fpregs() and set_fpregs(), like fill_regs()jdp1998-09-141-1/+2
| | | | | | | | and set_regs() but for the floating point register state. The code is stolen from procfs_machdep.c, and moved out of there into machdep.c. These functions are needed for generating ELF core dumps.
* Preserve %fs and %gs across context switches. This has a relatively lowbde1997-06-071-1/+13
| | | | | | | cost since it is only done in cpu_switch(), not for every exception. The extra state is kept in the pcb, and handled much like the npx state, with similar deficiencies (the state is not preserved across signal handlers, and error handling loses state).
* Updated comments.bde1997-06-071-15/+15
|
* 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-2/+2
| | | | a bunch of system include files.
* Declare a real `struct fpreg' to prepare for implementing reading andbde1995-01-141-6/+13
| | | | | | writing of FP regs for procfs. Uniformize idempotency ifdef.
* apm_bios.h: removed the equiv-stuff. Not needed now that the kernel modulephk1994-10-021-1/+5
| | | | | | works correctly. clock.h & reg.h: prototypes.
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-3/+13
| | | | | 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-2/+2
| | | | <hsu@soda.berkeley.edu>.
* Convert syscall to trapframe. Based on work done by John Brezak.dg1994-01-031-23/+1
|
* From: Jeffrey Hsu <hsu@soda.berkeley.edu>alm1993-12-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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.
* new process tracing code from Sean Eric Fagen (sef@kithrup.com).dg1993-11-161-11/+29
| | | | ...also, fixed up the syscall args to make GCC happy.
* 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.
* Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, somergrimes1993-10-161-1/+2
| | | | minor cleanup. Added $Id$ to files that did not have any version info, etc
* Initial import, 0.1 + pk 0.2.4-B1rgrimes1993-06-121-0/+93
OpenPOWER on IntegriCloud