public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Nguyen Anh Quynh <aquynh@gmail.com>
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: Extboot Option Rom rewritten in C
Date: Mon, 14 Apr 2008 22:22:12 -0500	[thread overview]
Message-ID: <48041F64.5010704@us.ibm.com> (raw)
In-Reply-To: <9cde8bff0804141956u56f22809yff7ce29acd4b837e@mail.gmail.com>

Hi Nguyen,

Nguyen Anh Quynh wrote:
> Hi Anthony,
>
> I spot a bug and few dead code in the extboot option rom. Perhaps the
> reason they are there is because less people want to look at assembly
> code, and it looks indeed scary.
>
> So I decided to rewrite it in C, using .code16gcc directive. Some advantages:
> - C code is easier to understand, find bugs, maintain and hack (so we
> can add more features in the future)
> - The binary image is same: 1.5K. The actual code size is also about
> the same size: around 1.2K. (gcc can optimize really well)
>   

I think converting to code16gcc is a good direction to go in.  I 
actually rewrote it myself using code16gcc but I ran into problems with 
segment assumptions and Windows guests.  I tried out your version with a 
Linux guest with good success but it fails with a win2k guest.

Have you tested with a Windows guest?  If we can work through the 
Windows issues, this is definitely the right way to go.

Regards,

Anthony Liguori

> See the code in attachment. The new code consists of a very small
> assembly file boot.S, which merely interfaces with the C code.
> "signrom" is modified to work with the new binary image.
>
> - To compile code, just run "make"
> - To save the original /usr/share/qemu/extboot.bin (to
> /usr/share/qemu/extboot.bin.org), just run "make save"
> - Then "make install" to install the new extboot.bin into /usr/share/qemu/
>
> I succesfully compile and run this option rom with virtio from
> 2.6.25-rc8 on Ubuntu 7.10.
>
> Any comment?
>
> Many thanks,
> Quynh
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

  reply	other threads:[~2008-04-15  3:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-15  2:56 Extboot Option Rom rewritten in C Nguyen Anh Quynh
2008-04-15  3:22 ` Anthony Liguori [this message]
2008-04-15  3:30   ` Nguyen Anh Quynh
2008-04-15  3:34     ` Anthony Liguori
2008-04-15  3:51       ` Nguyen Anh Quynh
2008-04-15  3:54         ` Nguyen Anh Quynh
2008-04-15 14:21           ` Anthony Liguori
2008-04-15 11:41       ` Jun Koi

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=48041F64.5010704@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=aquynh@gmail.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /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