grub-devel
[Top][All Lists]
Advanced

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

Re: esp register value after jump to linux


From: Andrei Borzenkov
Subject: Re: esp register value after jump to linux
Date: Fri, 26 Dec 2014 21:35:06 +0300

В Thu, 25 Dec 2014 00:59:36 +0600
Alexander Kuleshov <address@hidden> пишет:

> 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.
> 

It is absolutely unclear at which point, where and how you get content
of ESP.



reply via email to

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