From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:51221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwtTz-0004Yc-KL for qemu-devel@nongnu.org; Thu, 21 Feb 2019 13:54:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwtTy-0005QX-F2 for qemu-devel@nongnu.org; Thu, 21 Feb 2019 13:54:07 -0500 Received: from mx2.rt-rk.com ([89.216.37.149]:34752 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwtTw-0005OT-DH for qemu-devel@nongnu.org; Thu, 21 Feb 2019 13:54:06 -0500 From: Aleksandar Markovic Date: Thu, 21 Feb 2019 19:53:39 +0100 Message-Id: <1550775220-26797-8-git-send-email-aleksandar.markovic@rt-rk.com> In-Reply-To: <1550775220-26797-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1550775220-26797-1-git-send-email-aleksandar.markovic@rt-rk.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL v2 7/8] target/mips: fulong2e: Fix bios flash size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, amarkovic@wavecomp.com From: BALATON Zoltan According to both the specifications on linux-mips.org referenced in a comment at the beginning of the file and the flash chip part number the bios size should be 512k not 1M. Signed-off-by: BALATON Zoltan Signed-off-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- hw/mips/mips_fulong2e.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 02549d5..10e6ed5 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" +#include "cpu.h" #include "hw/hw.h" #include "hw/i386/pc.h" #include "hw/dma/i8257.h" @@ -35,7 +36,6 @@ #include "audio/audio.h" #include "qemu/log.h" #include "hw/loader.h" -#include "hw/mips/bios.h" #include "hw/ide.h" #include "elf.h" #include "hw/isa/vt82c686.h" @@ -51,6 +51,8 @@ #define ENVP_NB_ENTRIES 16 #define ENVP_ENTRY_SIZE 256 =20 +/* fulong 2e has a 512k flash: Winbond W39L040AP70Z */ +#define BIOS_SIZE (512 * KiB) #define MAX_IDE_BUS 2 =20 /* @@ -307,12 +309,9 @@ static void mips_fulong2e_init(MachineState *machine= ) /* fulong 2e has 256M ram. */ ram_size =3D 256 * MiB; =20 - /* fulong 2e has a 1M flash.Winbond W39L040AP70Z */ - bios_size =3D 1 * MiB; - /* allocate RAM */ memory_region_allocate_system_memory(ram, NULL, "fulong2e.ram", ram_= size); - memory_region_init_ram(bios, NULL, "fulong2e.bios", bios_size, + memory_region_init_ram(bios, NULL, "fulong2e.bios", BIOS_SIZE, &error_fatal); memory_region_set_readonly(bios, true); =20 --=20 2.7.4