Module Name: src
Committed By: manu
Date: Sun Aug 16 15:35:53 UTC 2009
Modified Files:
src/sys/arch/xen/conf: files.xen
src/sys/compat/darwin: darwin_exec.c darwin_ioframebuffer.c
Log Message:
Build COMPAT_DARWIN and COMPAT_MACH as a Xen domU too
To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/xen/conf/files.xen
cvs rdiff -u -r1.58 -r1.59 src/sys/compat/darwin/darwin_exec.c
cvs rdiff -u -r1.42 -r1.43 src/sys/compat/darwin/darwin_ioframebuffer.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/xen/conf/files.xen
diff -u src/sys/arch/xen/conf/files.xen:1.103 src/sys/arch/xen/conf/files.xen:1.104
--- src/sys/arch/xen/conf/files.xen:1.103 Wed Aug 5 20:15:37 2009
+++ src/sys/arch/xen/conf/files.xen Sun Aug 16 15:35:52 2009
@@ -1,4 +1,4 @@
-# $NetBSD: files.xen,v 1.103 2009/08/05 20:15:37 jym Exp $
+# $NetBSD: files.xen,v 1.104 2009/08/16 15:35:52 manu Exp $
# NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp
# NetBSD: files.i386,v 1.254 2004/03/25 23:32:10 jmc Exp
@@ -322,6 +322,7 @@
file arch/i386/i386/mach_machdep.c compat_mach | compat_darwin
file arch/i386/i386/mach_sigcode.S compat_mach | compat_darwin
file arch/i386/i386/mach_syscall.c compat_mach | compat_darwin
+file arch/i386/i386/darwin_commpage_machdep.S compat_darwin
file arch/i386/i386/macho_machdep.c exec_macho
# DARWIN binary compatibility (COMPAT_DARWIN)
Index: src/sys/compat/darwin/darwin_exec.c
diff -u src/sys/compat/darwin/darwin_exec.c:1.58 src/sys/compat/darwin/darwin_exec.c:1.59
--- src/sys/compat/darwin/darwin_exec.c:1.58 Tue Mar 31 06:03:31 2009
+++ src/sys/compat/darwin/darwin_exec.c Sun Aug 16 15:35:52 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: darwin_exec.c,v 1.58 2009/03/31 06:03:31 cegger Exp $ */
+/* $NetBSD: darwin_exec.c,v 1.59 2009/08/16 15:35:52 manu Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -31,9 +31,10 @@
#include "opt_compat_darwin.h" /* For COMPAT_DARWIN in mach_port.h */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.58 2009/03/31 06:03:31 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.59 2009/08/16 15:35:52 manu Exp $");
#include "opt_syscall_debug.h"
+#include "wsdisplay.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -69,8 +70,10 @@
#include <machine/darwin_machdep.h>
+#if defined(NWSDISPLAY) && NWSDISPLAY > 0
/* Redefined from sys/dev/wscons/wsdisplay.c */
extern const struct cdevsw wsdisplay_cdevsw;
+#endif
static void darwin_e_proc_exec(struct proc *, struct exec_package *);
static void darwin_e_proc_fork(struct proc *, struct proc *, int);
@@ -308,7 +311,6 @@
darwin_e_proc_exit(struct proc *p)
{
struct darwin_emuldata *ded;
- int error, mode;
struct lwp *l;
ded = p->p_emuldata;
@@ -332,10 +334,13 @@
wakeup(ded->ded_hidsystem_finished);
}
+#if defined(NWSDISPLAY) && NWSDISPLAY > 0
/*
* Restore text mode and black and white colormap
*/
if (ded->ded_wsdev != NODEV) {
+ int error, mode;
+
mode = WSDISPLAYIO_MODE_EMUL;
error = (*wsdisplay_cdevsw.d_ioctl)(ded->ded_wsdev,
WSDISPLAYIO_SMODE, (void *)&mode, 0, l);
@@ -381,9 +386,9 @@
printf("Cannot revert colormap (error %d)\n", error);
#endif
}
-#endif
-
+#endif /* 0 */
}
+#endif /* defined(NWSDISPLAY) && NWSDISPLAY > 0 */
/*
* Cleanup mach_emuldata part of darwin_emuldata
Index: src/sys/compat/darwin/darwin_ioframebuffer.c
diff -u src/sys/compat/darwin/darwin_ioframebuffer.c:1.42 src/sys/compat/darwin/darwin_ioframebuffer.c:1.43
--- src/sys/compat/darwin/darwin_ioframebuffer.c:1.42 Sat Mar 14 21:04:18 2009
+++ src/sys/compat/darwin/darwin_ioframebuffer.c Sun Aug 16 15:35:52 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: darwin_ioframebuffer.c,v 1.42 2009/03/14 21:04:18 dsl Exp $ */
+/* $NetBSD: darwin_ioframebuffer.c,v 1.43 2009/08/16 15:35:52 manu Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: darwin_ioframebuffer.c,v 1.42 2009/03/14 21:04:18 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: darwin_ioframebuffer.c,v 1.43 2009/08/16 15:35:52 manu Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -72,6 +72,7 @@
#include <compat/darwin/darwin_ioframebuffer.h>
#include "ioconf.h"
+#include "wsdisplay.h"
/* Redefined from sys/dev/wscons/wsdisplay.c */
extern const struct cdevsw wsdisplay_cdevsw;
@@ -803,6 +804,7 @@
static int
darwin_findscreen(dev_t *dev, int unit, int screen)
{
+#if defined(NWSDISPLAY) && NWSDISPLAY > 0
struct device *dv;
struct wsdisplay_softc *sc;
int major, minor;
@@ -820,6 +822,9 @@
#ifdef DEBUG_DARWIN
printf("ioframebuffer uses major = %d, minor = %d\n", major, minor);
-#endif
+#endif /* DEBUG_DARWIN */
return 0;
+#else /* defined(NWSDISPLAY) && NWSDISPLAY > 0 */
+ return ENODEV;
+#endif /* defined(NWSDISPLAY) && NWSDISPLAY > 0 */
}