All of lore.kernel.org
 help / color / mirror / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] multiboot: Clean up mmap loop and report correct mmap_length
Date: Mon, 22 Apr 2013 13:57:04 -0400	[thread overview]
Message-ID: <20130422175704.GW8998@mit.edu> (raw)
In-Reply-To: <1363301710-19729-1-git-send-email-amdragon@mit.edu>

Ping.  I never heard back about this bug fix to the multiboot loader.

Quoth myself on Mar 14 at  6:55 pm:
> Previously, the multiboot option ROM set the mmap_length field of the
> multiboot info structure to the length of the mmap array *excluding*
> the final element of the array, rather than the total length of the
> array.  The multiboot specification indicates that this is incorrect,
> and it's incompatible with GRUB's [1] and SYSLINUX's [2] multiboot
> loaders, which both set mmap_length to the length of the entire mmap
> array.
> 
> This bug is easy to miss: if the VM is configured with 3584 MB of RAM
> or less, the last E820 entry is simply a reserved region that does not
> overlap with any other region, so there's no harm in omitting it.
> However, if it's started with more than 3584 MB of RAM, the memory
> above the high memory hole appears as the last entry in the E820 map
> and will be omitted from the multiboot mmap array.
> 
> This patch rewrites the loop that constructs the mmap array from the
> E820 map to simplify it and fix the final mmap_length value.
> 
> [1] grub-core/loader/i386/multiboot_mbi.c:grub_multiboot_make_mbi
> 
> [2] com32/mboot/mem.c:mboot_make_memmap
> 
> Signed-off-by: Austin Clements <amdragon@mit.edu>
> ---
>  pc-bios/multiboot.bin         |  Bin 1024 -> 1024 bytes
>  pc-bios/optionrom/multiboot.S |   25 +++++++++----------------
>  2 files changed, 9 insertions(+), 16 deletions(-)

      reply	other threads:[~2013-04-22 17:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-14 22:55 [Qemu-devel] [PATCH] multiboot: Clean up mmap loop and report correct mmap_length Austin Clements
2013-04-22 17:57 ` Austin Clements [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=20130422175704.GW8998@mit.edu \
    --to=amdragon@mit.edu \
    --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.