aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/mips-bios.h8
-rw-r--r--hw/mips_jazz.c7
-rw-r--r--hw/mips_malta.c7
-rw-r--r--hw/mips_mipssim.c7
-rw-r--r--hw/mips_r4k.c7
-rw-r--r--hw/ppc405_boards.c1
-rw-r--r--hw/ppc_mac.h1
-rw-r--r--hw/ppc_prep.c1
-rw-r--r--sysemu.h8
9 files changed, 14 insertions, 33 deletions
diff --git a/hw/mips-bios.h b/hw/mips-bios.h
new file mode 100644
index 0000000000..b4b88ac43d
--- /dev/null
+++ b/hw/mips-bios.h
@@ -0,0 +1,8 @@
+#include "cpu.h"
+
+#define BIOS_SIZE (4 * 1024 * 1024)
+#ifdef TARGET_WORDS_BIGENDIAN
+#define BIOS_FILENAME "mips_bios.bin"
+#else
+#define BIOS_FILENAME "mipsel_bios.bin"
+#endif
diff --git a/hw/mips_jazz.c b/hw/mips_jazz.c
index 292137fec9..49c0b467fc 100644
--- a/hw/mips_jazz.c
+++ b/hw/mips_jazz.c
@@ -32,12 +32,7 @@
#include "boards.h"
#include "net.h"
#include "scsi.h"
-
-#ifdef TARGET_WORDS_BIGENDIAN
-#define BIOS_FILENAME "mips_bios.bin"
-#else
-#define BIOS_FILENAME "mipsel_bios.bin"
-#endif
+#include "mips-bios.h"
enum jazz_model_e
{
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index 747143d3d2..564eaa6114 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -37,15 +37,10 @@
#include "audio/audio.h"
#include "boards.h"
#include "qemu-log.h"
+#include "mips-bios.h"
//#define DEBUG_BOARD_INIT
-#ifdef TARGET_WORDS_BIGENDIAN
-#define BIOS_FILENAME "mips_bios.bin"
-#else
-#define BIOS_FILENAME "mipsel_bios.bin"
-#endif
-
#ifdef TARGET_MIPS64
#define PHYS_TO_VIRT(x) ((x) | ~0x7fffffffULL)
#else
diff --git a/hw/mips_mipssim.c b/hw/mips_mipssim.c
index 54656ad194..b3f190e21a 100644
--- a/hw/mips_mipssim.c
+++ b/hw/mips_mipssim.c
@@ -31,12 +31,7 @@
#include "net.h"
#include "sysemu.h"
#include "boards.h"
-
-#ifdef TARGET_WORDS_BIGENDIAN
-#define BIOS_FILENAME "mips_bios.bin"
-#else
-#define BIOS_FILENAME "mipsel_bios.bin"
-#endif
+#include "mips-bios.h"
#ifdef TARGET_MIPS64
#define PHYS_TO_VIRT(x) ((x) | ~0x7fffffffULL)
diff --git a/hw/mips_r4k.c b/hw/mips_r4k.c
index aea82cc9ff..9ad8de6746 100644
--- a/hw/mips_r4k.c
+++ b/hw/mips_r4k.c
@@ -16,12 +16,7 @@
#include "boards.h"
#include "flash.h"
#include "qemu-log.h"
-
-#ifdef TARGET_WORDS_BIGENDIAN
-#define BIOS_FILENAME "mips_bios.bin"
-#else
-#define BIOS_FILENAME "mipsel_bios.bin"
-#endif
+#include "mips-bios.h"
#define PHYS_TO_VIRT(x) ((x) | ~(target_ulong)0x7fffffff)
diff --git a/hw/ppc405_boards.c b/hw/ppc405_boards.c
index bc5f1cf853..0b4eb9333e 100644
--- a/hw/ppc405_boards.c
+++ b/hw/ppc405_boards.c
@@ -32,7 +32,6 @@
#include "qemu-log.h"
#define BIOS_FILENAME "ppc405_rom.bin"
-#undef BIOS_SIZE
#define BIOS_SIZE (2048 * 1024)
#define KERNEL_LOAD_ADDR 0x00000000
diff --git a/hw/ppc_mac.h b/hw/ppc_mac.h
index 74d19a1991..dc39338e80 100644
--- a/hw/ppc_mac.h
+++ b/hw/ppc_mac.h
@@ -28,6 +28,7 @@
/* SMP is not enabled, for now */
#define MAX_CPUS 1
+#define BIOS_SIZE (1024 * 1024)
#define BIOS_FILENAME "ppc_rom.bin"
#define VGABIOS_FILENAME "video.x"
#define NVRAM_SIZE 0x2000
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index b98c6c2002..a805c293e7 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -41,6 +41,7 @@
#define MAX_IDE_BUS 2
+#define BIOS_SIZE (1024 * 1024)
#define BIOS_FILENAME "ppc_rom.bin"
#define KERNEL_LOAD_ADDR 0x01000000
#define INITRD_LOAD_ADDR 0x01800000
diff --git a/sysemu.h b/sysemu.h
index 2ff61946fd..1e4be530af 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -123,14 +123,6 @@ extern const char *prom_envs[MAX_PROM_ENVS];
extern unsigned int nb_prom_envs;
#endif
-#if defined (TARGET_PPC)
-#define BIOS_SIZE (1024 * 1024)
-#elif defined (TARGET_SPARC64)
-#define BIOS_SIZE ((512 + 32) * 1024)
-#elif defined(TARGET_MIPS)
-#define BIOS_SIZE (4 * 1024 * 1024)
-#endif
-
typedef enum {
IF_IDE, IF_SCSI, IF_FLOPPY, IF_PFLASH, IF_MTD, IF_SD, IF_VIRTIO, IF_XEN,
IF_COUNT