Received: from [140.186.70.92] (port=38871 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ph7qa-0004lx-Iq for qemu-devel@nongnu.org; Sun, 23 Jan 2011 16:51:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ph7qU-0004pS-1b for qemu-devel@nongnu.org; Sun, 23 Jan 2011 16:51:39 -0500 Received: from hall.aurel32.net ([88.191.126.93]:47972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ph7qT-0004oI-SM for qemu-devel@nongnu.org; Sun, 23 Jan 2011 16:51:38 -0500 Date: Sun, 23 Jan 2011 22:51:28 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] multiboot: Fix upper memory size in multiboot info Message-ID: <20110123215128.GF3960@hall.aurel32.net> References: <1294146210-14638-1-git-send-email-mail@kevin-wolf.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1294146210-14638-1-git-send-email-mail@kevin-wolf.de> Sender: Aurelien Jarno List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On Tue, Jan 04, 2011 at 02:03:30PM +0100, Kevin Wolf wrote: > The upper memory size field should exclude the first MB of RAM. > > Signed-off-by: Kevin Wolf > --- > hw/multiboot.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/multiboot.c b/hw/multiboot.c > index 7cc3055..0d2bfb4 100644 > --- a/hw/multiboot.c > +++ b/hw/multiboot.c > @@ -306,7 +306,7 @@ int load_multiboot(void *fw_cfg, > | MULTIBOOT_FLAGS_MODULES > | MULTIBOOT_FLAGS_MMAP); > stl_p(bootinfo + MBI_MEM_LOWER, 640); > - stl_p(bootinfo + MBI_MEM_UPPER, ram_size / 1024); > + stl_p(bootinfo + MBI_MEM_UPPER, (ram_size / 1024) - 1024); > stl_p(bootinfo + MBI_BOOT_DEVICE, 0x8001ffff); /* XXX: use the -boot switch? */ > stl_p(bootinfo + MBI_MMAP_ADDR, ADDR_E820_MAP); > Thanks, applied. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net