grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

esp register value after jump to linux


From: Alexander Kuleshov
Subject: esp register value after jump to linux
Date: Thu, 25 Dec 2014 00:59:36 +0600

Hello all,

I see that grub setups registers before jump to linux kernel at
grub/grub-core/loader/i386/pc/linux.c:

grub_linux16_boot (void)

{

  ...

  state.gs = state.fs = state.es = state.Tds = state.ss = segment;

  state.sp = GRUB_LINUX_SETUP_STACK;

  state.cs = segment + 0x20;

  state.ip = 0;

  ...

}

I see in gdb that: ss, ds, and other segment registers are 0x1000, and
cs is 0x1020. It is good. But why esp is 0xf7f4? I see that
GRUB_LINUX_SETUP_STACK is 0x9000.

Thank you.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]