[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/10] hw/ppc/mac.h: Move PROM and KERNEL defines to board code
From: |
BALATON Zoltan |
Subject: |
[PATCH 09/10] hw/ppc/mac.h: Move PROM and KERNEL defines to board code |
Date: |
Sat, 17 Sep 2022 01:07:27 +0200 (CEST) |
The PROM_FILENAME and KERNEL_* defines are used by mac_oldworld and
mac_newworld but they don't have to be identical so these could be
moved to the individual boards. The NVRAM_SIZE define is not used so
it can be dropped. This further reduces the mac.h header.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
hw/ppc/mac.h | 6 ------
hw/ppc/mac_newworld.c | 4 ++++
hw/ppc/mac_oldworld.c | 7 ++++++-
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/hw/ppc/mac.h b/hw/ppc/mac.h
index fe77a6c6db..3c0c3cc43d 100644
--- a/hw/ppc/mac.h
+++ b/hw/ppc/mac.h
@@ -29,12 +29,6 @@
#include "exec/memory.h"
#include "hw/sysbus.h"
-#define NVRAM_SIZE 0x2000
-#define PROM_FILENAME "openbios-ppc"
-
-#define KERNEL_LOAD_ADDR 0x01000000
-#define KERNEL_GAP 0x00100000
-
/* Mac NVRAM */
#define TYPE_MACIO_NVRAM "macio-nvram"
OBJECT_DECLARE_SIMPLE_TYPE(MacIONVRAMState, MACIO_NVRAM)
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 14cc8cd6ea..1cb10726d3 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -83,9 +83,13 @@
#define NDRV_VGA_FILENAME "qemu_vga.ndrv"
+#define PROM_FILENAME "openbios-ppc"
#define PROM_BASE 0xfff00000
#define PROM_SIZE (1 * MiB)
+#define KERNEL_LOAD_ADDR 0x01000000
+#define KERNEL_GAP 0x00100000
+
#define TYPE_CORE99_MACHINE MACHINE_TYPE_NAME("mac99")
typedef struct Core99MachineState Core99MachineState;
DECLARE_INSTANCE_CHECKER(Core99MachineState, CORE99_MACHINE,
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index a4094226bc..e196090f49 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -57,10 +57,15 @@
#define NDRV_VGA_FILENAME "qemu_vga.ndrv"
-#define GRACKLE_BASE 0xfec00000
+#define PROM_FILENAME "openbios-ppc"
#define PROM_BASE 0xffc00000
#define PROM_SIZE (4 * MiB)
+#define KERNEL_LOAD_ADDR 0x01000000
+#define KERNEL_GAP 0x00100000
+
+#define GRACKLE_BASE 0xfec00000
+
static void fw_cfg_boot_set(void *opaque, const char *boot_device,
Error **errp)
{
--
2.30.4
- Re: [PATCH 03/10] mac_{old|new}world: Set default values for some local variables, (continued)
[PATCH 08/10] hw/ppc/mac.h: Move grackle-pcihost declaration out from shared header, BALATON Zoltan, 2022/09/16
[PATCH 05/10] mac_{old|new}world: Reduce number of QOM casts, BALATON Zoltan, 2022/09/16
[PATCH 10/10] hw/ppc/mac.h: Rename to include/hw/nvram/mac_nvram.h, BALATON Zoltan, 2022/09/16
[PATCH 09/10] hw/ppc/mac.h: Move PROM and KERNEL defines to board code,
BALATON Zoltan <=
[PATCH 07/10] hw/ppc/mac.h: Move macio specific atuff out from shared header, BALATON Zoltan, 2022/09/16
Re: [PATCH 00/10] Misc ppc/mac machines clean up, BALATON Zoltan, 2022/09/24