Commit Graph

17 Commits

Author SHA1 Message Date
David Xu
8c132e9fae 1.Fix smp race between kernel vm86 BIOS calling and userland vm86 mode code,
remove global variable in_vm86call, set vm86 calling flag in PCB flags.

2.Fix vm86 BIOS calling preempted problem by changing vm86_lock mutex type
  from MTX_DEF to MTX_SPIN. vm86pcb is not remembered in thread struct,
  when the thread calling vm86 BIOS is preempted by interrupt thread,
  and later switching back to the thread would cause incorrect context be
  loaded into CPU registers, this leads to kernel crash.
2002-11-07 01:34:23 +00:00
Alfred Perlstein
b63dc6ad47 Remove __P. 2002-03-20 05:48:58 +00:00
Bruce Evans
05e47d1f21 Fixed a missing proc -> thread substitution.
Broke future detection of this bug in userland by not declaring kernel
prototypes in userland.
2001-10-03 17:23:26 +00:00
Julian Elischer
b40ce4165d KSE Milestone 2
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
2001-09-12 08:38:13 +00:00
Luoqi Chen
7a2bb3b800 Some reorganization of sysarch() interface:
1. Move definitions of struct i386_*_args to the header file sysarch.h,
   since they are part of the sysarch API. struct i386_get_ldt_args and
   i386_set_ldt_args were identical, therefore make them into one
   struct i386_ldt_args. Libc should use these definitions as well.
2. Return a more sensible EOPNOTSUPP for unknown operations.

Reviewed by:	marcel
1999-09-02 20:59:50 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Jonathan Lemon
eb9d435ae7 Unifdef VM86.
Reviewed by:	silence on on -current
1999-06-01 18:20:36 +00:00
Luoqi Chen
5206bca10a Enable vmspace sharing on SMP. Major changes are,
- %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>
1999-04-28 01:04:33 +00:00
Jonathan Lemon
1fe3054698 Change the vm86_datacall interface so that callers are now responsible
for passing in their own data space and associated page table information.

Update the support files so that any pages in the vm86 page table are
mapped, rather than just one page.

Restore the E820 memory probe, and have it use the new interface.
1999-03-18 04:37:35 +00:00
Bruce Evans
0c71101cb7 Don't pretend to support ix86's with 16-bit ints by using longs just
to ensure 32-bit variables.  Doing so broke ix86's with 64-bit longs.
1998-09-29 09:06:00 +00:00
Mike Smith
bf707fd0b2 Add missing register name defines. 1998-07-14 17:13:23 +00:00
Bruce Evans
a09bee1aa8 Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (this doesn't change the struct layout, size or
alignment in any of the files changed in this commit, at least for
gcc on i386's.  Using bitfields of type u_char may affect size and
alignment but not packing)).
1998-06-08 09:47:47 +00:00
Jonathan Lemon
640c4313af Add the ability to make real-mode BIOS calls from the kernel. Currently,
everything is contained inside #ifdef VM86, so this option must be
present in the config file to use this functionality.

Thanks to Tor Egge, these changes should work on SMP machines.  However,
it may not be throughly SMP-safe.

Currently, the only BIOS calls made are memory-sizing routines at bootup,
these replace reading the RTC values.
1998-03-23 19:52:59 +00:00
Bruce Evans
b7a2b1ff66 Avoid passing some more `retval's. 1997-11-20 18:43:55 +00:00
Jonathan Lemon
5f07393373 Remove the vm86 support as an LKM, and link it directly into the kernel
if 'options "VM86"' is in the config file.  The LKM was really for
development, and has probably outlived its usefulness.
1997-08-28 14:36:56 +00:00
Jonathan Lemon
939829795a Add forward declaration for struct proc. 1997-08-20 19:57:24 +00:00
John Dyson
a62e455e42 A couple of missing doscmd header files. Messed up again. Now can
compile the kernel!!!
Submitted by:	Jonathan Lemon <jlemon@americantv.com>
1997-08-09 04:55:05 +00:00