Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/darwin The VRAM offset seems to be the offset of ...



details:   https://anonhg.NetBSD.org/src/rev/e790fad35fcd
branches:  trunk
changeset: 556801:e790fad35fcd
user:      manu <manu%NetBSD.org@localhost>
date:      Sat Dec 27 22:06:19 2003 +0000

description:
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

diffstat:

 sys/compat/darwin/darwin_exec.c          |   5 +++--
 sys/compat/darwin/darwin_exec.h          |   7 ++++---
 sys/compat/darwin/darwin_ioframebuffer.c |  11 ++++++++---
 3 files changed, 15 insertions(+), 8 deletions(-)

diffs (80 lines):

diff -r b497adbb85c0 -r e790fad35fcd sys/compat/darwin/darwin_exec.c
--- a/sys/compat/darwin/darwin_exec.c   Sat Dec 27 21:30:27 2003 +0000
+++ b/sys/compat/darwin/darwin_exec.c   Sat Dec 27 22:06:19 2003 +0000
@@ -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 @@
        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 -r b497adbb85c0 -r e790fad35fcd sys/compat/darwin/darwin_exec.h
--- a/sys/compat/darwin/darwin_exec.h   Sat Dec 27 21:30:27 2003 +0000
+++ b/sys/compat/darwin/darwin_exec.h   Sat Dec 27 22:06:19 2003 +0000
@@ -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 -r b497adbb85c0 -r e790fad35fcd sys/compat/darwin/darwin_ioframebuffer.c
--- a/sys/compat/darwin/darwin_ioframebuffer.c  Sat Dec 27 21:30:27 2003 +0000
+++ b/sys/compat/darwin/darwin_ioframebuffer.c  Sat Dec 27 22:06:19 2003 +0000
@@ -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 @@
                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;



Home | Main Index | Thread Index | Old Index