Index: coreboot-v2/src/cpu/amd/car/copy_and_run.c
===================================================================
--- coreboot-v2.orig/src/cpu/amd/car/copy_and_run.c
+++ coreboot-v2/src/cpu/amd/car/copy_and_run.c
@@ -2,14 +2,6 @@
 	moved from nrv2v.c and some lines from crt0.S
    2006/05/02 - stepan: move nrv2b to an extra file.
 */
-static inline void print_debug_cp_run(const char *strval, uint32_t val)
-{
-#if CONFIG_USE_PRINTK_IN_CAR
-        printk_debug("%s%08x\r\n", strval, val);
-#else
-        print_debug(strval); print_debug_hex32(val); print_debug("\r\n");
-#endif
-}
 
 #if CONFIG_COMPRESS
 #define ENDIAN   0
@@ -17,6 +9,7 @@ static inline void print_debug_cp_run(co
 #include "lib/nrv2b.c"
 #endif
 
+extern u8 _liseg, _iseg, _eiseg;
 
 static void copy_and_run(void)
 {
@@ -24,37 +17,35 @@ static void copy_and_run(void)
         unsigned long ilen, olen;
 
 
-#if !CONFIG_COMPRESS 
-	print_debug("Copying coreboot to RAM.\r\n");
-	__asm__ volatile (
-		"leal _liseg, %0\n\t"
-		"leal _iseg, %1\n\t"
-		"leal _eiseg, %2\n\t"
-		"subl %1, %2\n\t"
-		: "=a" (src), "=b" (dst), "=c" (olen)
-	);
-	memcpy(dst, src, olen);
-#else 
-	print_debug("Uncompressing coreboot to RAM.\r\n");
-
-        __asm__ volatile (
-	        "leal _liseg, %0\n\t"
-	        "leal _iseg,  %1\n\t"
-                : "=a" (src) , "=b" (dst)
-        );
-
-	print_debug_cp_run("src=",(uint32_t)src); 
-	print_debug_cp_run("dst=",(uint32_t)dst);
-
-//	dump_mem(src, src+0x100);
-
-	olen = unrv2b(src, dst, &ilen);
-	print_debug_cp_run("coreboot_ram.nrv2b length = ", ilen);
+	src = &_liseg;
+	dst = &_iseg;
+	ilen = &_eiseg - dst;
+
+#if CONFIG_USE_INIT
+	printk_spew("src=%08x\r\n",src);
+	printk_spew("dst=%08x\r\n",dst);
+#else
+	print_spew("src="); print_spew_hex32((uint32_t)src); print_spew("\r\n");
+	print_spew("dst="); print_spew_hex32((uint32_t)dst); print_spew("\r\n");
+#endif
 
+#if !CONFIG_COMPRESS
+        print_debug("Copying coreboot to RAM.\r\n");
+        memcpy(src, dst, ilen);
+        olen = ilen;
+#else
+        print_debug("Uncompressing coreboot to RAM.\r\n");
+//      dump_mem(src, src+0x100);
+        olen = unrv2b(src, dst, &ilen);
 #endif
+
 //	dump_mem(dst, dst+0x100);
 
-	print_debug_cp_run("coreboot_ram.bin   length = ", olen);
+#if CONFIG_USE_INIT
+	printk_spew("coreboot_ram.bin length = %08x\r\n", olen);
+#else
+	print_spew("coreboot_ram.bin length = "); print_spew_hex32(olen); print_spew("\r\n");
+#endif
 
 	print_debug("Jumping to coreboot.\r\n");
 
@@ -69,6 +60,8 @@ static void copy_and_run(void)
 
 #if CONFIG_AP_CODE_IN_CAR == 1
 
+extern u8 _liseg_apc, _iseg_apc, _eiseg_apc;
+
 static void copy_and_run_ap_code_in_car(unsigned ret_addr)
 {
         uint8_t *src, *dst;
@@ -76,23 +69,15 @@ static void copy_and_run_ap_code_in_car(
 
 //        print_debug("Copying coreboot AP code to CAR.\r\n");
 
+	src = &_liseg_apc;
+	dst = &_iseg_apc;
+	ilen = &_eiseg_apc - dst;
+
 #if !CONFIG_COMPRESS
-        __asm__ volatile (
-                "leal _liseg_apc, %0\n\t"
-                "leal _iseg_apc, %1\n\t"
-                "leal _eiseg_apc, %2\n\t"
-                "subl %1, %2\n\t"
-                : "=a" (src), "=b" (dst), "=c" (olen)
-        );
-        memcpy(dst, src, olen);
+        memcpy(dst, src, ilen);
+	olen = ilen;
 #else
 
-        __asm__ volatile (
-                "leal _liseg_apc, %0\n\t"
-                "leal _iseg_apc,  %1\n\t"
-                : "=a" (src) , "=b" (dst)
-        );
-
 //        print_debug_cp_run("src=",(uint32_t)src);
 //        print_debug_cp_run("dst=",(uint32_t)dst);
 
Index: coreboot-v2/src/cpu/x86/car/copy_and_run.c
===================================================================
--- coreboot-v2.orig/src/cpu/x86/car/copy_and_run.c
+++ coreboot-v2/src/cpu/x86/car/copy_and_run.c
@@ -9,33 +9,17 @@
 #include "lib/nrv2b.c"
 #endif
 
+extern u8 _liseg, _iseg, _eiseg;
+
 static void copy_and_run(unsigned cpu_reset)
 {
 	uint8_t *src, *dst; 
-#if !CONFIG_COMPRESS
-	unsigned long dst_len;
-#endif
         unsigned long ilen, olen;
 
 
-#if !CONFIG_COMPRESS 
-	print_debug("Copying coreboot to RAM.\r\n");
-	__asm__ volatile (
-		"leal _liseg, %0\n\t"
-		"leal _iseg, %1\n\t"
-		"leal _eiseg, %2\n\t"
-		"subl %1, %2\n\t"
-		: "=a" (src), "=b" (dst), "=c" (dst_len)
-	);
-	memcpy(src, dst, dst_len);
-#else 
-	print_debug("Uncompressing coreboot to RAM.\r\n");
-
-        __asm__ volatile (
-	        "leal _liseg, %0\n\t"
-	        "leal _iseg,  %1\n\t"
-                : "=a" (src) , "=b" (dst)
-        );
+	src = &_liseg;
+	dst = &_iseg;
+	ilen = &_eiseg - dst;
 
 #if CONFIG_USE_INIT		
 	printk_spew("src=%08x\r\n",src); 
@@ -44,12 +28,17 @@ static void copy_and_run(unsigned cpu_re
         print_spew("src="); print_spew_hex32((uint32_t)src); print_spew("\r\n");
         print_spew("dst="); print_spew_hex32((uint32_t)dst); print_spew("\r\n");
 #endif
-	
-//	dump_mem(src, src+0x100);
 
+#if !CONFIG_COMPRESS
+	print_debug("Copying coreboot to RAM.\r\n");
+	memcpy(src, dst, ilen);
+	olen = ilen;
+#else
+	print_debug("Uncompressing coreboot to RAM.\r\n");
+//	dump_mem(src, src+0x100);
 	olen = unrv2b(src, dst, &ilen);
-
 #endif
+
 //	dump_mem(dst, dst+0x100);
 #if CONFIG_USE_INIT
 	printk_spew("coreboot_ram.bin length = %08x\r\n", olen);
