Index: kernel/arch/amd64/src/boot/multiboot.S
===================================================================
--- kernel/arch/amd64/src/boot/multiboot.S	(revision 15639eccad9c8be4e57a86cf372ff060b025baa3)
+++ kernel/arch/amd64/src/boot/multiboot.S	(revision 08f1a6d3635e2c0cb486edea301cd03918d24bb8)
@@ -38,4 +38,6 @@
 #include <arch/cpu.h>
 
+// TODO: most of this file can be rewritten in C
+
 #define START_STACK  (BOOT_OFFSET - BOOT_STACK_SIZE)
 
@@ -50,5 +52,5 @@
 
 .macro pm_status msg
-#ifdef CONFIG_EGA
+#if defined(CONFIG_EGA) && !defined(CONFIG_FB)
 	pushl %esi
 	movl \msg, %esi
@@ -67,6 +69,11 @@
 multiboot_header:
 	.long MULTIBOOT_HEADER_MAGIC
+#ifdef CONFIG_FB
 	.long MULTIBOOT_HEADER_FLAGS
 	.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)  /* checksum */
+#else
+	.long MULTIBOOT_HEADER_FLAGS_NOFB
+	.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS_NOFB)  /* checksum */
+#endif
 	.long multiboot_header
 	.long unmapped_start
@@ -74,4 +81,10 @@
 	.long 0
 	.long multiboot_image_start
+#ifdef CONFIG_FB
+	.long 0
+	.long CONFIG_BFB_WIDTH
+	.long CONFIG_BFB_HEIGHT
+	.long CONFIG_BFB_BPP
+#endif
 
 SYMBOL(multiboot_image_start)
@@ -158,6 +171,4 @@
 	sse2_supported:
 
-#include "vesa_prot.inc"
-
 	pm2_status $status_prot2
 
@@ -568,6 +579,4 @@
 
 	ret
-
-#include "vesa_real.inc"
 
 .section K_INI_PTLS, "aw", @progbits
@@ -708,10 +717,6 @@
 status_prot:
 	.asciz "[prot] "
-status_vesa_copy:
-	.asciz "[vesa_copy] "
 status_multiboot_cmdline:
 	.asciz "[multiboot_cmdline] "
-status_vesa_real:
-	.asciz "[vesa_real] "
 status_prot2:
 	.asciz "[prot2] "
Index: kernel/arch/amd64/src/boot/vesa_prot.inc
===================================================================
--- kernel/arch/amd64/src/boot/vesa_prot.inc	(revision 15639eccad9c8be4e57a86cf372ff060b025baa3)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../ia32/src/boot/vesa_prot.inc
Index: kernel/arch/amd64/src/boot/vesa_real.inc
===================================================================
--- kernel/arch/amd64/src/boot/vesa_real.inc	(revision 15639eccad9c8be4e57a86cf372ff060b025baa3)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../ia32/src/boot/vesa_real.inc
Index: kernel/arch/amd64/src/boot/vesa_ret.inc
===================================================================
--- kernel/arch/amd64/src/boot/vesa_ret.inc	(revision 15639eccad9c8be4e57a86cf372ff060b025baa3)
+++ 	(revision )
@@ -1,24 +1,0 @@
-.code32
-vesa_init_protected:
-	cli
-	cld
-
-	/* Initialize stack pointer */
-	movl $START_STACK, %esp
-
-	/* Kernel data + stack */
-	movw $GDT_SELECTOR(KDATA_DES), %cx
-	movw %cx, %es
-	movw %cx, %ds
-	movw %cx, %ss
-
-	/*
-	 * Simics seems to remove hidden part of GS on entering user mode
-	 * when _visible_ part of GS does not point to user-mode segment.
-	 */
-
-	movw $GDT_SELECTOR(UDATA_DES), %cx
-	movw %cx, %fs
-	movw %cx, %gs
-
-	jmpl $GDT_SELECTOR(KTEXT32_DES), $vesa_meeting_point
Index: kernel/arch/amd64/src/boot/vga323.pal
===================================================================
--- kernel/arch/amd64/src/boot/vga323.pal	(revision 15639eccad9c8be4e57a86cf372ff060b025baa3)
+++ 	(revision )
@@ -1,1 +1,0 @@
-../../../ia32/src/boot/vga323.pal
