Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H2wiw-0006gM-73 for qemu-devel@nongnu.org; Fri, 05 Jan 2007 16:35:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H2wiq-0006d8-Qe for qemu-devel@nongnu.org; Fri, 05 Jan 2007 16:35:36 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2wiq-0006cz-HB for qemu-devel@nongnu.org; Fri, 05 Jan 2007 16:35:32 -0500 Received: from [194.84.254.251] (helo=mx.globalone.ru) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H2wip-0003Qa-SC for qemu-devel@nongnu.org; Fri, 05 Jan 2007 16:35:32 -0500 Received: from mx.globalone.ru (localhost [127.0.0.1]) by mx.globalone.ru (8.13.1/8.13.1) with ESMTP id l05LZMtO014091 for ; Sat, 6 Jan 2007 00:35:25 +0300 Received: from smtp.globalone.ru (smtp.globalone.ru [172.16.38.5]) by mx.globalone.ru (8.13.1/8.13.1) with ESMTP id l05LZAfr014050 for ; Sat, 6 Jan 2007 00:35:10 +0300 Message-ID: <006301c73111$a920e9a0$e90d11ac@spb.in.rosprint.ru> From: "Alexander Voropay" Date: Sat, 6 Jan 2007 00:36:34 +0300 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_005B_01C7312A.B7FC4820" Subject: [Qemu-devel] [PATCH] qemu-mips: mips_bios.bin vs mipsel_bios.bin Reply-To: Alexander Voropay , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. ------=_NextPart_000_005B_01C7312A.B7FC4820 Content-Type: multipart/alternative; boundary="----=_NextPart_001_005C_01C7312A.B7FEB920" ------=_NextPart_001_005C_01C7312A.B7FEB920 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Hi! This patch corrects mips*_bios.bin names. It allows to use arbitrary BIOS file size also. -- -=3DAV=3D- ------=_NextPart_001_005C_01C7312A.B7FEB920 Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable
Hi!
 
 This patch corrects = mips*_bios.bin=20 names.
 
 It allows to use arbitrary = BIOS=20 file size also.
 
--
-=3DAV=3D-
------=_NextPart_001_005C_01C7312A.B7FEB920-- ------=_NextPart_000_005B_01C7312A.B7FC4820 Content-Type: application/octet-stream; name="mips_bios.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="mips_bios.patch" --- ../qemu-CVS/qemu/hw/mips_r4k.c 2007-01-04 17:18:23.000000000 +0300=0A= +++ hw/mips_r4k.c 2007-01-04 18:02:06.000000000 +0300=0A= @@ -9,7 +9,11 @@=0A= */=0A= #include "vl.h"=0A= =0A= +#ifdef TARGET_BIG_ENDIAN=0A= #define BIOS_FILENAME "mips_bios.bin"=0A= +#else=0A= +#define BIOS_FILENAME "mipsel_bios.bin"=0A= +#endif=0A= //#define BIOS_FILENAME "system.bin"=0A= #ifdef MIPS_HAS_MIPS64=0A= #define INITRD_LOAD_ADDR (int64_t)(int32_t)0x80800000=0A= @@ -136,7 +140,7 @@=0A= {=0A= char buf[1024];=0A= unsigned long bios_offset;=0A= - int ret;=0A= + int bios_size;=0A= CPUState *env;=0A= static RTCState *rtc_state;=0A= int i;=0A= @@ -160,8 +164,8 @@=0A= run. */=0A= bios_offset =3D ram_size + vga_ram_size;=0A= snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME);=0A= - ret =3D load_image(buf, phys_ram_base + bios_offset);=0A= - if (ret =3D=3D BIOS_SIZE) {=0A= + bios_size =3D load_image(buf, phys_ram_base + bios_offset);=0A= + if (bios_size > 0 & bios_size <=3D BIOS_SIZE) {=0A= cpu_register_physical_memory((uint32_t)(0x1fc00000),=0A= BIOS_SIZE, bios_offset | IO_MEM_ROM);=0A= } else {=0A= ------=_NextPart_000_005B_01C7312A.B7FC4820--