freebsd-dev/sys/i386
Peter Wemm e0ab2c6d10 Change the segment limits to 4GB, we set the user accessible bit on all
of the kernel address space already.  Intel recommend this anyway, because
using a non-4GB limit adds an additional clock cycle to address generation.
We were able to install 4GB segments into the LDT, so any limits we imposed
on %cs and %ds were academic anyway.  More importantly, this allows us to
make a page in the kernel readable to user applications, for holding things
like the signal trampoline and other fun things.

Move the user %cs/%ds segments from the LDT to the GDT.  There was no good
reason for them to be there anyway.  The old LDT entries are still there
but we can now relax the restriction that prevented users from emptying
the default LDT entries.

Putting user and kernel %cs and %ds together allows us to access the fast
sysenter/sysexit/syscall/sysret instructions.  syscall/sysret in particular
require that the user/kernel segments be laid out this way.  Reserve a slot
specifically for NDIS while here.

Create two user controllable slots in the GDT that are context switched
with the (kernel) thread.  This allows user applications to set two
user privilige selectors to arbitary values.  Create
i386_set_fsbase(void *base) and friends. (get/set, fs/gs).  For i386,
%gs is used by tls and the thread libraries and this means that user
processes no longer have to have the cost of having a custom LDT, and
we will no longer to do a ldt switch when activating a kthread/ithread in
the usual case any more.

In other words, we can now set the base address for %fs and %gs to arbitary
addresses without the pain of messing with ldt segments.
2005-04-13 22:57:17 +00:00
..
acpica
bios - Consistently protect against NULL dereference. 2005-04-12 20:14:56 +00:00
compile
conf Glue the arcmsr driver into the tree. 2005-03-31 20:21:43 +00:00
cpufreq Properly terminate the table generated from ACPI info. The cpufreq 2005-04-10 19:57:47 +00:00
i386 Change the segment limits to 4GB, we set the user accessible bit on all 2005-04-13 22:57:17 +00:00
ibcs2 - Change the vm_mmap() function to accept an objtype_t parameter specifying 2005-04-01 20:00:11 +00:00
include Change the segment limits to 4GB, we set the user accessible bit on all 2005-04-13 22:57:17 +00:00
isa Replace spl protection in rtcin() and writertc() with spinlocks 2005-04-12 20:49:31 +00:00
linux Add support for O_NOFOLLOW and O_DIRECT to Linux fcntl() F_GETFL/F_SETFL. 2005-04-13 04:31:43 +00:00
pci Add code to read the primary PCI bus number out of the Compaq/HP 6010 2005-03-25 14:18:50 +00:00
svr4
Makefile