Index: arch/sparc64/loader/main.c
===================================================================
--- arch/sparc64/loader/main.c	(revision 83253ad3b0d532efbd62b20478ca3a2d7b95527a)
+++ arch/sparc64/loader/main.c	(revision 822b64e0b6aa7a7bbff90412b98c02914304fc3a)
@@ -31,15 +31,17 @@
 #include "asm.h"
 #include "_components.h"
+#include <ofw.h>
 
 #define KERNEL_VIRTUAL_ADDRESS 0x400000
+
+bootinfo_t bootinfo;
 
 void bootstrap(void)
 {
 	printf("HelenOS SPARC64 Bootloader\n");
-	
+
 	component_t components[COMPONENTS];
-	bootinfo_t bootinfo;
 	init_components(components);
-	
+
 	printf("\nMemory statistics\n");
 	printf(" kernel entry point at %L\n", KERNEL_VIRTUAL_ADDRESS);
@@ -49,4 +51,10 @@
 	for (i = 0; i < COMPONENTS; i++)
 		printf(" %L: %s image (size %d bytes)\n", components[i].start, components[i].name, components[i].size);
+
+	screen_t scr;
+	
+	ofw_screen(&scr);
+	printf("\n%P: fb, %dx%dx%d\n", ofw_translate(scr.addr), scr.width, scr.height, scr.bpp);
+
 	
 	printf("\nCopying components\n");
@@ -65,5 +73,5 @@
 		printf("done.\n");
 	}
-	
+
 	printf("\nBooting the kernel...\n");
 	jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, &bootinfo, sizeof(bootinfo));
Index: genarch/ofw.c
===================================================================
--- genarch/ofw.c	(revision 83253ad3b0d532efbd62b20478ca3a2d7b95527a)
+++ genarch/ofw.c	(revision 822b64e0b6aa7a7bbff90412b98c02914304fc3a)
@@ -30,4 +30,5 @@
 #include <printf.h>
 #include <asm.h>
+#include <types.h>
 
 #define MAX_OFW_ARGS		10
@@ -168,11 +169,18 @@
 void *ofw_translate(const void *virt)
 {
-	ofw_arg_t result[3];
-	
-	if (ofw_call("call-method", 4, 4, result, "translate", ofw_mmu, virt, 1) != 0) {
+	ofw_arg_t result[4];
+	int shift;
+
+	if (ofw_call("call-method", 3, 5, result, "translate", ofw_mmu, virt) != 0) {
 		puts("Error: MMU method translate() failed, halting.\n");
 		halt();
 	}
-	return (void *) result[2];
+
+	if (sizeof(unative_t) == 8)
+		shift = 32;
+	else
+		shift = 0;
+		
+	return (void *) (((result[2]&0xffffffff)<<shift)|((result[3])&0xffffffff));
 }
 
@@ -180,5 +188,17 @@
 int ofw_map(const void *phys, const void *virt, const int size, const int mode)
 {
-	return ofw_call("call-method", 6, 1, NULL, "map", ofw_mmu, mode, size, virt, phys);
+	uintptr_t phys_hi, phys_lo;
+
+	if (sizeof(unative_t) == 8) {
+		int shift = 32;
+		phys_hi = (uintptr_t) phys >> shift;
+		phys_lo = (uintptr_t) phys & 0xffffffff;
+	} else {
+		phys_hi = 0;
+		phys_lo = (uintptr_t) phys;
+	}
+
+	return ofw_call("call-method", 7, 1, NULL, "map", ofw_mmu, mode, size, virt,
+		phys_hi, phys_lo);
 }
 
@@ -239,3 +259,2 @@
 	return true;
 }
-
