8 MB_MAGIC equ 0x1badb002
20 dd -(MB_MAGIC + MB_FLAGS) ; checksum
24 ; init temporary kernel stack at the top of conventional memory
27 ; clear .bss (if it's not empty)
28 ; due to the ALIGN(4) statements in the linker script, it's guaranteed
29 ; that _bss_start and _bss_end will be 32bit-aligned, so we can use
30 ; rep stosd to clear it
36 shr ecx, 2 ; _bss_size is in bytes, we need count in "dwords"
41 ; kmain shouldn't ever return, but we'll enter a hlt loop just in case