diff --git a/hermit/arch/x86/kernel/entry.asm b/hermit/arch/x86/kernel/entry.asm index 285e9a428..27b6ff9c5 100644 --- a/hermit/arch/x86/kernel/entry.asm +++ b/hermit/arch/x86/kernel/entry.asm @@ -95,6 +95,12 @@ start64: mov fs, eax mov gs, eax + ; determine full image size + mov rax, kernel_end + sub rax, kernel_start + mov QWORD [image_size], rax + xor rax, rax + mov eax, DWORD [cpu_online] cmp eax, 0 jne Lno_pml4_init