All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com
Subject: Re: [Qemu-devel] [PATCH] get roms more room.
Date: Sat, 28 Mar 2009 00:12:31 +0100	[thread overview]
Message-ID: <49CD5D5F.9050105@gmx.net> (raw)
In-Reply-To: <5d6222a80903271345x491c827fg81778d2497843fe7@mail.gmail.com>

On 27.03.2009 21:45, Glauber Costa wrote:
> On Fri, Mar 27, 2009 at 5:29 PM, Carl-Daniel Hailfinger
> <c-d.hailfinger.devel.2006@gmx.net> wrote:
>   
>> On 27.03.2009 18:37, Glauber Costa wrote:
>>     
>>> This patch increases by 50 % the size available for option roms.
>>> The main motivator is that some roms grew bigger than the 64k we
>>> currently allocate for them (Hey, it's 2009!)
>>>
>>> One example is the gpxe project, that produces some roms with 69k,
>>> 70k, etc. The space proposed by this patch actually makes it as
>>> big as 84k. Probably still a fit for some time.
>>>
>>> But there is no free lunch. This space must come from somewhere,
>>> and we take it from vga rom space. Currently, our vga roms are
>>> around 35k in size. With this patch, they will be limited to
>>> 44k, instead of 64k, which seems reasonable to me.
>>>
>>>       
>> As a firmware developer, I have to speak up here. Although I agree that
>> option ROMs may be bigger than 64k, replacing one hardcoded magic limit
>> with another hardcoded magic limit seems to be a bit questionable.
>>
>> If you really want to hardcode this instead of calculating it
>> dynamically, please use at least some symbolic constants and tell the
>> user to change the symbolic constants and recompile Qemu if he hits the
>> size limit.
>>
>> This patch reduces the room for the VGA option ROM without checking for
>> its size. If we perform option ROM size checks, we may as well not
>> exclude the VGA option ROM from that check.
>>     
>
> We load the VGA rom before loading any option roms. Would you be
> okay with an approach that loads the vga rom, round up its size to the
> next boundary, and assign the remaining space to option roms?
>   

Excellent idea.
Could you please change the error message to tell the user that
VGA+other option ROMs may not exceed a total size?
A check for VGA ROM size to be less than the total allowed size may be
useful to prevent underflows in calculations of the remaining space for
other option ROMs.


Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/

  reply	other threads:[~2009-03-27 23:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27 17:37 [Qemu-devel] [PATCH] get roms more room Glauber Costa
2009-03-27 20:29 ` Carl-Daniel Hailfinger
2009-03-27 20:45   ` Glauber Costa
2009-03-27 23:12     ` Carl-Daniel Hailfinger [this message]
2009-03-27 23:43       ` Glauber Costa
  -- strict thread matches above, loose matches on Subject: below --
2009-03-27 23:48 Glauber Costa
2009-03-28  1:58 ` Carl-Daniel Hailfinger
2009-03-28  4:19   ` Glauber Costa
2009-03-28  4:25 Glauber Costa
2009-03-28  8:51 ` Carl-Daniel Hailfinger
2009-03-28 17:30 ` Anthony Liguori
2009-03-28 22:25   ` Glauber Costa

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=49CD5D5F.9050105@gmx.net \
    --to=c-d.hailfinger.devel.2006@gmx.net \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.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.