Skip to contentSkip to conversation

Emulate the

PATCH New Hollis Blanchard 1 participant 1 message Apr 30, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Emulate the

qemu/hw/ppc4xx.h +40 -0
@@ -2,6 +2,9 @@
  * QEMU PowerPC 4xx emulation shared definitions
  *
  * Copyright (c) 2007 Jocelyn Mayer
+ *
+ * Copyright 2008 IBM Corp.
+ * Authors: Hollis Blanchard <[email protected]>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -46,4 +49,41 @@ qemu_irq *ppcuic_init (CPUState *env, qe
 qemu_irq *ppcuic_init (CPUState *env, qemu_irq *irqs,
                        uint32_t dcr_base, int has_ssr, int has_vr);
 
+
+struct pci_master_map {
+    uint32_t la;
+    uint32_t ma;
+    uint32_t pcila;
+    uint32_t pciha;
+};
+
+struct pci_target_map {
+    uint32_t ms;
+    uint32_t la;
+    uint32_t bar;
+};
+
+#define PPC44x_PCI_NR_PMMS 3
+#define PPC44x_PCI_NR_PTMS 2
+
+struct ppc4xx_pci_t {
+    target_phys_addr_t config_space;
+    target_phys_addr_t registers;
+    struct pci_master_map pmm[PPC44x_PCI_NR_PMMS];
+    struct pci_target_map ptm[PPC44x_PCI_NR_PTMS];
+
+    unsigned int pmm_offset_flags;
+    qemu_irq *pic;
+
+    uint32_t pcic0_cfgaddr;
+    PCIBus *bus;
+};
+typedef struct ppc4xx_pci_t ppc4xx_pci_t;
+
+ppc4xx_pci_t *ppc4xx_pci_init(CPUState *env, qemu_irq *pic,
+                              target_phys_addr_t config_space,
+                              target_phys_addr_t int_ack,
+                              target_phys_addr_t special_cycle,
+                              target_phys_addr_t registers);
+
 #endif /* !defined(PPC_4XX_H) */
qemu/hw/ppc4xx_devs.c +371 -0

386 lines not on this page · raw message

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-ppc-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel