From: Alexander Kuleshov <kuleshovmail@gmail.com>
To: grub-devel@gnu.org
Subject: esp register value after jump to linux
Date: Thu, 25 Dec 2014 00:59:36 +0600 [thread overview]
Message-ID: <CANCZXo6SFnfEguuojV2YvzRVnGwDdBj4FpB5hMwkea-+GA+KNw@mail.gmail.com> (raw)
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.
next reply other threads:[~2014-12-24 18:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-24 18:59 Alexander Kuleshov [this message]
2014-12-26 18:35 ` esp register value after jump to linux Andrei Borzenkov
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=CANCZXo6SFnfEguuojV2YvzRVnGwDdBj4FpB5hMwkea-+GA+KNw@mail.gmail.com \
--to=kuleshovmail@gmail.com \
--cc=grub-devel@gnu.org \
/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).