@@ -152,6 +152,20 @@ hw-obj-$(CONFIG_ACPI) += acpi.o
# PPC devices
hw-obj-$(CONFIG_OPENPIC) += openpic.o
hw-obj-$(CONFIG_PREP_PCI) += prep_pci.o
+# Mac shared devices
+hw-obj-$(CONFIG_MACIO) += macio.o
+hw-obj-$(CONFIG_CUDA) += cuda.o
+hw-obj-$(CONFIG_ADB) += adb.o
+hw-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
+hw-obj-$(CONFIG_MAC_DBDMA) += mac_dbdma.o
+# OldWorld PowerMac
+hw-obj-$(CONFIG_HEATHROW_PIC) += heathrow_pic.o
+hw-obj-$(CONFIG_GRACKLE_PCI) += grackle_pci.o
+# NewWorld PowerMac
+hw-obj-$(CONFIG_UNIN_PCI) += unin_pci.o
+hw-obj-$(CONFIG_DEC_PCI) += dec_pci.o
+# PowerPC E500 boards
+hw-obj-$(CONFIG_PPCE500_PCI) += ppce500_pci.o
# PCI watchdog devices
hw-obj-y += wdt_i6300esb.o
@@ -195,17 +195,15 @@ obj-ppc-y += vga.o dma.o
# PREP target
obj-ppc-y += pckbd.o i8259.o mc146818rtc.o
obj-ppc-y += ppc_prep.o
-# Mac shared devices
-obj-ppc-y += macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o
# OldWorld PowerMac
-obj-ppc-y += heathrow_pic.o grackle_pci.o ppc_oldworld.o
+obj-ppc-y += ppc_oldworld.o
# NewWorld PowerMac
-obj-ppc-y += unin_pci.o ppc_newworld.o dec_pci.o
+obj-ppc-y += ppc_newworld.o
# PowerPC 4xx boards
obj-ppc-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
obj-ppc-y += ppc440.o ppc440_bamboo.o
# PowerPC E500 boards
-obj-ppc-y += ppce500_pci.o ppce500_mpc8544ds.o
+obj-ppc-y += ppce500_mpc8544ds.o
obj-ppc-$(CONFIG_KVM) += kvm_ppc.o
obj-ppc-$(CONFIG_FDT) += device_tree.o
@@ -11,6 +11,16 @@ CONFIG_I8254=y
CONFIG_FDC=y
CONFIG_OPENPIC=y
CONFIG_PREP_PCI=y
+CONFIG_MACIO=y
+CONFIG_CUDA=y
+CONFIG_ADB=y
+CONFIG_MAC_NVRAM=y
+CONFIG_MAC_DBDMA=y
+CONFIG_HEATHROW_PIC=y
+CONFIG_GRACKLE_PCI=y
+CONFIG_UNIN_PCI=y
+CONFIG_DEC_PCI=y
+CONFIG_PPCE500_PCI=y
CONFIG_IDE_CORE=y
CONFIG_IDE_QDEV=y
CONFIG_IDE_PCI=y
b/default-configs/ppc64-softmmu.mak
@@ -11,6 +11,16 @@ CONFIG_I8254=y
CONFIG_FDC=y
CONFIG_OPENPIC=y
CONFIG_PREP_PCI=y
+CONFIG_MACIO=y
+CONFIG_CUDA=y
+CONFIG_ADB=y
+CONFIG_MAC_NVRAM=y
+CONFIG_MAC_DBDMA=y
+CONFIG_HEATHROW_PIC=y
+CONFIG_GRACKLE_PCI=y
+CONFIG_UNIN_PCI=y
+CONFIG_DEC_PCI=y
+CONFIG_PPCE500_PCI=y
CONFIG_IDE_CORE=y
CONFIG_IDE_QDEV=y
CONFIG_IDE_PCI=y
b/default-configs/ppcemb-softmmu.mak
@@ -11,6 +11,16 @@ CONFIG_I8254=y
CONFIG_FDC=y
CONFIG_OPENPIC=y
CONFIG_PREP_PCI=y
+CONFIG_MACIO=y
+CONFIG_CUDA=y
+CONFIG_ADB=y
+CONFIG_MAC_NVRAM=y
+CONFIG_MAC_DBDMA=y
+CONFIG_HEATHROW_PIC=y
+CONFIG_GRACKLE_PCI=y
+CONFIG_UNIN_PCI=y
+CONFIG_DEC_PCI=y
+CONFIG_PPCE500_PCI=y
CONFIG_IDE_CORE=y
CONFIG_IDE_QDEV=y
CONFIG_IDE_PCI=y
@@ -68,9 +68,7 @@ static void pic_writel (void *opaque,
target_phys_addr_t addr, uint32_t value)
HeathrowPIC *pic;
unsigned int n;
-#ifdef TARGET_WORDS_BIGENDIAN
value = bswap32(value);
-#endif
n = ((addr & 0xfff) - 0x10) >> 4;
PIC_DPRINTF("writel: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);
if (n >= 2)
@@ -120,9 +118,7 @@ static uint32_t pic_readl (void *opaque,
target_phys_addr_t addr)
}
}
PIC_DPRINTF("readl: " TARGET_FMT_plx " %u: %08x\n", addr, n, value);
-#ifdef TARGET_WORDS_BIGENDIAN
value = bswap32(value);
-#endif
return value;
}
@@ -707,9 +707,7 @@ static void dbdma_writel (void *opaque,
DBDMA_DPRINTF("channel 0x%x reg 0x%x\n",
(uint32_t)addr >> DBDMA_CHANNEL_SHIFT, reg);
-#ifdef TARGET_WORDS_BIGENDIAN
value = bswap32(value);
-#endif
/* cmdptr cannot be modified if channel is RUN or ACTIVE */
@@ -790,9 +788,7 @@ static uint32_t dbdma_readl (void *opaque,
target_phys_addr_t addr)
break;
}
-#ifdef TARGET_WORDS_BIGENDIAN
value = bswap32(value);
-#endif
return value;
}
@@ -15,12 +15,10 @@
*/
#include "hw.h"
-#include "ppc.h"
#include "ppce500.h"
#include "pci.h"
#include "pci_host.h"
#include "bswap.h"
-#include "qemu-log.h"
#ifdef DEBUG_PCI
#define pci_debug(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
@@ -121,9 +121,7 @@ static void unin_data_write(ReadWriteHandler *handler,
pcibus_t addr, uint32_t val, int len)
{
UNINState *s = container_of(handler, UNINState, data_handler);
-#ifdef TARGET_WORDS_BIGENDIAN
val = qemu_bswap_len(val, len);
-#endif
UNIN_DPRINTF("write addr %" FMT_PCIBUS " len %d val %x\n", addr, len, val);
pci_data_write(s->host_state.bus,
unin_get_config_reg(s->host_state.config_reg, addr),
@@ -140,9 +138,7 @@ static uint32_t unin_data_read(ReadWriteHandler *handler,
unin_get_config_reg(s->host_state.config_reg, addr),
len);
UNIN_DPRINTF("read addr %" FMT_PCIBUS " len %d val %x\n", addr, len, val);
-#ifdef TARGET_WORDS_BIGENDIAN
val = qemu_bswap_len(val, len);
-#endif
return val;
}
@@ -144,13 +144,9 @@ extern uint64_t node_cpumask[MAX_NODES];
extern const char *option_rom[MAX_OPTION_ROMS];
extern int nb_option_roms;
-#ifdef NEED_CPU_H
-#if defined(TARGET_SPARC) || defined(TARGET_PPC)
#define MAX_PROM_ENVS 128
extern const char *prom_envs[MAX_PROM_ENVS];
extern unsigned int nb_prom_envs;
-#endif
-#endif
typedef enum {
IF_NONE,
Make byte swapping unconditional since PPC is big endian. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> --- Makefile.objs | 14 ++++++++++++++ Makefile.target | 8 +++----- default-configs/ppc-softmmu.mak | 10 ++++++++++ default-configs/ppc64-softmmu.mak | 10 ++++++++++ default-configs/ppcemb-softmmu.mak | 10 ++++++++++ hw/heathrow_pic.c | 4 ---- hw/mac_dbdma.c | 4 ---- hw/ppce500_pci.c | 2 -- hw/unin_pci.c | 4 ---- sysemu.h | 4 ---- 10 files changed, 47 insertions(+), 23 deletions(-)