Index: kernel/arch/arm32/src/mach/raspberrypi/raspberrypi.c
===================================================================
--- kernel/arch/arm32/src/mach/raspberrypi/raspberrypi.c	(revision 034ce6bbc25bb496d142b2ea86f60aebedce4aa4)
+++ kernel/arch/arm32/src/mach/raspberrypi/raspberrypi.c	(revision 73abf491fd74e2df668b93ec7b38c266f85bac09)
@@ -174,6 +174,13 @@
 {
 #ifdef CONFIG_FB
+	uint32_t width, height;
 	fb_properties_t prop;
-	if (bcm2835_fb_init(&prop)) {
+
+	if (!bcm2835_mbox_get_fb_size(&width, &height)) {
+		printf("mbox: could not get the framebuffer size\n");
+		width = 640;
+		height = 480;
+	}
+	if (bcm2835_fb_init(&prop, width, height)) {
 		outdev_t *fb_dev = fb_init(&prop);
 		if (fb_dev)
Index: kernel/genarch/include/genarch/drivers/bcm2835/mbox.h
===================================================================
--- kernel/genarch/include/genarch/drivers/bcm2835/mbox.h	(revision 034ce6bbc25bb496d142b2ea86f60aebedce4aa4)
+++ kernel/genarch/include/genarch/drivers/bcm2835/mbox.h	(revision 73abf491fd74e2df668b93ec7b38c266f85bac09)
@@ -68,4 +68,11 @@
 
 enum {
+	MBOX_TAG_GET_PHYS_W_H	= 0x00040003,
+	MBOX_TAG_SET_PHYS_W_H	= 0x00048003,
+	MBOX_TAG_GET_VIRT_W_H	= 0x00040004,
+	MBOX_TAG_SET_VIRT_W_G	= 0x00048004
+};
+
+enum {
 	MBOX_PROP_CODE_REQ	= 0x00000000,
 	MBOX_PROP_CODE_RESP_OK	= 0x80000000,
@@ -122,4 +129,14 @@
 
 typedef struct {
+	mbox_prop_buf_hdr_t	buf_hdr;
+	mbox_tag_hdr_t		tag_hdr;
+	struct {
+		uint32_t	width;
+		uint32_t	height;
+	} body;
+	uint32_t zero;
+} mbox_getfbsize_buf_t;
+
+typedef struct {
 	ioport32_t width;
 	ioport32_t height;
@@ -135,5 +152,6 @@
 
 extern bool bcm2835_prop_get_memory(uint32_t *base, uint32_t *size);
-extern bool bcm2835_fb_init(fb_properties_t *prop);
+extern bool bcm2835_fb_init(fb_properties_t *prop, uint32_t width, uint32_t heigth);
+extern bool bcm2835_mbox_get_fb_size(uint32_t *h, uint32_t *w);
 
 #endif
Index: kernel/genarch/src/drivers/bcm2835/mbox.c
===================================================================
--- kernel/genarch/src/drivers/bcm2835/mbox.c	(revision 034ce6bbc25bb496d142b2ea86f60aebedce4aa4)
+++ kernel/genarch/src/drivers/bcm2835/mbox.c	(revision 73abf491fd74e2df668b93ec7b38c266f85bac09)
@@ -86,5 +86,5 @@
 }
 
-bool bcm2835_fb_init(fb_properties_t *prop)
+bool bcm2835_fb_init(fb_properties_t *prop, uint32_t width, uint32_t height)
 {
 	bcm2835_mbox_t *fb_mbox;
@@ -95,6 +95,6 @@
 	    KM_NATURAL_ALIGNMENT, PAGE_NOT_CACHEABLE);
 
-	fb_desc->width = 640;
-	fb_desc->height = 480;
+	fb_desc->width = width;
+	fb_desc->height = height;
 	fb_desc->virt_width = fb_desc->width;
 	fb_desc->virt_height = fb_desc->height;
@@ -128,4 +128,30 @@
 }
 
+bool bcm2835_mbox_get_fb_size(uint32_t *w, uint32_t *h)
+{
+	bool r;
+	MBOX_BUFF_ALLOC(msg, mbox_getfbsize_buf_t);
+
+	msg->buf_hdr.size = sizeof(mbox_getfbsize_buf_t);
+	msg->buf_hdr.code = MBOX_PROP_CODE_REQ;
+	msg->tag_hdr.tag_id = MBOX_TAG_GET_PHYS_W_H;
+	msg->tag_hdr.buf_size = sizeof(msg->body);
+	msg->tag_hdr.val_len  = 0;
+	msg->zero = 0;
+
+	mbox_write((bcm2835_mbox_t *)BCM2835_MBOX0_ADDR,
+	    MBOX_CHAN_PROP_A2V, KA2VCA((uint32_t)msg));
+	mbox_read((bcm2835_mbox_t *)BCM2835_MBOX0_ADDR,
+	    MBOX_CHAN_PROP_A2V);
+
+	r = msg->buf_hdr.code == MBOX_PROP_CODE_RESP_OK;
+	if (r) {
+		*h = msg->body.height;
+		*w = msg->body.width;
+	}
+
+	return r;
+}
+
 /**
  * @}
