Bootloader: Fix kernel memset to zero

This commit is contained in:
Bananymous 2023-11-17 21:05:02 +02:00
parent ef53aab24a
commit ac96ea3370
1 changed files with 3 additions and 2 deletions

View File

@ -156,13 +156,14 @@ elf_read_kernel_to_memory:
movl (elf_program_header + p_memsz), %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:
movb $0, (%edi)
incl %edi
decl %ecx
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
movl (elf_program_header + p_offset), %eax