mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
m68k: import bootinfo headers from linux
Copy bootinfo.h and bootinfo-mac.h from arch/m68k/include/uapi/asm/ to include/standard-headers/asm-m68k/ Imported from linux v5.9 but didn't change since v4.14 (header update) and since v4.10 (content update). Signed-off-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20201220112615.933036-2-laurent@vivier.eu> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
7525a9b94c
commit
382d71af7d
5 changed files with 295 additions and 68 deletions
|
@ -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 { \
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue