diff --git a/sys/compat/darwin/darwin_exec.c b/sys/compat/darwin/darwin_exec.c index dee9f07ccd6e..67fa2aa262f3 100644 --- a/sys/compat/darwin/darwin_exec.c +++ b/sys/compat/darwin/darwin_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: darwin_exec.c,v 1.33 2003/12/24 22:53:59 manu Exp $ */ +/* $NetBSD: darwin_exec.c,v 1.34 2003/12/27 22:06:19 manu Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include "opt_compat_darwin.h" /* For COMPAT_DARWIN in mach_port.h */ #include -__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.33 2003/12/24 22:53:59 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.34 2003/12/27 22:06:19 manu Exp $"); #include "opt_syscall_debug.h" @@ -303,6 +303,7 @@ darwin_e_proc_init(p, vmspace) ded = (struct darwin_emuldata *)p->p_emuldata; ded->ded_fakepid = 0; ded->ded_wsdev = NODEV; + ded->ded_vramoffset = NULL; /* Initalize the mach_emuldata part of darwin_emuldata */ mach_e_proc_init(p, vmspace); diff --git a/sys/compat/darwin/darwin_exec.h b/sys/compat/darwin/darwin_exec.h index 3694170a6e0f..b868d4a11c5e 100644 --- a/sys/compat/darwin/darwin_exec.h +++ b/sys/compat/darwin/darwin_exec.h @@ -1,4 +1,4 @@ -/* $NetBSD: darwin_exec.h,v 1.9 2003/11/20 07:12:34 manu Exp $ */ +/* $NetBSD: darwin_exec.h,v 1.10 2003/12/27 22:06:19 manu Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -48,9 +48,10 @@ struct darwin_emuldata { struct mach_emuldata ded_mach_emuldata; pid_t ded_fakepid; - dev_t ded_wsdev; /* display to restore on exit */ + dev_t ded_wsdev; /* display to restore on exit */ int *ded_hidsystem_finished; /* iohidsystem thread finished flag */ - int ded_flags; /* flags, see below */ + int ded_flags; /* flags, see below */ + void *ded_vramoffset; /* Where VRAM was mapped? */ }; #define DARWIN_DED_SIGEXC 1 /* Mach exceptions instead of signals */ diff --git a/sys/compat/darwin/darwin_ioframebuffer.c b/sys/compat/darwin/darwin_ioframebuffer.c index 4a2896606f6c..629d92b35063 100644 --- a/sys/compat/darwin/darwin_ioframebuffer.c +++ b/sys/compat/darwin/darwin_ioframebuffer.c @@ -1,4 +1,4 @@ -/* $NetBSD: darwin_ioframebuffer.c,v 1.29 2003/12/26 20:34:34 manu Exp $ */ +/* $NetBSD: darwin_ioframebuffer.c,v 1.30 2003/12/27 22:06:19 manu Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: darwin_ioframebuffer.c,v 1.29 2003/12/26 20:34:34 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: darwin_ioframebuffer.c,v 1.30 2003/12/27 22:06:19 manu Exp $"); #include #include @@ -610,7 +610,12 @@ darwin_ioframebuffer_connect_map_memory(args) struct darwin_emuldata *ded; ded = p->p_emuldata; - ded->ded_vramoffset = (void *)pvaddr; + /* + * This seems to be the offset of the framebuffer + * within the VRAM. For now 0, as we are only + * able to map the framebuffer. + */ + ded->ded_vramoffset = (void *)(pvaddr - pvaddr); } return 0;