Index: corebootv3-via_car/arch/x86/via/stage1.c
===================================================================
--- corebootv3-via_car/arch/x86/via/stage1.c	(Revision 976)
+++ corebootv3-via_car/arch/x86/via/stage1.c	(Arbeitskopie)
@@ -29,12 +29,14 @@
 #include <string.h>
 #include <mtrr.h>
 #include <via_c7.h>
+#include <uart8250.h>
 
 /**
  * Disable Cache As RAM (CAR) after memory is setup.
  */
 void disable_car(void)
 {
+	printk(BIOS_DEBUG, "disable_car entry\n");
 	/* Determine new global variable location. Stack organization from top
 	 * Top 4 bytes are reserved
 	 * Pointer to global variables
@@ -45,16 +47,98 @@
 	const struct global_vars *newlocation = (struct global_vars *)((RAM_STACK_BASE - sizeof(struct global_vars *) - sizeof(struct global_vars)) & ~0x7);
 	/* Copy global variables to new location. */
 	memcpy(newlocation, global_vars(), sizeof(struct global_vars));
+	printk(BIOS_DEBUG, "disable_car global_vars copy done\n");
 	/* Set the new global variable pointer. */
 	*(struct global_vars **)(RAM_STACK_BASE - sizeof(struct global_vars *)) = newlocation;
 
+	printk(BIOS_DEBUG, "disable_car global_vars pointer adjusted, entering asm code...");
+	printk(BIOS_DEBUG, "now..........................................................................\n");
+	uart8250_tx_byte(TTYSx_BASE, 'F');
+	uart8250_tx_byte(TTYSx_BASE, 'O');
+	uart8250_tx_byte(TTYSx_BASE, 'O');
+	uart8250_tx_byte(TTYSx_BASE, 'B');
+	uart8250_tx_byte(TTYSx_BASE, 'A');
+	uart8250_tx_byte(TTYSx_BASE, 'R');
+	uart8250_tx_byte(TTYSx_BASE, '\n');
 	__asm__ __volatile__(
+
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$110, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$116, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$114, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$100, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$10, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+
 	/* We don't need cache as ram for now on */
 	/* disable cache */
 	"	movl    %%cr0, %%eax		\n"
 	"	orl    $(0x1<<30),%%eax		\n"
 	"	movl    %%eax, %%cr0		\n"
 
+	"	movl	$99, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$97, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$99, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$104, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$32, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$100, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$105, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$115, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$97, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$98, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$108, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$100, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$10, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+
 	/* disable fixed mtrr from now on, it will be enabled by coreboot_ram again*/
 	"	movl    %[_SYSCFG_MSR], %%ecx	\n"
 	"	rdmsr				\n"
@@ -64,6 +148,67 @@
 	"	wrmsr				\n"
 #warning Must clear MTRR 0x200 and 0x201
 
+	"	movl	$102, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$105, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$120, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$100, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$32, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$109, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$116, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$114, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$114, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$32, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$100, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$105, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$115, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$97, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$98, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$108, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$100, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$10, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+
 	/* Set the default memory type and disable fixed and enable variable MTRRs */
 	"	movl    %[_MTRRdefType_MSR], %%ecx	\n"
 	"	xorl    %%edx, %%edx		\n"
@@ -71,20 +216,209 @@
 	"	movl    $0x00000800, %%eax	\n"
 	"	wrmsr				\n"
 
+	"	movl	$118, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$97, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$114, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$105, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$97, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$98, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$108, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$32, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$109, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$116, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$114, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$114, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$115, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$32, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$110, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$97, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$98, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$108, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$100, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$10, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+
 	/* enable cache */
 	"	movl    %%cr0, %%eax		\n"
 	"	andl    $0x9fffffff,%%eax	\n"
 	"	movl    %%eax, %%cr0		\n"
 
+	"	movl	$99, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$97, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$99, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$104, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$32, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$110, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$97, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$98, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$108, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$100, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$10, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+
 	"	wbinvd				\n"
 
+	"	movl	$119, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$98, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$105, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$110, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$118, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$100, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$32, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$100, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$111, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$110, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$10, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+
 	"	movl	%[newesp], %%esp	\n"
+
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$115, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$112, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$32, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$99, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$104, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$97, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$110, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$103, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$101, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$100, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+	"	movl	$10, %%edx\n"
+	"	movl	%[_TTYSx_BASE], %%eax\n"
+	"	call	uart8250_tx_byte\n"
+
 	"	call stage1_phase3		\n"
 	:: [newesp] "i" (newlocation),
 	 [_SYSCFG_MSR] "i" (SYSCFG_MSR),
 	 [_SYSCFG_MSR_newval] "i" (~(SYSCFG_MSR_MtrrFixDramModEn | SYSCFG_MSR_MtrrFixDramEn)),
 	 [_SYSCFG_MSR_MtrrFixDramModEn] "i" (SYSCFG_MSR_MtrrFixDramModEn),
 	 [_SYSCFG_MSR_MtrrFixDramEn] "i" (SYSCFG_MSR_MtrrFixDramEn),
-	 [_MTRRdefType_MSR] "i" (MTRRdefType_MSR)
+	 [_MTRRdefType_MSR] "i" (MTRRdefType_MSR),
+	 [_TTYSx_BASE] "i" (TTYSx_BASE)
 	: "memory");
 }
Index: corebootv3-via_car/arch/x86/stage1.c
===================================================================
--- corebootv3-via_car/arch/x86/stage1.c	(Revision 976)
+++ corebootv3-via_car/arch/x86/stage1.c	(Arbeitskopie)
@@ -263,6 +263,7 @@
 #ifdef CONFIG_CONSOLE_BUFFER
 	/* Move the printk buffer to PRINTK_BUF_ADDR_RAM */
 	printk_buffer_move((void *)PRINTK_BUF_ADDR_RAM, PRINTK_BUF_SIZE_RAM);
+	printk(BIOS_DEBUG, "Done printk() buffer move\n");
 #endif
 	/* Turn off Cache-As-Ram */
 	disable_car();
