summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/vm_machdep.c
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>1998-03-23 19:52:59 +0000
committerjlemon <jlemon@FreeBSD.org>1998-03-23 19:52:59 +0000
commit8f4e20b1a35e937bbd54a2aae08925d58fe629d6 (patch)
tree4562782c6b8cf96026bed2ea30ad93d394db0dbe /sys/amd64/amd64/vm_machdep.c
parentc6b01b495d72c0a38989df9916619c271ff13e71 (diff)
downloadFreeBSD-src-8f4e20b1a35e937bbd54a2aae08925d58fe629d6.zip
FreeBSD-src-8f4e20b1a35e937bbd54a2aae08925d58fe629d6.tar.gz
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.
Diffstat (limited to 'sys/amd64/amd64/vm_machdep.c')
-rw-r--r--sys/amd64/amd64/vm_machdep.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index 8ac19b1..b157bb6 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $Id: vm_machdep.c,v 1.103 1998/03/14 03:02:15 tegge Exp $
+ * $Id: vm_machdep.c,v 1.104 1998/03/17 09:10:05 kato Exp $
*/
#include "npx.h"
@@ -65,6 +65,10 @@
#ifdef SMP
#include <machine/smp.h>
#endif
+#ifdef VM86
+#include <machine/pcb_ext.h>
+#include <machine/vm86.h>
+#endif
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -599,7 +603,11 @@ cpu_fork(p1, p2)
* syscall. This copies the user mode register values.
*/
p2->p_md.md_regs = (struct trapframe *)
+#ifdef VM86
+ ((int)p2->p_addr + UPAGES * PAGE_SIZE - 16) - 1;
+#else
((int)p2->p_addr + UPAGES * PAGE_SIZE) - 1;
+#endif /* VM86 */
*p2->p_md.md_regs = *p1->p_md.md_regs;
/*
OpenPOWER on IntegriCloud