Skip to content

Commit

Permalink
target/mips: fulong2e: Fix bios flash size
Browse files Browse the repository at this point in the history
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 <balaton@eik.bme.hu>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
  • Loading branch information
zbalaton authored and AMarkovic committed Feb 21, 2019
1 parent f7cf221 commit be9f6d1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions hw/mips/mips_fulong2e.c
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -51,6 +51,8 @@
#define ENVP_NB_ENTRIES 16
#define ENVP_ENTRY_SIZE 256

/* fulong 2e has a 512k flash: Winbond W39L040AP70Z */
#define BIOS_SIZE (512 * KiB)
#define MAX_IDE_BUS 2

/*
Expand Down Expand Up @@ -307,12 +309,9 @@ static void mips_fulong2e_init(MachineState *machine)
/* fulong 2e has 256M ram. */
ram_size = 256 * MiB;

/* fulong 2e has a 1M flash.Winbond W39L040AP70Z */
bios_size = 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);

Expand Down

0 comments on commit be9f6d1

Please sign in to comment.