Index: kernel/genarch/src/fb/fb.c
===================================================================
--- kernel/genarch/src/fb/fb.c	(revision 8af9950eef9c2c7dfd3ef398eb581435b1f15ac1)
+++ kernel/genarch/src/fb/fb.c	(revision f0c9aff01d81837d08318925aeba53a675fd1af9)
@@ -178,5 +178,5 @@
 }
 
-/** Put pixel - 8-bit depth (color palette/3:2:3)
+/** Put pixel - 8-bit depth (color palette/3:2:3, inverted)
  *
  * Even though we try 3:2:3 color scheme here, an 8-bit framebuffer
@@ -185,9 +185,17 @@
  * palette. This could be fixed by supporting custom palette
  * and setting it to simulate the 8-bit truecolor.
+ *
+ * Currently we set the palette on the sparc64 port.
+ *
+ * Note that the byte is being inverted by this function. The reason is
+ * that we would like to use a color palette where the white color code
+ * is 0 and the black color code is 255, as some machines (SunBlade 1500) 
+ * use these codes for black and white and prevent to set codes
+ * 0 and 255 to other colors.
  */
 static void rgb_byte8(void *dst, int rgb)
 {
-	*((uint8_t *) dst) = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 |
-	    BLUE(rgb, 3);
+	*((uint8_t *) dst) = 255 - (RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 |
+	    BLUE(rgb, 3));
 }
 
@@ -198,5 +206,5 @@
 static int byte8_rgb(void *src)
 {
-	int color = *(uint8_t *)src;
+	int color = 255 - (*(uint8_t *)src);
 	return (((color >> 5) & 0x7) << (16 + 5)) |
 	    (((color >> 3) & 0x3) << (8 + 6)) | ((color & 0x7) << 5);
@@ -484,6 +492,6 @@
 	
 	/* Map the framebuffer */
-	fbaddress = (uint8_t *) hw_map((uintptr_t) props->addr + props->offset,
-		fbsize);
+	fbaddress = (uint8_t *) hw_map((uintptr_t) props->addr,
+		fbsize + props->offset);
 	fbaddress += props->offset;
 	
@@ -495,5 +503,5 @@
 	columns = props->x / COL_WIDTH;
 
-	fb_parea.pbase = (uintptr_t) props->addr;
+	fb_parea.pbase = (uintptr_t) props->addr + props->offset;
 	fb_parea.vbase = (uintptr_t) fbaddress;
 	fb_parea.frames = SIZE2FRAMES(fbsize);
