#
2c66ccca |
| 01-Apr-2009 |
Konstantin Belousov <kib@FreeBSD.org> |
Save and restore segment registers on amd64 when entering and leaving the kernel on amd64. Fill and read segment registers for mcontext and signals. Handle traps caused by restoration of the invalida
Save and restore segment registers on amd64 when entering and leaving the kernel on amd64. Fill and read segment registers for mcontext and signals. Handle traps caused by restoration of the invalidated selectors.
Implement user-mode creation and manipulation of the process-specific LDT descriptors for amd64, see sysarch(2).
Implement support for TSS i/o port access permission bitmap for amd64.
Context-switch LDT and TSS. Do not save and restore segment registers on the context switch, that is handled by kernel enter/leave trampolines now. Remove segment restore code from the signal trampolines for freebsd/amd64, freebsd/ia32 and linux/i386 for the same reason.
Implement amd64-specific compat shims for sysarch.
Linuxolator (temporary ?) switched to use gsbase for thread_area pointer.
TODO: Currently, gdb is not adapted to show segment registers from struct reg. Also, no machine-depended ptrace command is added to set segment registers for debugged process.
In collaboration with: pho Discussed with: peter Reviewed by: jhb Linuxolator tested by: dchagin
show more ...
|
#
1829d5da |
| 12-Mar-2009 |
Warner Losh <imp@FreeBSD.org> |
Update the projects tree to a newer FreeBSD current.
|
#
e6493bbe |
| 31-Jan-2009 |
David E. O'Brien <obrien@FreeBSD.org> |
Change some movl's to mov's. Newer GAS no longer accept 'movl' instructions for moving between a segment register and a 32-bit memory location.
Looked at by: jhb
|
Revision tags: release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
#
07a8ebcc |
| 23-Sep-2006 |
David Xu <davidxu@FreeBSD.org> |
Stop reloading %fs and %gs, since it causes the base address from GDT to be loaded into FS.base and GS.base, these values of course are not the values set by sysarch() with I386_SET_FSBASE and I386_S
Stop reloading %fs and %gs, since it causes the base address from GDT to be loaded into FS.base and GS.base, these values of course are not the values set by sysarch() with I386_SET_FSBASE and I386_SET_GSBASE, the change fixed a crash for 32bit libthr after signal handler returned and normal code is accessing thread pointer, for example: movl %gs:8, %eax.
show more ...
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0 |
|
#
c639ca93 |
| 23-Aug-2003 |
Peter Wemm <peter@FreeBSD.org> |
Initial sweep at dividing up the generic 32bit-on-64bit kernel support from the ia32 specific stuff. Some of this still needs to move to the MI freebsd32 area, and some needs to move to the MD area.
Initial sweep at dividing up the generic 32bit-on-64bit kernel support from the ia32 specific stuff. Some of this still needs to move to the MI freebsd32 area, and some needs to move to the MD area. This is still work-in-progress.
show more ...
|
Revision tags: release/5.1.0_cvs, release/5.1.0 |
|
#
d85631c4 |
| 14-May-2003 |
Peter Wemm <peter@FreeBSD.org> |
Add BASIC i386 binary support for the amd64 kernel. This is largely stolen from the ia64/ia32 code (indeed there was a repocopy), but I've redone the MD parts and added and fixed a few essential sys
Add BASIC i386 binary support for the amd64 kernel. This is largely stolen from the ia64/ia32 code (indeed there was a repocopy), but I've redone the MD parts and added and fixed a few essential syscalls. It is sufficient to run i386 binaries like /bin/ls, /usr/bin/id (dynamic) and p4. The ia64 code has not implemented signal delivery, so I had to do that.
Before you say it, yes, this does need to go in a common place. But we're in a freeze at the moment and I didn't want to risk breaking ia64. I will sort this out after the freeze so that the common code is in a common place.
On the AMD64 side, this required adding segment selector context switch support and some other support infrastructure. The %fs/%gs etc code is hairy because loading %gs will clobber the kernel's current MSR_GSBASE setting. The segment selectors are not used by the kernel, so they're only changed at context switch time or when changing modes. This still needs to be optimized.
Approved by: re (amd64/* blanket)
show more ...
|
Revision tags: release/7.2.0_cvs, release/7.2.0 |
|
#
9c797940 |
| 13-Apr-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- Merge from HEAD
|
#
2c66ccca |
| 01-Apr-2009 |
Konstantin Belousov <kib@FreeBSD.org> |
Save and restore segment registers on amd64 when entering and leaving the kernel on amd64. Fill and read segment registers for mcontext and signals. Handle traps caused by restoration of the invalida
Save and restore segment registers on amd64 when entering and leaving the kernel on amd64. Fill and read segment registers for mcontext and signals. Handle traps caused by restoration of the invalidated selectors.
Implement user-mode creation and manipulation of the process-specific LDT descriptors for amd64, see sysarch(2).
Implement support for TSS i/o port access permission bitmap for amd64.
Context-switch LDT and TSS. Do not save and restore segment registers on the context switch, that is handled by kernel enter/leave trampolines now. Remove segment restore code from the signal trampolines for freebsd/amd64, freebsd/ia32 and linux/i386 for the same reason.
Implement amd64-specific compat shims for sysarch.
Linuxolator (temporary ?) switched to use gsbase for thread_area pointer.
TODO: Currently, gdb is not adapted to show segment registers from struct reg. Also, no machine-depended ptrace command is added to set segment registers for debugged process.
In collaboration with: pho Discussed with: peter Reviewed by: jhb Linuxolator tested by: dchagin
show more ...
|
#
1829d5da |
| 12-Mar-2009 |
Warner Losh <imp@FreeBSD.org> |
Update the projects tree to a newer FreeBSD current.
|
#
e6493bbe |
| 31-Jan-2009 |
David E. O'Brien <obrien@FreeBSD.org> |
Change some movl's to mov's. Newer GAS no longer accept 'movl' instructions for moving between a segment register and a 32-bit memory location.
Looked at by: jhb
|
Revision tags: release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0 |
|
#
07a8ebcc |
| 23-Sep-2006 |
David Xu <davidxu@FreeBSD.org> |
Stop reloading %fs and %gs, since it causes the base address from GDT to be loaded into FS.base and GS.base, these values of course are not the values set by sysarch() with I386_SET_FSBASE and I386_S
Stop reloading %fs and %gs, since it causes the base address from GDT to be loaded into FS.base and GS.base, these values of course are not the values set by sysarch() with I386_SET_FSBASE and I386_SET_GSBASE, the change fixed a crash for 32bit libthr after signal handler returned and normal code is accessing thread pointer, for example: movl %gs:8, %eax.
show more ...
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0 |
|
#
c639ca93 |
| 23-Aug-2003 |
Peter Wemm <peter@FreeBSD.org> |
Initial sweep at dividing up the generic 32bit-on-64bit kernel support from the ia32 specific stuff. Some of this still needs to move to the MI freebsd32 area, and some needs to move to the MD area.
Initial sweep at dividing up the generic 32bit-on-64bit kernel support from the ia32 specific stuff. Some of this still needs to move to the MI freebsd32 area, and some needs to move to the MD area. This is still work-in-progress.
show more ...
|
Revision tags: release/5.1.0_cvs, release/5.1.0 |
|
#
d85631c4 |
| 14-May-2003 |
Peter Wemm <peter@FreeBSD.org> |
Add BASIC i386 binary support for the amd64 kernel. This is largely stolen from the ia64/ia32 code (indeed there was a repocopy), but I've redone the MD parts and added and fixed a few essential sys
Add BASIC i386 binary support for the amd64 kernel. This is largely stolen from the ia64/ia32 code (indeed there was a repocopy), but I've redone the MD parts and added and fixed a few essential syscalls. It is sufficient to run i386 binaries like /bin/ls, /usr/bin/id (dynamic) and p4. The ia64 code has not implemented signal delivery, so I had to do that.
Before you say it, yes, this does need to go in a common place. But we're in a freeze at the moment and I didn't want to risk breaking ia64. I will sort this out after the freeze so that the common code is in a common place.
On the AMD64 side, this required adding segment selector context switch support and some other support infrastructure. The %fs/%gs etc code is hairy because loading %gs will clobber the kernel's current MSR_GSBASE setting. The segment selectors are not used by the kernel, so they're only changed at context switch time or when changing modes. This still needs to be optimized.
Approved by: re (amd64/* blanket)
show more ...
|