From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51126 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMzPz-0001Cd-W1 for qemu-devel@nongnu.org; Fri, 11 Jun 2010 04:16:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMzPx-0000kj-1H for qemu-devel@nongnu.org; Fri, 11 Jun 2010 04:16:47 -0400 Received: from dspnet.fr ([188.165.44.67]:32912) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMzPw-0000hi-QA for qemu-devel@nongnu.org; Fri, 11 Jun 2010 04:16:44 -0400 Date: Fri, 11 Jun 2010 10:16:36 +0200 From: Olivier Galibert Message-ID: <20100611081635.GA11872@dspnet.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] The bios loading in pc_memory_init doesn't seem to make sense List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Hi all, The bios loading part of pc_memory_init in hw/pc.c does not seem to make sense. Specifically, the operations are: - find the bios file and its size, put the size in bios_size - bios_offset = qemu_ram_alloc(bios_size) - rom_add_file_fixed(bios_name, (uint32_t)(-bios_size)) -> at this point raff() loads the file in an independant allocation and maps it at the end of the 4G space - map up to 128K of bios_offset at 0xd0000 -> notice that the bios file was never loaded in the ram allocated at bios_offset - map bios_offset at end-of-4G -> same remark as before So, since the emulation seems to work, what am I missing? Best, OG.