summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>1999-06-01 18:20:36 +0000
committerjlemon <jlemon@FreeBSD.org>1999-06-01 18:20:36 +0000
commitb5d4171ff60677d883a8f4fdf912b23d5de9a433 (patch)
tree37d000a80ae9f6ab9ca36152f3fd48600aa82ae6 /sys/kern
parentd4d2c873635d9e513e6e5720150fd4e44067d68f (diff)
downloadFreeBSD-src-b5d4171ff60677d883a8f4fdf912b23d5de9a433.zip
FreeBSD-src-b5d4171ff60677d883a8f4fdf912b23d5de9a433.tar.gz
Unifdef VM86.
Reviewed by: silence on on -current
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_prf.c19
-rw-r--r--sys/kern/subr_smp.c5
-rw-r--r--sys/kern/subr_trap.c11
3 files changed, 20 insertions, 15 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index 424ac9f..c1937b7 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
- * $Id: subr_prf.c,v 1.50 1998/09/06 06:25:04 ache Exp $
+ * $Id: subr_prf.c,v 1.51 1998/12/03 04:45:56 archie Exp $
*/
#include <sys/param.h>
@@ -674,10 +674,24 @@ msglogchar(int c, void *dummyarg)
}
}
+static void
+msgbufcopy(struct msgbuf *oldp)
+{
+ int pos;
+
+ pos = oldp->msg_bufr;
+ while (pos != oldp->msg_bufx) {
+ msglogchar(oldp->msg_ptr[pos], NULL);
+ if (++pos >= oldp->msg_size)
+ pos = 0;
+ }
+}
+
void
msgbufinit(void *ptr, size_t size)
{
char *cp;
+ static struct msgbuf *oldp = NULL;
cp = (char *)ptr;
msgbufp = (struct msgbuf *) (cp + size - sizeof(*msgbufp));
@@ -687,7 +701,10 @@ msgbufinit(void *ptr, size_t size)
msgbufp->msg_size = (char *)msgbufp - cp;
msgbufp->msg_ptr = cp;
}
+ if (msgbufmapped && oldp != msgbufp)
+ msgbufcopy(oldp);
msgbufmapped = 1;
+ oldp = msgbufp;
}
#include "opt_ddb.h"
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index ad9e6c6..3365d30 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -22,11 +22,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.100 1999/05/08 17:48:22 peter Exp $
+ * $Id: mp_machdep.c,v 1.101 1999/05/12 21:38:43 luoqi Exp $
*/
#include "opt_smp.h"
-#include "opt_vm86.h"
#include "opt_cpu.h"
#include "opt_user_ldt.h"
@@ -482,10 +481,8 @@ init_secondary(void)
common_tss.tss_esp0 = 0; /* not used until after switch */
common_tss.tss_ss0 = GSEL(GDATA_SEL, SEL_KPL);
common_tss.tss_ioopt = (sizeof common_tss) << 16;
-#ifdef VM86
tss_gdt = &gdt[myid * NGDT + GPROC0_SEL].sd;
common_tssd = *tss_gdt;
-#endif
ltr(gsel_tss);
load_cr0(0x8005003b); /* XXX! */
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index 411d67f..df6e295 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
- * $Id: trap.c,v 1.136 1999/04/28 01:03:26 luoqi Exp $
+ * $Id: trap.c,v 1.137 1999/05/06 18:12:17 peter Exp $
*/
/*
@@ -47,7 +47,6 @@
#include "opt_ktrace.h"
#include "opt_clock.h"
#include "opt_trap.h"
-#include "opt_vm86.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -90,9 +89,7 @@
#include <machine/clock.h>
#endif
-#ifdef VM86
#include <machine/vm86.h>
-#endif
#ifdef DDB
extern int in_Debugger, debugger_on_panic;
@@ -266,7 +263,6 @@ restart:
type = frame.tf_trapno;
code = frame.tf_err;
-#ifdef VM86
if (in_vm86call) {
if (frame.tf_eflags & PSL_VM &&
(type == T_PROTFLT || type == T_STKFLT)) {
@@ -293,7 +289,6 @@ restart:
}
goto kernel_trap; /* normal kernel trap handling */
}
-#endif
if ((ISPL(frame.tf_cs) == SEL_UPL) || (frame.tf_eflags & PSL_VM)) {
/* user trap */
@@ -335,14 +330,12 @@ restart:
*/
case T_PROTFLT: /* general protection fault */
case T_STKFLT: /* stack fault */
-#ifdef VM86
if (frame.tf_eflags & PSL_VM) {
i = vm86_emulate((struct vm86frame *)&frame);
if (i == 0)
goto out;
break;
}
-#endif /* VM86 */
/* FALL THROUGH */
case T_SEGNPFLT: /* segment not present fault */
@@ -426,9 +419,7 @@ restart:
break;
}
} else {
-#ifdef VM86
kernel_trap:
-#endif
/* kernel trap */
switch (type) {
OpenPOWER on IntegriCloud