qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Alexander Graf <agraf@suse.de>
Subject: [Qemu-devel] [PATCH] multiboot: fix e801 memory map
Date: Thu, 29 Nov 2012 18:11:51 +0100	[thread overview]
Message-ID: <1354209111-18110-2-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1354209111-18110-1-git-send-email-pbonzini@redhat.com>

The e801 memory sizes in the multiboot structures hard-code the available
low memory to 640.  However, the value should not include the size of the
EBDA.  Fill the value in the option ROM, getting the size of low memory
from the BIOS.

Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 pc-bios/multiboot.bin         | Bin 1024 -> 1024 bytes
 pc-bios/optionrom/multiboot.S |   7 +++++++
 2 files changed, 7 insertions(+)

diff --git a/pc-bios/multiboot.bin b/pc-bios/multiboot.bin
index f74a6e142fddc054d7f40ab346a108532afac40f..7b3c1745a430ea5e0e15b9aa817d1cbbaa40db14 100644
GIT binary patch
delta 81
zcmZqRXyBNj#q7o8KT+38L4+xd@o;KdryK*rZVrajPB|8aZaEhwAcKt|ty|7*VtW(k
kS)sHUDQSyY7$$Qv{%2ueV91@!$z;eVv)P(y2P2~%0BkrF9smFU

delta 72
zcmZqRXyBNj#capqJW<z5frBZH@o;KdryK*rZVrajPB|8aZaE7kAcKt|ty|7&VtdnM
bA;$lVDU(H+3>gJByEE-zoLs=f!*~_|qXQE}

diff --git a/pc-bios/optionrom/multiboot.S b/pc-bios/optionrom/multiboot.S
index f08222a..003bcfb 100644
--- a/pc-bios/optionrom/multiboot.S
+++ b/pc-bios/optionrom/multiboot.S
@@ -75,6 +75,13 @@ run_multiboot:
 	shr		$4, %eax
 	mov		%ax, %fs
 
+	/* Account for the EBDA in the multiboot structure's e801
+	 * map.
+	 */
+	int		$0x12
+	cwtl
+	movl		%eax, %fs:4
+
 	/* ES = mmap_addr */
 	mov 		%fs:48, %eax
 	shr		$4, %eax
-- 
1.8.0

  reply	other threads:[~2012-11-29 17:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-29 17:11 [Qemu-devel] [PATCH 1.3?] multiboot: fix e801 memory map Paolo Bonzini
2012-11-29 17:11 ` Paolo Bonzini [this message]
2012-11-29 18:49 ` Alexander Graf
2012-11-29 18:51 ` Alexander Graf
2012-11-29 19:21   ` Paolo Bonzini
2012-11-29 19:24     ` Alexander Graf
2012-11-29 19:40       ` Paolo Bonzini
2012-11-29 21:12         ` Anthony Liguori
2012-11-30 16:15 ` Anthony Liguori

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=1354209111-18110-2-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=agraf@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).