Author: mjones
Date: 2008-10-23 00:24:47 +0200 (Thu, 23 Oct 2008)
New Revision: 3688

Modified:
   trunk/coreboot-v2/src/arch/i386/init/crt0.S.lb
   trunk/coreboot-v2/src/cpu/amd/model_lx/cache_as_ram.inc
Log:
Speed up copying coreboot to ram by using "movsl" instead of "movsb".
Also use different console messages for copying and uncompressing, like
it's already done in similar code in other places.

Signed-off-by: Jens Rottmann <[EMAIL PROTECTED]>
Acked-by: Marc Jones <[EMAIL PROTECTED]>

Modified: trunk/coreboot-v2/src/arch/i386/init/crt0.S.lb
===================================================================
--- trunk/coreboot-v2/src/arch/i386/init/crt0.S.lb      2008-10-22 22:20:48 UTC 
(rev 3687)
+++ trunk/coreboot-v2/src/arch/i386/init/crt0.S.lb      2008-10-22 22:24:47 UTC 
(rev 3688)
@@ -74,6 +74,11 @@
        movl    $_iseg,  %edi
        movl    $_eiseg, %ecx
        subl    %edi, %ecx
+       movb    %cl, %al
+       shrl    $2, %ecx
+       andb    $3, %al
+       rep     movsl
+       movb    %al, %cl
        rep     movsb
 #else
        leal    4+_liseg, %esi
@@ -215,7 +220,11 @@
 
 #if defined(CONSOLE_DEBUG_TX_STRING) && (ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG)
 .section ".rom.data"
+#if CONFIG_COMPRESS
+str_copying_to_ram:  .string "Uncompressing coreboot to RAM.\r\n"
+#else
 str_copying_to_ram:  .string "Copying coreboot to RAM.\r\n"
+#endif
 str_pre_main:        .string "Jumping to coreboot.\r\n"
 .previous
 

Modified: trunk/coreboot-v2/src/cpu/amd/model_lx/cache_as_ram.inc
===================================================================
--- trunk/coreboot-v2/src/cpu/amd/model_lx/cache_as_ram.inc     2008-10-22 
22:20:48 UTC (rev 3687)
+++ trunk/coreboot-v2/src/cpu/amd/model_lx/cache_as_ram.inc     2008-10-22 
22:24:47 UTC (rev 3688)
@@ -222,6 +222,11 @@
        movl    $_iseg,  %edi
        movl    $_eiseg, %ecx
        subl    %edi, %ecx
+       movb    %cl, %al
+       shrl    $2, %ecx
+       andb    $3, %al
+       rep     movsl
+       movb    %al, %cl
        rep     movsb
 #else
        leal    4+_liseg, %esi
@@ -363,7 +368,11 @@
 
 #if defined(CONSOLE_DEBUG_TX_STRING) && (ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG)
 .section ".rom.data"
+#if CONFIG_COMPRESS
+str_copying_to_ram:  .string "Uncompressing coreboot to ram.\r\n"
+#else
 str_copying_to_ram:  .string "Copying coreboot to ram.\r\n"
+#endif
 str_pre_main:        .string "Jumping to coreboot.\r\n"
 .previous
 


--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to