Received: from eggs.gnu.org ([2001:4830:134:3::10]:54966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zsy1j-0004gn-Cw for qemu-devel@nongnu.org; Sun, 01 Nov 2015 14:10:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zsy1g-0008Nx-6y for qemu-devel@nongnu.org; Sun, 01 Nov 2015 14:10:51 -0500 Received: from indium.canonical.com ([91.189.90.7]:36407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zsy1g-0008Nl-0d for qemu-devel@nongnu.org; Sun, 01 Nov 2015 14:10:48 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1Zsy1f-0003EF-3O for ; Sun, 01 Nov 2015 19:10:47 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id D5EE72E80CE for ; Sun, 1 Nov 2015 19:10:46 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Sun, 01 Nov 2015 19:02:14 -0000 From: Tristan Parisot Sender: bounces@canonical.com Message-Id: <20151101190214.21055.11653.malonedeb@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1512134] [NEW] Multiboot v1 memory map offset wrong Reply-To: Bug 1512134 <1512134@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Public bug reported: I'm developping a multiboot kernel for multiboot v1 My multiboot header contains the V1 magic (0x1BADB002) and the flags 0x0001= 0243 (with enabled memory detection, and boot loader name) When booted in multiboot, Qemu gives me two pointers: unsigned long mmap_length; unsigned long mmap_addr; mmap_addr shall points to this structure: struct multiboot_mmap_entry { multiboot_uint32_t size; multiboot_uint64_t addr; multiboot_uint64_t len; multiboot_uint32_t type; } = According to the multiboot v1 specification, mmap_addr should not point to= the start of this structure, but instead, should point to the "addr "field. Work-arround: Detect if qemu is used using bootloader_name field. If it is, do NOT apply a -4 offset to mmap_addr http://git.savannah.gnu.org/cgit/grub.git/tree/doc/multiboot.texi?h=3Dmulti= boot ** Affects: qemu Importance: Undecided Status: New ** Tags: multiboot -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1512134 Title: Multiboot v1 memory map offset wrong Status in QEMU: New Bug description: I'm developping a multiboot kernel for multiboot v1 My multiboot header contains the V1 magic (0x1BADB002) and the flags 0x00= 010243 (with enabled memory detection, and boot loader name) = When booted in multiboot, Qemu gives me two pointers: unsigned long mmap_length; unsigned long mmap_addr; mmap_addr shall points to this structure: struct multiboot_mmap_entry { multiboot_uint32_t size; multiboot_uint64_t addr; multiboot_uint64_t len; multiboot_uint32_t type; } = = According to the multiboot v1 specification, mmap_addr should not point = to the start of this structure, but instead, should point to the "addr "fie= ld. Work-arround: Detect if qemu is used using bootloader_name field. If it is, do NOT apply a -4 offset to mmap_addr http://git.savannah.gnu.org/cgit/grub.git/tree/doc/multiboot.texi?h=3Dmul= tiboot To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1512134/+subscriptions