PReP patch queue 2012-08-15
Hello Anthony,
Please pull the PowerPC Reference Platform (PReP) queue into qemu.git master.
With Alex' and Hervé's blessing this contains both fixes for runtime errors trying to use -M prep on qemu-system-ppc64 and well as some progress QOM'ifying the pc87312 Super I/O chipset.
The following changes since commit 76b64a7aa84965ee9c7594058a43b00c2a14c72e:
win32: provide separate macros for weak decls and definitions (2012-08-15 13:26:03 -0500)
are available in the git repository at:
git://repo.or.cz/qemu/afaerber.git prep-up
Andreas Färber (1):
prep: Include devices for ppc64 as well
Hervé Poussineau (2):
prep: Add pc87312 Super I/O emulation
prep: Use pc87312 device instead of collection of random ISA devices
MAINTAINERS | 1 + default-configs/ppc-softmmu.mak | 2 + default-configs/ppc64-softmmu.mak | 5 + hw/Makefile.objs | 1 + hw/pc87312.c | 386 +++++++++++++++++++++++++++++++++++++ hw/pc87312.h | 66 +++++++ hw/ppc_prep.c | 39 +--- trace-events | 8 + 8 files changed, 476 insertions(+), 32 deletions(-) create mode 100644 hw/pc87312.c create mode 100644 hw/pc87312.h
PATCH 1/3 prep: Include devices for ppc64 as well
Allows running qemu-system-ppc64 -M prep for consistency.
--- default-configs/ppc64-softmmu.mak | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
default-configs/ppc64-softmmu.mak +3 -0
@@ -12,9 +12,12 @@ CONFIG_I8254=y CONFIG_PCKBD=y CONFIG_FDC=y CONFIG_DMA=y +CONFIG_I82374=y CONFIG_OPENPIC=y CONFIG_PREP_PCI=y +CONFIG_I82378=y CONFIG_MACIO=y +CONFIG_PCSPK=y CONFIG_CUDA=y CONFIG_ADB=y CONFIG_MAC_NVRAM=y
Signature · 1 line
1.7.7
PATCH 2/3 prep: Add pc87312 Super I/O emulation
In reply to Andreas FärberFrom: Hervé Poussineau <[email protected]>
This provides floppy and IDE controllers as well as serial and parallel ports. However, dynamic configuration of devices is not yet supported.
--- hw/Makefile.objs | 1 + hw/pc87312.c | 386 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/pc87312.h | 66 +++++++++ trace-events | 8 + 4 files changed, 461 insertions(+), 0 deletions(-) create mode 100644 hw/pc87312.c create mode 100644 hw/pc87312.h
hw/Makefile.objs +1 -0
@@ -39,6 +39,7 @@ hw-obj-$(CONFIG_I8259) += i8259_common.o i8259.o # PPC devices hw-obj-$(CONFIG_PREP_PCI) += prep_pci.o hw-obj-$(CONFIG_I82378) += i82378.o +hw-obj-$(CONFIG_PC87312) += pc87312.o # Mac shared devices hw-obj-$(CONFIG_MACIO) += macio.o hw-obj-$(CONFIG_CUDA) += cuda.o
hw/pc87312.c new file +386 -0
386 lines not on this page · raw message
hw/pc87312.h new file +66 -0
66 lines not on this page · raw message
trace-events +8 -0
@@ -694,6 +694,14 @@ mipsnet_read(uint64_t addr, uint32_t val) "read addr=0x%" PRIx64 " val=0x%x" mipsnet_write(uint64_t addr, uint64_t val) "write addr=0x%" PRIx64 " val=0x%" PRIx64 "" mipsnet_irq(uint32_t isr, uint32_t intctl) "set irq to %d (%02x)" +# hw/pc87312.c +pc87312_io_read(uint32_t addr, uint32_t val) "read addr=%x val=%x" +pc87312_io_write(uint32_t addr, uint32_t val) "write addr=%x val=%x" +pc87312_info_floppy(uint32_t base) "base 0x%x" +pc87312_info_ide(uint32_t base) "base 0x%x" +pc87312_info_parallel(uint32_t base, uint32_t irq) "base 0x%x, irq %u" +pc87312_info_serial(int n, uint32_t base, uint32_t irq) "id=%d, base 0x%x, irq %u" + # xen-all.c xen_ram_alloc(unsigned long ram_addr, unsigned long size) "requested: %#lx, size %#lx" xen_client_set_memory(uint64_t start_addr, unsigned long size, bool log_dirty) "%#"PRIx64" size %#lx, log_dirty %i"
Signature · 1 line
1.7.7
PATCH 3/3 prep: Use pc87312 device instead of collection of random ISA devices
In reply to Andreas FärberFrom: Hervé Poussineau <[email protected]>
We can't however replace the built-in IDE controller, as the one in pc87312 is only single-channel and can use only IRQ 14. Therefore the pc87312's IDE function gets disabled via the config property.
PReP emulation also gains a parallel port emulation this way.
--- MAINTAINERS | 1 + default-configs/ppc-softmmu.mak | 2 + default-configs/ppc64-softmmu.mak | 2 + hw/ppc_prep.c | 39 ++++++------------------------------ 4 files changed, 12 insertions(+), 32 deletions(-)
MAINTAINERS +1 -0
@@ -373,6 +373,7 @@ L: [email protected] S: Odd Fixes F: hw/ppc_prep.c F: hw/prep_pci.[hc] +F: hw/pc87312.[hc] SH4 Machines ------------
default-configs/ppc-softmmu.mak +2 -0
@@ -8,6 +8,7 @@ CONFIG_M48T59=y CONFIG_VGA=y CONFIG_VGA_PCI=y CONFIG_SERIAL=y +CONFIG_PARALLEL=y CONFIG_I8254=y CONFIG_PCKBD=y CONFIG_FDC=y
@@ -16,6 +17,7 @@ CONFIG_I82374=y CONFIG_OPENPIC=y CONFIG_PREP_PCI=y CONFIG_I82378=y +CONFIG_PC87312=y CONFIG_MACIO=y CONFIG_PCSPK=y CONFIG_CUDA=y
default-configs/ppc64-softmmu.mak +2 -0
@@ -8,6 +8,7 @@ CONFIG_M48T59=y CONFIG_VGA=y CONFIG_VGA_PCI=y CONFIG_SERIAL=y +CONFIG_PARALLEL=y CONFIG_I8254=y CONFIG_PCKBD=y CONFIG_FDC=y
@@ -16,6 +17,7 @@ CONFIG_I82374=y CONFIG_OPENPIC=y CONFIG_PREP_PCI=y CONFIG_I82378=y +CONFIG_PC87312=y CONFIG_MACIO=y CONFIG_PCSPK=y CONFIG_CUDA=y
hw/ppc_prep.c +7 -32
@@ -36,6 +36,7 @@#include "ide.h" #include "loader.h" #include "mc146818rtc.h" +#include "pc87312.h" #include "blockdev.h" #include "arch_init.h" #include "exec-memory.h"
@@ -180,7 +181,6 @@ typedef struct sysctrl_t {M48t59State *nvram;uint8_t state;uint8_t syscontrol; -uint8_t fake_io[2 ];int contiguous_map;int endian; } sysctrl_t;
@@ -191,24 +191,6 @@ enum {static sysctrl_t *sysctrl; -static void PREP_io_write (void *opaque,uint32_t addr,uint32_t val) -{ -sysctrl_t *sysctrl = opaque; - -PPC_IO_DPRINTF ("0x%08" PRIx32" => 0x%02" PRIx32"\n" , addr -PPC_IO_BASE , - val); - sysctrl->fake_io[addr -0x0398 ] = val; -} - -static uint32_t PREP_io_read (void *opaque,uint32_t addr) -{ -sysctrl_t *sysctrl = opaque; - -PPC_IO_DPRINTF ("0x%08" PRIx32" <= 0x%02" PRIx32"\n" , addr -PPC_IO_BASE , - sysctrl->fake_io[addr -0x0398 ]); -return sysctrl->fake_io[addr -0x0398 ]; -} -static void PREP_io_800_writeb (void *opaque,uint32_t addr,uint32_t val) {sysctrl_t *sysctrl = opaque;
@@ -475,10 +457,10 @@ static void ppc_prep_init (ram_addr_t ram_size,PCIBus *pci_bus;PCIDevice *pci;ISABus *isa_bus; +ISADevice *isa;qemu_irq *cpu_exit_irq;int ppc_boot_device;DriveInfo *hd[MAX_IDE_BUS *MAX_IDE_DEVS ]; -DriveInfo *fd[MAX_FD ]; sysctrl =g_malloc0 (sizeof (sysctrl_t));
@@ -606,6 +588,11 @@ static void ppc_prep_init (ram_addr_t ram_size,sysbus_connect_irq (&pcihost->busdev,3 ,qdev_get_gpio_in (&pci->qdev,11 )); isa_bus =DO_UPCAST (ISABus, qbus,qdev_get_child_bus (&pci->qdev,"isa.0" )); +/* Super I/O (parallel + serial ports) */ + isa =isa_create (isa_bus,TYPE_PC87312 ); +qdev_prop_set_uint8 (&isa->qdev,"config" ,13 );/* fdc, ser0, ser1, par0 */ +qdev_init_nofail (&isa->qdev); +/* Register 8 MB of ISA IO space (needed for non-contiguous map) */ memory_region_init_io (PPC_io_memory, &PPC_prep_io_ops, sysctrl,"ppc-io" ,0x00800000 );
@@ -614,8 +601,6 @@ static void ppc_prep_init (ram_addr_t ram_size,/* init basic PC hardware */ pci_vga_init (pci_bus); -if (serial_hds[0 ]) -serial_isa_init (isa_bus,0 , serial_hds[0 ]); nb_nics1 = nb_nics;if (nb_nics1 >NE2000_NB_MAX ) nb_nics1 =NE2000_NB_MAX ;
@@ -639,17 +624,7 @@ static void ppc_prep_init (ram_addr_t ram_size, }isa_create_simple (isa_bus,"i8042" ); -// SB16_init(); - -for (i =0 ; i <MAX_FD ; i++) { - fd[i] =drive_get (IF_FLOPPY ,0 , i); - } -fdctrl_init_isa (isa_bus, fd); - -/* Register fake IO ports for PREP */ sysctrl->reset_irq = first_cpu->irq_inputs[PPC6xx_INPUT_HRESET]; -register_ioport_read (0x398 ,2 ,1 , &PREP_io_read, sysctrl); -register_ioport_write (0x398 ,2 ,1 , &PREP_io_write, sysctrl);/* System control ports */ register_ioport_read (0x0092 ,0x01 ,1 , &PREP_io_800_readb, sysctrl);register_ioport_write (0x0092 ,0x01 ,1 , &PREP_io_800_writeb, sysctrl);
Signature · 1 line
1.7.7
Am 15.08.2012 22:27, schrieb Andreas Färber:
Quoted 7 lines
Hello Anthony,
Please pull the PowerPC Reference Platform (PReP) queue into qemu.git master.
With Alex' and Hervé's blessing this contains both fixes for runtime errors trying to use -M prep on qemu-system-ppc64 [as] well as some progress QOM'ifying the pc87312 Super I/O chipset.
Forgot to update my script to mark as for-1.2...
/-F
Quoted 26 lines
The following changes since commit
76b64a7aa84965ee9c7594058a43b00c2a14c72e:win32: provide separate macros for weak decls and definitions (2012-08-15 13:26:03 -0500)
are available in the git repository at:
git://repo.or.cz/qemu/afaerber.gitprep-upAndreas Färber (1):
prep: Include devices for ppc64 as wellHervé Poussineau (2):
prep: Add pc87312 Super I/O emulation
prep: Use pc87312 device instead of collection of random ISA devicesMAINTAINERS | 1 + default-configs/ppc-softmmu.mak | 2 + default-configs/ppc64-softmmu.mak | 5 + hw/Makefile.objs | 1 + hw/pc87312.c | 386 +++++++++++++++++++++++++++++++++++++ hw/pc87312.h | 66 +++++++ hw/ppc_prep.c | 39 +--- trace-events | 8 + 8 files changed, 476 insertions(+), 32 deletions(-) create mode 100644 hw/pc87312.c create mode 100644 hw/pc87312.h
Am 15.08.2012 22:27, schrieb Andreas Färber:
Quoted 7 lines
Hello Anthony,
Please pull the PowerPC Reference Platform (PReP) queue into qemu.git master.
With Alex' and Hervé's blessing this contains both fixes for runtime errors trying to use -M prep on qemu-system-ppc64 and well as some progress QOM'ifying the pc87312 Super I/O chipset.
Seems this pull was forgotten... I merged master, please pull for 1.4.
Regards,
Andreas
The following changes since commit a6308bc2224db238e72c570482717b68246a7ce0:
Merge remote-tracking branch 'kraxel/build.1' into staging (2013-01-10
13:26:31 -0600)
are available in the git repository at:
git://repo.or.cz/qemu/afaerber.git prep-up
for you to fetch changes up to 63e3555e80c31776285accbb4d0c14ae91c457dc:
Merge branch 'master' of git://git.qemu.org/qemu into prep-up
(2013-01-10 21:52:28 +0100)
----------------------------------------------------------------
Andreas Färber (2):
prep: Include devices for ppc64 as well
Merge branch 'master' of git://git.qemu.org/qemu into prep-up
Hervé Poussineau (2):
prep: Add pc87312 Super I/O emulation
prep: Use pc87312 device instead of collection of random ISA devices
MAINTAINERS | 1 + default-configs/ppc-softmmu.mak | 2 + default-configs/ppc64-softmmu.mak | 5 + hw/Makefile.objs | 1 + hw/pc87312.c | 387 +++++++++++++++++++++++++++++++++++++ hw/pc87312.h | 66 +++++++ hw/ppc_prep.c | 39 +--- trace-events | 8 + 8 Dateien geändert, 477 Zeilen hinzugefügt(+), 32 Zeilen entfernt(-) create mode 100644 hw/pc87312.c create mode 100644 hw/pc87312.h
Quoted 10 lines · Andreas Färber
Am 15.08.2012 22:27, schrieb Andreas Färber:
Quoted 7 lines
Hello Anthony,
Please pull the PowerPC Reference Platform (PReP) queue into qemu.git master.
With Alex' and Hervé's blessing this contains both fixes for runtime errors trying to use -M prep on qemu-system-ppc64 and well as some progress QOM'ifying the pc87312 Super I/O chipset.
Seems this pull was forgotten... I merged master, please pull for 1.4.
Please send things like this as a new top-level pull request.
Regards,
Anthony Liguori
Quoted 41 lines
Regards,
AndreasThe following changes since commit
a6308bc2224db238e72c570482717b68246a7ce0:Merge remote-tracking branch 'kraxel/build.1' into staging (2013-01-10
13:26:31 -0600)are available in the git repository at:
git://repo.or.cz/qemu/afaerber.gitprep-upfor you to fetch changes up to
63e3555e80c31776285accbb4d0c14ae91c457dc:Merge branch 'master' of
git://git.qemu.org/qemuinto prep-up
(2013-01-10 21:52:28 +0100)----------------------------------------------------------------
Andreas Färber (2):
prep: Include devices for ppc64 as well
Merge branch 'master' ofgit://git.qemu.org/qemuinto prep-upHervé Poussineau (2):
prep: Add pc87312 Super I/O emulation
prep: Use pc87312 device instead of collection of random ISA devicesMAINTAINERS | 1 + default-configs/ppc-softmmu.mak | 2 + default-configs/ppc64-softmmu.mak | 5 + hw/Makefile.objs | 1 + hw/pc87312.c | 387 +++++++++++++++++++++++++++++++++++++ hw/pc87312.h | 66 +++++++ hw/ppc_prep.c | 39 +--- trace-events | 8 + 8 Dateien geändert, 477 Zeilen hinzugefügt(+), 32 Zeilen entfernt(-) create mode 100644 hw/pc87312.c create mode 100644 hw/pc87312.h