mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 18:44:58 -06:00
hw/mips: Inline 'bios.h' definitions
There is no universal BIOS, each machine needs a specific one. Move the machine-specific definitions to each machine code and remove this bogus header. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231122184334.18201-1-philmd@linaro.org>
This commit is contained in:
parent
989f31658e
commit
1eb64c39d0
4 changed files with 26 additions and 17 deletions
|
@ -36,7 +36,6 @@
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "net/net.h"
|
#include "net/net.h"
|
||||||
#include "hw/scsi/esp.h"
|
#include "hw/scsi/esp.h"
|
||||||
#include "hw/mips/bios.h"
|
|
||||||
#include "hw/loader.h"
|
#include "hw/loader.h"
|
||||||
#include "hw/rtc/mc146818rtc.h"
|
#include "hw/rtc/mc146818rtc.h"
|
||||||
#include "hw/timer/i8254.h"
|
#include "hw/timer/i8254.h"
|
||||||
|
@ -53,12 +52,19 @@
|
||||||
#ifdef CONFIG_TCG
|
#ifdef CONFIG_TCG
|
||||||
#include "hw/core/tcg-cpu-ops.h"
|
#include "hw/core/tcg-cpu-ops.h"
|
||||||
#endif /* CONFIG_TCG */
|
#endif /* CONFIG_TCG */
|
||||||
|
#include "cpu.h"
|
||||||
|
|
||||||
enum jazz_model_e {
|
enum jazz_model_e {
|
||||||
JAZZ_MAGNUM,
|
JAZZ_MAGNUM,
|
||||||
JAZZ_PICA61,
|
JAZZ_PICA61,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if TARGET_BIG_ENDIAN
|
||||||
|
#define BIOS_FILENAME "mips_bios.bin"
|
||||||
|
#else
|
||||||
|
#define BIOS_FILENAME "mipsel_bios.bin"
|
||||||
|
#endif
|
||||||
|
|
||||||
static void main_cpu_reset(void *opaque)
|
static void main_cpu_reset(void *opaque)
|
||||||
{
|
{
|
||||||
MIPSCPU *cpu = opaque;
|
MIPSCPU *cpu = opaque;
|
||||||
|
@ -147,6 +153,8 @@ static void mips_jazz_init_net(NICInfo *nd, IOMMUMemoryRegion *rc4030_dma_mr,
|
||||||
prom[7] = 0xff - checksum;
|
prom[7] = 0xff - checksum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define BIOS_SIZE (4 * MiB)
|
||||||
|
|
||||||
#define MAGNUM_BIOS_SIZE_MAX 0x7e000
|
#define MAGNUM_BIOS_SIZE_MAX 0x7e000
|
||||||
#define MAGNUM_BIOS_SIZE \
|
#define MAGNUM_BIOS_SIZE \
|
||||||
(BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX)
|
(BIOS_SIZE < MAGNUM_BIOS_SIZE_MAX ? BIOS_SIZE : MAGNUM_BIOS_SIZE_MAX)
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include "hw/pci/pci.h"
|
#include "hw/pci/pci.h"
|
||||||
#include "hw/pci/pci_bus.h"
|
#include "hw/pci/pci_bus.h"
|
||||||
#include "qemu/log.h"
|
#include "qemu/log.h"
|
||||||
#include "hw/mips/bios.h"
|
|
||||||
#include "hw/ide/pci.h"
|
#include "hw/ide/pci.h"
|
||||||
#include "hw/irq.h"
|
#include "hw/irq.h"
|
||||||
#include "hw/loader.h"
|
#include "hw/loader.h"
|
||||||
|
@ -59,6 +58,7 @@
|
||||||
#include "hw/qdev-clock.h"
|
#include "hw/qdev-clock.h"
|
||||||
#include "target/mips/internal.h"
|
#include "target/mips/internal.h"
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
#include "cpu.h"
|
||||||
|
|
||||||
#define ENVP_PADDR 0x2000
|
#define ENVP_PADDR 0x2000
|
||||||
#define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
|
#define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
|
||||||
|
@ -71,6 +71,7 @@
|
||||||
#define RESET_ADDRESS 0x1fc00000ULL
|
#define RESET_ADDRESS 0x1fc00000ULL
|
||||||
|
|
||||||
#define FLASH_SIZE 0x400000
|
#define FLASH_SIZE 0x400000
|
||||||
|
#define BIOS_SIZE (4 * MiB)
|
||||||
|
|
||||||
#define PIIX4_PCI_DEVFN PCI_DEVFN(10, 0)
|
#define PIIX4_PCI_DEVFN PCI_DEVFN(10, 0)
|
||||||
|
|
||||||
|
@ -91,6 +92,12 @@ typedef struct {
|
||||||
bool display_inited;
|
bool display_inited;
|
||||||
} MaltaFPGAState;
|
} MaltaFPGAState;
|
||||||
|
|
||||||
|
#if TARGET_BIG_ENDIAN
|
||||||
|
#define BIOS_FILENAME "mips_bios.bin"
|
||||||
|
#else
|
||||||
|
#define BIOS_FILENAME "mipsel_bios.bin"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TYPE_MIPS_MALTA "mips-malta"
|
#define TYPE_MIPS_MALTA "mips-malta"
|
||||||
OBJECT_DECLARE_SIMPLE_TYPE(MaltaState, MIPS_MALTA)
|
OBJECT_DECLARE_SIMPLE_TYPE(MaltaState, MIPS_MALTA)
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#include "net/net.h"
|
#include "net/net.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/mips/bios.h"
|
|
||||||
#include "hw/loader.h"
|
#include "hw/loader.h"
|
||||||
#include "elf.h"
|
#include "elf.h"
|
||||||
#include "hw/sysbus.h"
|
#include "hw/sysbus.h"
|
||||||
|
@ -43,6 +42,15 @@
|
||||||
#include "qemu/error-report.h"
|
#include "qemu/error-report.h"
|
||||||
#include "sysemu/qtest.h"
|
#include "sysemu/qtest.h"
|
||||||
#include "sysemu/reset.h"
|
#include "sysemu/reset.h"
|
||||||
|
#include "cpu.h"
|
||||||
|
|
||||||
|
#define BIOS_SIZE (4 * MiB)
|
||||||
|
|
||||||
|
#if TARGET_BIG_ENDIAN
|
||||||
|
#define BIOS_FILENAME "mips_bios.bin"
|
||||||
|
#else
|
||||||
|
#define BIOS_FILENAME "mipsel_bios.bin"
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct _loaderparams {
|
static struct _loaderparams {
|
||||||
int ram_size;
|
int ram_size;
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#ifndef HW_MIPS_BIOS_H
|
|
||||||
#define HW_MIPS_BIOS_H
|
|
||||||
|
|
||||||
#include "qemu/units.h"
|
|
||||||
#include "cpu.h"
|
|
||||||
|
|
||||||
#define BIOS_SIZE (4 * MiB)
|
|
||||||
#if TARGET_BIG_ENDIAN
|
|
||||||
#define BIOS_FILENAME "mips_bios.bin"
|
|
||||||
#else
|
|
||||||
#define BIOS_FILENAME "mipsel_bios.bin"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
Add table
Add a link
Reference in a new issue