The VRAM offset seems to be the offset of the framebuffer within the VRAM.

Until we really map the whole VRAM, this is 0.
Two missing files in the last commit
This commit is contained in:
manu 2003-12-27 22:06:19 +00:00
parent 5d2216c751
commit 48d72491a9
3 changed files with 15 additions and 8 deletions

View File

@ -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 <sys/cdefs.h>
__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);

View File

@ -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 */

View File

@ -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 <sys/cdefs.h>
__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 <sys/types.h>
#include <sys/param.h>
@ -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;