Bootloader: Fix kernel memset to zero
This commit is contained in:
parent
f0d2a211ea
commit
a554bd0fd8
|
@ -156,13 +156,14 @@ elf_read_kernel_to_memory:
|
||||||
|
|
||||||
movl (elf_program_header + p_memsz), %ecx
|
movl (elf_program_header + p_memsz), %ecx
|
||||||
subl %ebx, %ecx
|
subl %ebx, %ecx
|
||||||
jz .elf_read_kernel_to_memory_no_memset
|
jz .elf_read_kernel_to_memory_memset_done
|
||||||
|
|
||||||
.elf_read_kernel_to_memory_memset:
|
.elf_read_kernel_to_memory_memset:
|
||||||
movb $0, (%edi)
|
movb $0, (%edi)
|
||||||
|
incl %edi
|
||||||
decl %ecx
|
decl %ecx
|
||||||
jnz .elf_read_kernel_to_memory_memset
|
jnz .elf_read_kernel_to_memory_memset
|
||||||
.elf_read_kernel_to_memory_no_memset:
|
.elf_read_kernel_to_memory_memset_done:
|
||||||
|
|
||||||
# read file specified in program header to memory
|
# read file specified in program header to memory
|
||||||
movl (elf_program_header + p_offset), %eax
|
movl (elf_program_header + p_offset), %eax
|
||||||
|
|
Loading…
Reference in New Issue