[OpenBIOS] [PATCH 5/5] ofmem: use helper to find framebuffer virtual address on sparc64

Igor V. Kovalenko igor.v.kovalenko at gmail.com
Sun Dec 27 12:44:23 CET 2009


From: Igor V. Kovalenko <igor.v.kovalenko at gmail.com>

- init_video: call ofmem_find_virtual to access
  framebuffer on sparc64

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko at gmail.com>
---
 modules/video.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/modules/video.c b/modules/video.c
index fe8f1a2..83a39b4 100644
--- a/modules/video.c
+++ b/modules/video.c
@@ -309,7 +309,6 @@ init_video( unsigned long fb,  int width, int height, int depth, int rb )
 	int i, s, size;
 	phandle_t ph=0;
 
-	video.fb.mphys = fb;
 	video.fb.w = width;
 	video.fb.h = height;
 	video.fb.depth = depth;
@@ -333,6 +332,14 @@ init_video( unsigned long fb,  int width, int height, int depth, int rb )
 	ofmem_claim_virt( video.fb.mphys, size, 0 );
 	ofmem_map( video.fb.mphys, video.fb.mphys, size, -1 );
 #endif
+#if defined(CONFIG_SPARC64)
+    // TODO: use full 64bit physical address of framebuffer
+	// The issue here is that fb is passed value of bar address
+	// which is an offset from pci memory space
+	fb = ofmem_find_virtual(fb);
+#endif
+
+	video.fb.mphys = fb;
 
 	for( i=0; i<256; i++ )
 		set_color( i, i * 0x010101 );




More information about the OpenBIOS mailing list