entry.S 743 B

1234567891011121314151617
  1. /* Canonical kernel entry: the first instruction of the kernel for every boot
  2. * path (vesa_stage.S jumps here; the kexec paths use this symbol as the
  3. * transfer entry, see the dev/net-dev targets).
  4. *
  5. * It exists so a kernel reload cannot inherit a stale stack: the jumping
  6. * kernel's trampoline (kexec_tramp.S) sets ESP from a constant that was baked
  7. * into the *old* build's memory map. If the map moved in between (the kernel
  8. * region grew), that stack can sit inside the new image and the BSS clear
  9. * would wipe the stack it is running on. Re-pointing ESP here, before any
  10. * stack use, makes every reload independent of the old layout. */
  11. .code32
  12. .text
  13. .globl kernel_entry
  14. kernel_entry:
  15. movl $0x49800, %esp
  16. jmp kernel_main