Module Name:    src
Committed By:   macallan
Date:           Tue Mar  8 02:57:01 UTC 2011

Modified Files:
        src/sys/arch/x86/x86: x86_autoconf.c

Log Message:
if we know the framebuffer's virtual address pass it to the fb driver


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/x86/x86/x86_autoconf.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/x86/x86/x86_autoconf.c
diff -u src/sys/arch/x86/x86/x86_autoconf.c:1.58 src/sys/arch/x86/x86/x86_autoconf.c:1.59
--- src/sys/arch/x86/x86/x86_autoconf.c:1.58	Tue Feb 22 06:33:33 2011
+++ src/sys/arch/x86/x86/x86_autoconf.c	Tue Mar  8 02:57:00 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: x86_autoconf.c,v 1.58 2011/02/22 06:33:33 dholland Exp $	*/
+/*	$NetBSD: x86_autoconf.c,v 1.59 2011/03/08 02:57:00 macallan Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.58 2011/02/22 06:33:33 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.59 2011/03/08 02:57:00 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -676,6 +676,9 @@
 		if (PCI_CLASS(pa->pa_class) == PCI_CLASS_DISPLAY) {
 #if NWSDISPLAY > 0 && NGENFB > 0
 			extern struct vcons_screen x86_genfb_console_screen;
+			struct rasops_info *ri;
+
+			ri = &x86_genfb_console_screen.scr_ri;
 #endif
 
 			fbinfo = lookup_bootinfo(BTINFO_FRAMEBUFFER);
@@ -695,8 +698,15 @@
 				prop_dictionary_set_uint16(dict, "linebytes",
 				    fbinfo->stride);
 
+				prop_dictionary_set_uint64(dict, "address",
+				    fbinfo->physaddr);
+#if NWSDISPLAY > 0 && NGENFB > 0
+				if (ri->ri_bits != NULL) {
 					prop_dictionary_set_uint64(dict,
-					    "address", fbinfo->physaddr);
+					    "virtual_address",
+					    (vaddr_t)ri->ri_bits);
+				}
+#endif
 				}
 #if notyet
 				prop_dictionary_set_bool(dict, "splash",

Reply via email to