use movsl for copying resume memory back
It's not significantly faster, but easier to read and smaller. Change-Id: Ibab0b478873912d67bf1f07743f628586353368a Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: http://review.coreboot.org/755 Reviewed-by: Mathias Krause <minipli@googlemail.com> Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
parent
77adc5e03c
commit
8acbc2a886
@ -38,23 +38,12 @@ __wakeup:
|
|||||||
movw %ax, (__wakeup_segment)
|
movw %ax, (__wakeup_segment)
|
||||||
|
|
||||||
/* Then overwrite coreboot with our backed up memory */
|
/* Then overwrite coreboot with our backed up memory */
|
||||||
movl 8(%esp), %esi
|
cld
|
||||||
movl 12(%esp), %edi
|
movl 8(%esp), %esi
|
||||||
movl 16(%esp), %ecx
|
movl 12(%esp), %edi
|
||||||
shrl $4, %ecx
|
movl 16(%esp), %ecx
|
||||||
1:
|
shrl $2, %ecx
|
||||||
movl 0(%esi),%eax
|
rep movsl
|
||||||
movl 4(%esi),%edx
|
|
||||||
movl 8(%esi),%ebx
|
|
||||||
movl 12(%esi),%ebp
|
|
||||||
addl $16,%esi
|
|
||||||
subl $1,%ecx
|
|
||||||
movl %eax,0(%edi)
|
|
||||||
movl %edx,4(%edi)
|
|
||||||
movl %ebx,8(%edi)
|
|
||||||
movl %ebp,12(%edi)
|
|
||||||
leal 16(%edi),%edi
|
|
||||||
jne 1b
|
|
||||||
|
|
||||||
/* Activate the right segment descriptor real mode. */
|
/* Activate the right segment descriptor real mode. */
|
||||||
ljmp $0x28, $RELOCATED(1f)
|
ljmp $0x28, $RELOCATED(1f)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user