From patchwork Thu Nov 29 17:11:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 202787 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7E1082C007A for ; Fri, 30 Nov 2012 04:12:36 +1100 (EST) Received: from localhost ([::1]:47988 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te7f8-0007x0-G6 for incoming@patchwork.ozlabs.org; Thu, 29 Nov 2012 12:12:34 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te7el-0007cO-5i for qemu-devel@nongnu.org; Thu, 29 Nov 2012 12:12:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Te7ee-00057f-DS for qemu-devel@nongnu.org; Thu, 29 Nov 2012 12:12:11 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:35703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Te7ee-00057B-5T for qemu-devel@nongnu.org; Thu, 29 Nov 2012 12:12:04 -0500 Received: by mail-pa0-f45.google.com with SMTP id bg2so7780934pad.4 for ; Thu, 29 Nov 2012 09:12:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=+inO9vXg3McESDjaFQPCRewcC+q1DYXRZKZ6JN4UVNs=; b=V+Ts++BBOxbYuOT4F9QE5mWrdTfzyOfRc576YalzuhReeZqH10P0sbYzEsFr7D/PrG pXSsk80l1X1U0JlbSfDQGYOZVCKAyuff8w0qc4pdbguewsH060TZv2/PJ/E5UD+Jz4d4 IkjoGPP13q9cPlPSf52V5IDrsKS+lt/gUIYkCBra/iG08uNtWC9XhhR1hWiRQnbk2mzY sOyNHtSbxePufi0g1OtsouSvRpAmhQUmAs9MpR+54JcUln6xszRCXW6WwBpmSCdn4YTd 46ppueK8pl2j+6jW69YRoKhUWBSnfZ70plUoCX68899uiA8VXfv6FfnYmUVOqIj0HrI2 MUDA== Received: by 10.68.192.66 with SMTP id he2mr69581258pbc.112.1354209123814; Thu, 29 Nov 2012 09:12:03 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id o1sm1359681paw.0.2012.11.29.09.12.00 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Nov 2012 09:12:02 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 29 Nov 2012 18:11:51 +0100 Message-Id: <1354209111-18110-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1354209111-18110-1-git-send-email-pbonzini@redhat.com> References: <1354209111-18110-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.220.45 Cc: Alexander Graf Subject: [Qemu-devel] [PATCH] multiboot: fix e801 memory map X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Signed-off-by: Paolo Bonzini --- 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#capqJWgJByEE-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