All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vesa Jääskeläinen" <chaac@nic.fi>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Odd behavior in x86/pc booting process with minor modifications
Date: Sun, 27 Jan 2008 16:52:02 +0200	[thread overview]
Message-ID: <479C9A92.70109@nic.fi> (raw)

Hi,

I was playing around with IDT and needed some code space in startup.S 
and in realmode.S. GRUB just hanged for some reason during the bootup 
when I just had query instruction for current IDT descriptor and some 
storage for it after GDT tables.

I then reverted that code and added as many NOPs as that code would take 
there and it was still hanging... then I removed some NOPs and hang went 
away. I don't have good debugging capabilities other than qemu's log, 
but it would seem like when grub is decompressing itself there is minor 
code flow difference, though this could only be because binary is a bit 
different... so I am not sure about that theory... anyway if there are 
good ideas on how to debug this, or even better solutions to possible 
problem :). Any ideas are welcome.

So how to reproduce this problem:

1. open kern/i386/pc/startup.S
2. find codestart

// actual location is not so important
3. find first sti instruction
4. go 1 line backwards

5. add about 15 NOP's

6. recompile and make image
7. try it out, it should hang without displaying grub shell or menu.

Thanks,
Vesa Jääskeläinen



             reply	other threads:[~2008-01-27 14:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-27 14:52 Vesa Jääskeläinen [this message]
2008-01-27 16:56 ` Odd behavior in x86/pc booting process with minor modifications Bean

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=479C9A92.70109@nic.fi \
    --to=chaac@nic.fi \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.