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 <JRottmann@LiPPERTEmbedded.de>
Acked-by: Marc Jones <marc.jones@amd.com>

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3688 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Jens Rottmann 2008-10-22 22:24:47 +00:00 committed by Marc Jones
parent 9a9e61b7ec
commit 5e5bef5fbd
2 changed files with 18 additions and 0 deletions

View File

@ -74,6 +74,11 @@ __main:
movl $_iseg, %edi movl $_iseg, %edi
movl $_eiseg, %ecx movl $_eiseg, %ecx
subl %edi, %ecx subl %edi, %ecx
movb %cl, %al
shrl $2, %ecx
andb $3, %al
rep movsl
movb %al, %cl
rep movsb rep movsb
#else #else
leal 4+_liseg, %esi leal 4+_liseg, %esi
@ -215,7 +220,11 @@ crt_console_tx_string:
#if defined(CONSOLE_DEBUG_TX_STRING) && (ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG) #if defined(CONSOLE_DEBUG_TX_STRING) && (ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG)
.section ".rom.data" .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" str_copying_to_ram: .string "Copying coreboot to RAM.\r\n"
#endif
str_pre_main: .string "Jumping to coreboot.\r\n" str_pre_main: .string "Jumping to coreboot.\r\n"
.previous .previous

View File

@ -222,6 +222,11 @@ __main:
movl $_iseg, %edi movl $_iseg, %edi
movl $_eiseg, %ecx movl $_eiseg, %ecx
subl %edi, %ecx subl %edi, %ecx
movb %cl, %al
shrl $2, %ecx
andb $3, %al
rep movsl
movb %al, %cl
rep movsb rep movsb
#else #else
leal 4+_liseg, %esi leal 4+_liseg, %esi
@ -363,7 +368,11 @@ crt_console_tx_string:
#if defined(CONSOLE_DEBUG_TX_STRING) && (ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG) #if defined(CONSOLE_DEBUG_TX_STRING) && (ASM_CONSOLE_LOGLEVEL > BIOS_DEBUG)
.section ".rom.data" .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" str_copying_to_ram: .string "Copying coreboot to ram.\r\n"
#endif
str_pre_main: .string "Jumping to coreboot.\r\n" str_pre_main: .string "Jumping to coreboot.\r\n"
.previous .previous