Libpayload needs to clear the bss region.
Libpayload shouldn't count on coreboot or other payloads to clear memory. This fixes problems with payloads being loaded after or on top of each other. Change-Id: I30303d47e465e8921f47acab667c7998ba79fca7 Signed-off-by: Marc Jones <marcj303@gmail.com> Reviewed-on: http://review.coreboot.org/66 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
3e706b63c0
commit
55bf2e49d6
|
@ -70,10 +70,17 @@ _init:
|
|||
movl %esp, %esi
|
||||
|
||||
/* Store EAX and EBX */
|
||||
|
||||
movl %eax,loader_eax
|
||||
movl %ebx,loader_ebx
|
||||
|
||||
/* Clear the bss */
|
||||
cld
|
||||
movl $.bss, %edi
|
||||
movl $_end, %ecx
|
||||
subl %edi, %ecx
|
||||
xor %ax, %ax
|
||||
rep stosb
|
||||
|
||||
/* Setup new stack. */
|
||||
movl $_stack, %ebx
|
||||
|
||||
|
|
Loading…
Reference in New Issue