From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Alexander Kuleshov <kuleshovmail@gmail.com>
Cc: grub-devel@gnu.org
Subject: Re: esp register value after jump to linux
Date: Fri, 26 Dec 2014 21:35:06 +0300 [thread overview]
Message-ID: <20141226213506.79b1cd4b@opensuse.site> (raw)
In-Reply-To: <CANCZXo6SFnfEguuojV2YvzRVnGwDdBj4FpB5hMwkea-+GA+KNw@mail.gmail.com>
В Thu, 25 Dec 2014 00:59:36 +0600
Alexander Kuleshov <kuleshovmail@gmail.com> пишет:
> 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.
prev parent reply other threads:[~2014-12-26 18:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-24 18:59 esp register value after jump to linux Alexander Kuleshov
2014-12-26 18:35 ` Andrei Borzenkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141226213506.79b1cd4b@opensuse.site \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
--cc=kuleshovmail@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).