summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/ipl.s
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/i386/isa/ipl.s
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/i386/isa/ipl.s')
-rw-r--r--sys/i386/isa/ipl.s9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/i386/isa/ipl.s b/sys/i386/isa/ipl.s
index bd586ee..9b3979c 100644
--- a/sys/i386/isa/ipl.s
+++ b/sys/i386/isa/ipl.s
@@ -36,7 +36,7 @@
*
* @(#)ipl.s
*
- * $Id: ipl.s,v 1.19 1997/12/15 02:18:35 tegge Exp $
+ * $Id: ipl.s,v 1.20 1998/03/03 22:56:29 tegge Exp $
*/
@@ -159,6 +159,8 @@ doreti_exit:
/* XXX CPL_AND_CML needs work */
#error not ready for vm86
#endif
+ cmpl $1,_in_vm86call
+ je 1f /* want cpl == SWI_AST_PENDING */
/*
* XXX
* Sometimes when attempting to return to vm86 mode, cpl is not
@@ -342,6 +344,10 @@ doreti_swi:
ALIGN_TEXT
swi_ast:
addl $8,%esp /* discard raddr & cpl to get trap frame */
+#ifdef VM86
+ cmpl $1,_in_vm86call
+ je 1f /* stay in kernel mode */
+#endif
testb $SEL_RPL_MASK,TRAPF_CS_OFF(%esp)
je swi_ast_phantom
swi_ast_user:
@@ -364,6 +370,7 @@ swi_ast_phantom:
*/
testl $PSL_VM,TF_EFLAGS(%esp)
jne swi_ast_user
+1:
#endif /* VM86 */
/*
* These happen when there is an interrupt in a trap handler before
OpenPOWER on IntegriCloud