diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-02-13 18:16:43 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-02-13 18:16:43 +0000 |
commit | f4ceebdec531243dd72e38f85f085287e6e63258 (patch) | |
tree | cc87d495d8c1eb1070fcff634add04070ebf86fb /hw | |
parent | abb8b29aff352f226bf91cb59e5ac7e3e6082ce8 (diff) | |
parent | 382d71af7d61620ffb023962f83cc4786303c60d (diff) | |
download | qemu-f4ceebdec531243dd72e38f85f085287e6e63258.zip qemu-f4ceebdec531243dd72e38f85f085287e6e63258.tar.gz qemu-f4ceebdec531243dd72e38f85f085287e6e63258.tar.bz2 |
Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-6.0-pull-request' into staging
Pull request m68k-20210212
Move bootinfo headers to include/standard-headers/asm-m68k
Add M68K_FEATURE_MSP, M68K_FEATURE_MOVEC, M68K_FEATURE_M68010
Add 68060 CR BUSCR and PCR (unimplemented)
CPU types and features cleanup
# gpg: Signature made Fri 12 Feb 2021 21:14:28 GMT
# gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg: issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C
* remotes/vivier/tags/m68k-for-6.0-pull-request:
m68k: import bootinfo headers from linux
m68k: add MSP detection support for stack pointer swap helpers
m68k: MOVEC insn. should generate exception if wrong CR is accessed
m68k: add missing BUSCR/PCR CR defines, and BUSCR/PCR/CAAR CR to m68k_move_to/from
m68k: improve comments on m68k_move_to/from helpers
m68k: cascade m68k_features by m680xx_cpu_initfn() to improve readability
m68k: improve cpu instantiation comments
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/m68k/bootinfo.h | 55 | ||||
-rw-r--r-- | hw/m68k/q800.c | 20 |
2 files changed, 7 insertions, 68 deletions
diff --git a/hw/m68k/bootinfo.h b/hw/m68k/bootinfo.h index c954270..adbf0c5 100644 --- a/hw/m68k/bootinfo.h +++ b/hw/m68k/bootinfo.h @@ -11,61 +11,6 @@ #ifndef HW_M68K_BOOTINFO_H #define HW_M68K_BOOTINFO_H -struct bi_record { - uint16_t tag; /* tag ID */ - uint16_t size; /* size of record */ - uint32_t data[]; /* data */ -}; - -/* machine independent tags */ - -#define BI_LAST 0x0000 /* last record */ -#define BI_MACHTYPE 0x0001 /* machine type (u_long) */ -#define BI_CPUTYPE 0x0002 /* cpu type (u_long) */ -#define BI_FPUTYPE 0x0003 /* fpu type (u_long) */ -#define BI_MMUTYPE 0x0004 /* mmu type (u_long) */ -#define BI_MEMCHUNK 0x0005 /* memory chunk address and size */ - /* (struct mem_info) */ -#define BI_RAMDISK 0x0006 /* ramdisk address and size */ - /* (struct mem_info) */ -#define BI_COMMAND_LINE 0x0007 /* kernel command line parameters */ - /* (string) */ - -/* Macintosh-specific tags (all u_long) */ - -#define BI_MAC_MODEL 0x8000 /* Mac Gestalt ID (model type) */ -#define BI_MAC_VADDR 0x8001 /* Mac video base address */ -#define BI_MAC_VDEPTH 0x8002 /* Mac video depth */ -#define BI_MAC_VROW 0x8003 /* Mac video rowbytes */ -#define BI_MAC_VDIM 0x8004 /* Mac video dimensions */ -#define BI_MAC_VLOGICAL 0x8005 /* Mac video logical base */ -#define BI_MAC_SCCBASE 0x8006 /* Mac SCC base address */ -#define BI_MAC_BTIME 0x8007 /* Mac boot time */ -#define BI_MAC_GMTBIAS 0x8008 /* Mac GMT timezone offset */ -#define BI_MAC_MEMSIZE 0x8009 /* Mac RAM size (sanity check) */ -#define BI_MAC_CPUID 0x800a /* Mac CPU type (sanity check) */ -#define BI_MAC_ROMBASE 0x800b /* Mac system ROM base address */ - -/* Macintosh hardware profile data */ - -#define BI_MAC_VIA1BASE 0x8010 /* Mac VIA1 base address (always present) */ -#define BI_MAC_VIA2BASE 0x8011 /* Mac VIA2 base address (type varies) */ -#define BI_MAC_VIA2TYPE 0x8012 /* Mac VIA2 type (VIA, RBV, OSS) */ -#define BI_MAC_ADBTYPE 0x8013 /* Mac ADB interface type */ -#define BI_MAC_ASCBASE 0x8014 /* Mac Apple Sound Chip base address */ -#define BI_MAC_SCSI5380 0x8015 /* Mac NCR 5380 SCSI (base address, multi) */ -#define BI_MAC_SCSIDMA 0x8016 /* Mac SCSI DMA (base address) */ -#define BI_MAC_SCSI5396 0x8017 /* Mac NCR 53C96 SCSI (base address, multi) */ -#define BI_MAC_IDETYPE 0x8018 /* Mac IDE interface type */ -#define BI_MAC_IDEBASE 0x8019 /* Mac IDE interface base address */ -#define BI_MAC_NUBUS 0x801a /* Mac Nubus type (none, regular, pseudo) */ -#define BI_MAC_SLOTMASK 0x801b /* Mac Nubus slots present */ -#define BI_MAC_SCCTYPE 0x801c /* Mac SCC serial type (normal, IOP) */ -#define BI_MAC_ETHTYPE 0x801d /* Mac builtin ethernet type (Sonic, MACE */ -#define BI_MAC_ETHBASE 0x801e /* Mac builtin ethernet base address */ -#define BI_MAC_PMU 0x801f /* Mac power management / poweroff hardware */ -#define BI_MAC_IOP_SWIM 0x8020 /* Mac SWIM floppy IOP */ -#define BI_MAC_IOP_ADB 0x8021 /* Mac ADB IOP */ #define BOOTINFO0(as, base, id) \ do { \ diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 2af0e25..d4eca46 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -37,6 +37,8 @@ #include "hw/char/escc.h" #include "hw/sysbus.h" #include "hw/scsi/esp.h" +#include "standard-headers/asm-m68k/bootinfo.h" +#include "standard-headers/asm-m68k/bootinfo-mac.h" #include "bootinfo.h" #include "hw/misc/mac_via.h" #include "hw/input/adb.h" @@ -55,14 +57,6 @@ #define MACROM_FILENAME "MacROM.bin" -#define Q800_MACHINE_ID 35 -#define Q800_CPU_ID (1 << 2) -#define Q800_FPU_ID (1 << 2) -#define Q800_MMU_ID (1 << 2) - -#define MACH_MAC 3 -#define Q800_MAC_CPU_ID 2 - #define IO_BASE 0x50000000 #define IO_SLICE 0x00040000 #define IO_SIZE 0x04000000 @@ -415,11 +409,11 @@ static void q800_init(MachineState *machine) parameters_base = (high + 1) & ~1; BOOTINFO1(cs->as, parameters_base, BI_MACHTYPE, MACH_MAC); - BOOTINFO1(cs->as, parameters_base, BI_FPUTYPE, Q800_FPU_ID); - BOOTINFO1(cs->as, parameters_base, BI_MMUTYPE, Q800_MMU_ID); - BOOTINFO1(cs->as, parameters_base, BI_CPUTYPE, Q800_CPU_ID); - BOOTINFO1(cs->as, parameters_base, BI_MAC_CPUID, Q800_MAC_CPU_ID); - BOOTINFO1(cs->as, parameters_base, BI_MAC_MODEL, Q800_MACHINE_ID); + BOOTINFO1(cs->as, parameters_base, BI_FPUTYPE, FPU_68040); + BOOTINFO1(cs->as, parameters_base, BI_MMUTYPE, MMU_68040); + BOOTINFO1(cs->as, parameters_base, BI_CPUTYPE, CPU_68040); + BOOTINFO1(cs->as, parameters_base, BI_MAC_CPUID, CPUB_68040); + BOOTINFO1(cs->as, parameters_base, BI_MAC_MODEL, MAC_MODEL_Q800); BOOTINFO1(cs->as, parameters_base, BI_MAC_MEMSIZE, ram_size >> 20); /* in MB */ BOOTINFO2(cs->as, parameters_base, BI_MEMCHUNK, 0, ram_size); |