Pegasos2 emulation
v4 cover Pegasos2 emulation
Hello,
This is adding a new PPC board called pegasos2. More info on it can be found at:
https://osdn.net/projects/qmiga/wiki/SubprojectPegasos2
Currently it needs a firmware ROM image that I cannot include due to original copyright holder (bPlan) did not release it under a free licence but I have plans to write a replacement in the future. With the original board firmware it can boot MorphOS now as:
qemu-system-ppc -M pegasos2 -cdrom morphos.iso -device ati-vga,romfile="" -serial stdio
then enter "boot cd boot.img" at the firmware "ok" prompt as described in the MorphOS.readme. To boot Linux use same command line with e.g. -cdrom debian-8.11.0-powerpc-netinst.iso then enter
"boot cd install/pegasos"
The last patch adds the actual board code after previous patches adding VT8231 and MV64361 system controller chip emulation. The mv643xx.h header file is taken from Linux and produces a bunch of checkpatch warnings due to different formatting rules it follows, I'm not sure we want to adopt it and change formatting or keep it as it is.
Regards,
BALATON Zoltan
V4: Rename pegasos2_reset to pegasos2_cpu_reset
Add new files to MAINTAINERS
BALATON Zoltan (6):
vt82c686: Implement control of serial port io ranges via config regs
vt82c686: QOM-ify superio related functionality
vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO
vt82c686: Add emulation of VT8231 south bridge hw/pci-host: Add emulation of Marvell MV64361 PPC system controller hw/ppc: Add emulation of Genesi/bPlan Pegasos II
MAINTAINERS | 10 + default-configs/devices/ppc-softmmu.mak | 2 + hw/isa/vt82c686.c | 515 +++++++++++-- hw/pci-host/Kconfig | 3 + hw/pci-host/meson.build | 2 + hw/pci-host/mv64361.c | 966 ++++++++++++++++++++++++ hw/pci-host/mv643xx.h | 919 ++++++++++++++++++++++ hw/pci-host/trace-events | 6 + hw/ppc/Kconfig | 10 + hw/ppc/meson.build | 2 + hw/ppc/pegasos2.c | 144 ++++ include/hw/isa/vt82c686.h | 2 +- include/hw/pci-host/mv64361.h | 8 + include/hw/pci/pci_ids.h | 4 +- 14 files changed, 2510 insertions(+), 83 deletions(-) create mode 100644 hw/pci-host/mv64361.c create mode 100644 hw/pci-host/mv643xx.h create mode 100644 hw/ppc/pegasos2.c create mode 100644 include/hw/pci-host/mv64361.h
Signature · 1 line
2.21.3
PATCH v4 1/6 vt82c686: Implement control of serial port io ranges via config regs
In VIA super south bridge the io ranges of superio components (parallel and serial ports and FDC) can be controlled by superio config registers to set their base address and enable/disable them. This is not easy to implement in QEMU because ISA emulation is only designed to set io base address once on creating the device and io ranges are registered at creation and cannot easily be disabled or moved later.
In this patch we hack around that but only for serial ports because those have a single io range at port base that's relatively easy to handle and it's what guests actually use and set address different than the default.
We do not attempt to handle controlling the parallel and FDC regions because those have multiple io ranges so handling them would be messy and guests either don't change their deafult or don't care. We could even get away with disabling and not emulating them, but since they are already there, this patch leaves them mapped at their default address just in case this could be useful for a guest in the future.
--- hw/isa/vt82c686.c | 84 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 2 deletions(-)
hw/isa/vt82c686.c +82 -2
@@ -252,8 +252,24 @@ static const TypeInfo vt8231_pm_info = {typedef struct SuperIOConfig {uint8_t regs[0x100 ];MemoryRegion io; +ISASuperIODevice *superio; +MemoryRegion *serial_io[SUPERIO_MAX_SERIAL_PORTS ]; }SuperIOConfig ; +static MemoryRegion *find_subregion (ISADevice *d,MemoryRegion *parent, +int offs) +{ +MemoryRegion *subregion, *mr =NULL ; + + QTAILQ_FOREACH(subregion, &parent->subregions, subregions_link) { +if (subregion->addr == offs) { + mr = subregion; +break ; + } + } +return mr; +} +static void superio_cfg_write (void *opaque,hwaddr addr,uint64_t data,unsigned size) {
@@ -279,7 +295,53 @@ static void superio_cfg_write(void *opaque, hwaddr addr, uint64_t data, case 0xfd ... 0xff:/* ignore write to read only registers */ return ; -/* case 0xe6 ... 0xe8: Should set base port of parallel and serial */ +case 0xe2 : + { + data &=0x1f ; +if (data &BIT (2 )) {/* Serial port 1 enable */ +ISADevice *dev = sc->superio->serial[0 ]; +if (!memory_region_is_mapped (sc->serial_io[0 ])) { +memory_region_add_subregion (isa_address_space_io (dev), + dev->ioport_id, sc->serial_io[0 ]); + } + }else { +MemoryRegion *io =isa_address_space_io (sc->superio->serial[0 ]); +if (memory_region_is_mapped (sc->serial_io[0 ])) { +memory_region_del_subregion (io, sc->serial_io[0 ]); + } + } +if (data &BIT (3 )) {/* Serial port 2 enable */ +ISADevice *dev = sc->superio->serial[1 ]; +if (!memory_region_is_mapped (sc->serial_io[1 ])) { +memory_region_add_subregion (isa_address_space_io (dev), + dev->ioport_id, sc->serial_io[1 ]); + } + }else { +MemoryRegion *io =isa_address_space_io (sc->superio->serial[1 ]); +if (memory_region_is_mapped (sc->serial_io[1 ])) { +memory_region_del_subregion (io, sc->serial_io[1 ]); + } + } +break ; + } +case 0xe7 :/* Serial port 1 io base address */ + { + data &=0xfe ; + sc->superio->serial[0 ]->ioport_id = data <<2 ; +if (memory_region_is_mapped (sc->serial_io[0 ])) { +memory_region_set_address (sc->serial_io[0 ], data <<2 ); + } +break ; + } +case 0xe8 :/* Serial port 2 io base address */ + { + data &=0xfe ; + sc->superio->serial[1 ]->ioport_id = data <<2 ; +if (memory_region_is_mapped (sc->serial_io[1 ])) { +memory_region_set_address (sc->serial_io[1 ], data <<2 ); + } +break ; + }default :qemu_log_mask (LOG_UNIMP ,"via_superio_cfg: unimplemented register 0x%x\n" , idx);
@@ -385,6 +447,7 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp)DeviceState *dev =DEVICE (d);ISABus *isa_bus;qemu_irq *isa_irq; +ISASuperIOClass *ic;int i;qdev_init_gpio_out (dev, &s->cpu_intr,1 );
@@ -394,7 +457,9 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp)isa_bus_irqs (isa_bus,i8259_init (isa_bus, *isa_irq));i8254_pit_init (isa_bus,0x40 ,0 ,NULL );i8257_dma_init (isa_bus,0 ); -isa_create_simple (isa_bus,TYPE_VT82C686B_SUPERIO ); + s->superio_cfg.superio =ISA_SUPERIO (isa_create_simple (isa_bus, +TYPE_VT82C686B_SUPERIO )); + ic =ISA_SUPERIO_GET_CLASS (s->superio_cfg.superio);mc146818_rtc_init (isa_bus,2000 ,NULL );for (i =0 ; i <PCI_CONFIG_HEADER_SIZE ; i++) {
@@ -412,6 +477,21 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp)*/ memory_region_add_subregion (isa_bus->address_space_io,0x3f0 , &s->superio_cfg.io); + +/* Grab io regions of serial devices so we can control them */ +for (i =0 ; i < ic->serial.count; i++) { +ISADevice *sd = s->superio_cfg.superio->serial[i]; +MemoryRegion *io =isa_address_space_io (sd); +MemoryRegion *mr =find_subregion (sd, io, sd->ioport_id); +if (!mr) { +error_setg (errp,"Could not get io region for serial %d" , i); +return ; + } + s->superio_cfg.serial_io[i] = mr; +if (memory_region_is_mapped (mr)) { +memory_region_del_subregion (io, mr); + } + } }static void via_class_init (ObjectClass *klass,void *data)
Signature · 1 line
2.21.3
PATCH v4 2/6 vt82c686: QOM-ify superio related functionality
In reply to BALATON ZoltanCollect superio functionality and its controlling config registers handling in an abstract VIA_SUPERIO class that is a subclass of ISA_SUPERIO and put vt82c686b specific parts in a subclass of this abstract class.
--- hw/isa/vt82c686.c | 240 ++++++++++++++++++++++++-------------- include/hw/isa/vt82c686.h | 1 - 2 files changed, 150 insertions(+), 91 deletions(-)
hw/isa/vt82c686.c +150 -90
@@ -249,12 +249,21 @@ static const TypeInfo vt8231_pm_info = { }; -typedef struct SuperIOConfig { +#define TYPE_VIA_SUPERIO "via-superio" +OBJECT_DECLARE_SIMPLE_TYPE(ViaSuperIOState, VIA_SUPERIO) + +struct ViaSuperIOState { +ISASuperIODevice superio;uint8_t regs[0x100 ]; +const MemoryRegionOps *io_ops;MemoryRegion io; -ISASuperIODevice *superio;MemoryRegion *serial_io[SUPERIO_MAX_SERIAL_PORTS ]; -}SuperIOConfig ; +}; + +static inline void via_superio_io_enable (ViaSuperIOState *s,bool enable) +{ +memory_region_set_enabled (&s->io, enable); +}static MemoryRegion *find_subregion (ISADevice *d,MemoryRegion *parent,int offs)
@@ -270,10 +279,76 @@ static MemoryRegion *find_subregion(ISADevice *d, MemoryRegion *parent,return mr; } -static void superio_cfg_write (void *opaque,hwaddr addr,uint64_t data, -unsigned size) +static void via_superio_realize (DeviceState *d,Error **errp) +{ +ViaSuperIOState *s =VIA_SUPERIO (d); +ISASuperIOClass *ic =ISA_SUPERIO_GET_CLASS (s); +int i; + +assert (s->io_ops); + ic->parent_realize (d, errp); +if (*errp) { +return ; + } +/* Grab io regions of serial devices so we can control them */ +for (i =0 ; i < ic->serial.count; i++) { +ISADevice *sd = s->superio.serial[i]; +MemoryRegion *io =isa_address_space_io (sd); +MemoryRegion *mr =find_subregion (sd, io, sd->ioport_id); +if (!mr) { +error_setg (errp,"Could not get io region for serial %d" , i); +return ; + } + s->serial_io[i] = mr; + } + +memory_region_init_io (&s->io,OBJECT (d), s->io_ops, s,"via-superio" ,2 ); +memory_region_set_enabled (&s->io, false); +/* The floppy also uses 0x3f0 and 0x3f1 but this seems to work anyway */ +memory_region_add_subregion (isa_address_space_io (ISA_DEVICE (s)),0x3f0 , + &s->io); +} + +static uint64_t via_superio_cfg_read (void *opaque,hwaddr addr,unsigned size) +{ +ViaSuperIOState *sc = opaque; +uint8_t idx = sc->regs[0 ]; +uint8_t val = sc->regs[idx]; + +if (addr ==0 ) { +return idx; + } +if (addr ==1 && idx ==0 ) { + val =0 ;/* reading reg 0 where we store index value */ + } +trace_via_superio_read (idx, val); +return val; +} + +static void via_superio_class_init (ObjectClass *klass,void *data) +{ +DeviceClass *dc =DEVICE_CLASS (klass); +ISASuperIOClass *sc =ISA_SUPERIO_CLASS (klass); + + sc->parent_realize = dc->realize; + dc->realize = via_superio_realize; +} + +static const TypeInfo via_superio_info = { + .name =TYPE_VIA_SUPERIO , + .parent =TYPE_ISA_SUPERIO , + .instance_size =sizeof (ViaSuperIOState), + .class_size =sizeof (ISASuperIOClass), + .class_init = via_superio_class_init, + .abstract = true, +}; + +#define TYPE_VT82C686B_SUPERIO "vt82c686b-superio" + +static void vt82c686b_superio_cfg_write (void *opaque,hwaddr addr, +uint64_t data,unsigned size) { -SuperIOConfig *sc = opaque; +ViaSuperIOState *sc = opaque;uint8_t idx = sc->regs[0 ];if (addr ==0 ) {/* config index register */
@@ -295,29 +370,29 @@ static void superio_cfg_write(void *opaque, hwaddr addr, uint64_t data, case 0xfd ... 0xff:/* ignore write to read only registers */ return ; -case 0xe2 : +case 0xe2 :/* Function select */ { data &=0x1f ;if (data &BIT (2 )) {/* Serial port 1 enable */ -ISADevice *dev = sc->superio->serial[0 ]; +ISADevice *dev = sc->superio.serial[0 ];if (!memory_region_is_mapped (sc->serial_io[0 ])) {memory_region_add_subregion (isa_address_space_io (dev), dev->ioport_id, sc->serial_io[0 ]); } }else { -MemoryRegion *io =isa_address_space_io (sc->superio->serial[0 ]); +MemoryRegion *io =isa_address_space_io (sc->superio.serial[0 ]);if (memory_region_is_mapped (sc->serial_io[0 ])) {memory_region_del_subregion (io, sc->serial_io[0 ]); } }if (data &BIT (3 )) {/* Serial port 2 enable */ -ISADevice *dev = sc->superio->serial[1 ]; +ISADevice *dev = sc->superio.serial[1 ];if (!memory_region_is_mapped (sc->serial_io[1 ])) {memory_region_add_subregion (isa_address_space_io (dev), dev->ioport_id, sc->serial_io[1 ]); } }else { -MemoryRegion *io =isa_address_space_io (sc->superio->serial[1 ]); +MemoryRegion *io =isa_address_space_io (sc->superio.serial[1 ]);if (memory_region_is_mapped (sc->serial_io[1 ])) {memory_region_del_subregion (io, sc->serial_io[1 ]); }
@@ -327,7 +402,7 @@ static void superio_cfg_write(void *opaque, hwaddr addr, uint64_t data,case 0xe7 :/* Serial port 1 io base address */ { data &=0xfe ; - sc->superio->serial[0 ]->ioport_id = data <<2 ; + sc->superio.serial[0 ]->ioport_id = data <<2 ;if (memory_region_is_mapped (sc->serial_io[0 ])) {memory_region_set_address (sc->serial_io[0 ], data <<2 ); }
@@ -336,7 +411,7 @@ static void superio_cfg_write(void *opaque, hwaddr addr, uint64_t data,case 0xe8 :/* Serial port 2 io base address */ { data &=0xfe ; - sc->superio->serial[1 ]->ioport_id = data <<2 ; + sc->superio.serial[1 ]->ioport_id = data <<2 ;if (memory_region_is_mapped (sc->serial_io[1 ])) {memory_region_set_address (sc->serial_io[1 ], data <<2 ); }
@@ -350,25 +425,9 @@ static void superio_cfg_write(void *opaque, hwaddr addr, uint64_t data, sc->regs[idx] = data; } -static uint64_t superio_cfg_read (void *opaque,hwaddr addr,unsigned size) -{ -SuperIOConfig *sc = opaque; -uint8_t idx = sc->regs[0 ]; -uint8_t val = sc->regs[idx]; - -if (addr ==0 ) { -return idx; - } -if (addr ==1 && idx ==0 ) { - val =0 ;/* reading reg 0 where we store index value */ - } -trace_via_superio_read (idx, val); -return val; -} - -static const MemoryRegionOps superio_cfg_ops = { - .read = superio_cfg_read, - .write = superio_cfg_write, +static const MemoryRegionOps vt82c686b_superio_cfg_ops = { + .read = via_superio_cfg_read, + .write = vt82c686b_superio_cfg_write, .endianness =DEVICE_NATIVE_ENDIAN , .impl = { .min_access_size =1 ,
@@ -376,13 +435,66 @@ static const MemoryRegionOps superio_cfg_ops = { }, }; +static void vt82c686b_superio_reset (DeviceState *dev) +{ +ViaSuperIOState *s =VIA_SUPERIO (dev); + +memset (s->regs,0 ,sizeof (s->regs)); +/* Device ID */ +vt82c686b_superio_cfg_write (s,0 ,0xe0 ,1 ); +vt82c686b_superio_cfg_write (s,1 ,0x3c ,1 ); +/* Function select - all disabled */ +vt82c686b_superio_cfg_write (s,0 ,0xe2 ,1 ); +vt82c686b_superio_cfg_write (s,1 ,0x03 ,1 ); +/* Floppy ctrl base addr */ +vt82c686b_superio_cfg_write (s,0 ,0xe3 ,1 ); +vt82c686b_superio_cfg_write (s,1 ,0xfc ,1 ); +/* Parallel port base addr */ +vt82c686b_superio_cfg_write (s,0 ,0xe6 ,1 ); +vt82c686b_superio_cfg_write (s,1 ,0xde ,1 ); +/* Serial port 1 base addr */ +vt82c686b_superio_cfg_write (s,0 ,0xe7 ,1 ); +vt82c686b_superio_cfg_write (s,1 ,0xfe ,1 ); +/* Serial port 2 base addr */ +vt82c686b_superio_cfg_write (s,0 ,0xe8 ,1 ); +vt82c686b_superio_cfg_write (s,1 ,0xbe ,1 ); + +vt82c686b_superio_cfg_write (s,0 ,0 ,1 ); +} + +static void vt82c686b_superio_init (Object *obj) +{ +VIA_SUPERIO (obj)->io_ops = &vt82c686b_superio_cfg_ops; +} + +static void vt82c686b_superio_class_init (ObjectClass *klass,void *data) +{ +DeviceClass *dc =DEVICE_CLASS (klass); +ISASuperIOClass *sc =ISA_SUPERIO_CLASS (klass); + + dc->reset = vt82c686b_superio_reset; + sc->serial.count =2 ; + sc->parallel.count =1 ; + sc->ide.count =0 ;/* emulated by via-ide */ + sc->floppy.count =1 ; +} + +static const TypeInfo vt82c686b_superio_info = { + .name =TYPE_VT82C686B_SUPERIO , + .parent =TYPE_VIA_SUPERIO , + .instance_size =sizeof (ViaSuperIOState), + .instance_init = vt82c686b_superio_init, + .class_size =sizeof (ISASuperIOClass), + .class_init = vt82c686b_superio_class_init, +}; + OBJECT_DECLARE_SIMPLE_TYPE(VT82C686BISAState, VT82C686B_ISA)struct VT82C686BISAState {PCIDevice dev;qemu_irq cpu_intr; -SuperIOConfig superio_cfg; +ViaSuperIOState *via_sio; };static void via_isa_request_i8259_irq (void *opaque,int irq,int level)
@@ -400,7 +512,7 @@ static void vt82c686b_write_config(PCIDevice *d, uint32_t addr,pci_default_write_config (d, addr, val, len);if (addr ==0x85 ) {/* BIT(1): enable or disable superio config io ports */ -memory_region_set_enabled (&s->superio_cfg.io, val &BIT (1 )); +via_superio_io_enable (s->via_sio, val &BIT (1 )); } }
@@ -432,13 +544,6 @@ static void vt82c686b_isa_reset(DeviceState *dev) pci_conf[0x5a ] =0x04 ;/* KBC/RTC Control*/ pci_conf[0x5f ] =0x04 ; pci_conf[0x77 ] =0x10 ;/* GPIO Control 1/2/3/4 */ - - s->superio_cfg.regs[0xe0 ] =0x3c ;/* Device ID */ - s->superio_cfg.regs[0xe2 ] =0x03 ;/* Function select */ - s->superio_cfg.regs[0xe3 ] =0xfc ;/* Floppy ctrl base addr */ - s->superio_cfg.regs[0xe6 ] =0xde ;/* Parallel port base addr */ - s->superio_cfg.regs[0xe7 ] =0xfe ;/* Serial port 1 base addr */ - s->superio_cfg.regs[0xe8 ] =0xbe ;/* Serial port 2 base addr */ }static void vt82c686b_realize (PCIDevice *d,Error **errp)
@@ -447,7 +552,6 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp)DeviceState *dev =DEVICE (d);ISABus *isa_bus;qemu_irq *isa_irq; -ISASuperIOClass *ic;int i;qdev_init_gpio_out (dev, &s->cpu_intr,1 );
@@ -457,9 +561,8 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp)isa_bus_irqs (isa_bus,i8259_init (isa_bus, *isa_irq));i8254_pit_init (isa_bus,0x40 ,0 ,NULL );i8257_dma_init (isa_bus,0 ); - s->superio_cfg.superio =ISA_SUPERIO (isa_create_simple (isa_bus, -TYPE_VT82C686B_SUPERIO )); - ic =ISA_SUPERIO_GET_CLASS (s->superio_cfg.superio); + s->via_sio =VIA_SUPERIO (isa_create_simple (isa_bus, +TYPE_VT82C686B_SUPERIO ));mc146818_rtc_init (isa_bus,2000 ,NULL );for (i =0 ; i <PCI_CONFIG_HEADER_SIZE ; i++) {
@@ -467,31 +570,6 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp) d->wmask[i] =0 ; } } - -memory_region_init_io (&s->superio_cfg.io,OBJECT (d), &superio_cfg_ops, - &s->superio_cfg,"superio_cfg" ,2 ); -memory_region_set_enabled (&s->superio_cfg.io, false); -/* -* The floppy also uses 0x3f0 and 0x3f1. -* But we do not emulate a floppy, so just set it here. -*/ -memory_region_add_subregion (isa_bus->address_space_io,0x3f0 , - &s->superio_cfg.io); - -/* Grab io regions of serial devices so we can control them */ -for (i =0 ; i < ic->serial.count; i++) { -ISADevice *sd = s->superio_cfg.superio->serial[i]; -MemoryRegion *io =isa_address_space_io (sd); -MemoryRegion *mr =find_subregion (sd, io, sd->ioport_id); -if (!mr) { -error_setg (errp,"Could not get io region for serial %d" , i); -return ; - } - s->superio_cfg.serial_io[i] = mr; -if (memory_region_is_mapped (mr)) { -memory_region_del_subregion (io, mr); - } - } }static void via_class_init (ObjectClass *klass,void *data)
@@ -527,32 +605,14 @@ static const TypeInfo via_info = { }; -static void vt82c686b_superio_class_init (ObjectClass *klass,void *data) -{ -ISASuperIOClass *sc =ISA_SUPERIO_CLASS (klass); - - sc->serial.count =2 ; - sc->parallel.count =1 ; - sc->ide.count =0 ; - sc->floppy.count =1 ; -} - -static const TypeInfo via_superio_info = { - .name =TYPE_VT82C686B_SUPERIO , - .parent =TYPE_ISA_SUPERIO , - .instance_size =sizeof (ISASuperIODevice), - .class_size =sizeof (ISASuperIOClass), - .class_init = vt82c686b_superio_class_init, -}; - -static void vt82c686b_register_types (void ) {type_register_static (&via_pm_info);type_register_static (&vt82c686b_pm_info);type_register_static (&vt8231_pm_info); -type_register_static (&via_info);type_register_static (&via_superio_info); +type_register_static (&vt82c686b_superio_info); +type_register_static (&via_info); }type_init (vt82c686b_register_types)
include/hw/isa/vt82c686.h +0 -1
@@ -2,7 +2,6 @@#define HW_VT82C686_H #define TYPE_VT82C686B_ISA "vt82c686b-isa" -#define TYPE_VT82C686B_SUPERIO "vt82c686b-superio"#define TYPE_VT82C686B_PM "vt82c686b-pm"#define TYPE_VT8231_PM "vt8231-pm"#define TYPE_VIA_AC97 "via-ac97"
Signature · 1 line
2.21.3
PATCH v4 3/6 vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO
In reply to BALATON ZoltanThe VT8231 south bridge is very similar to VT82C686B but there are some differences in register addresses and functionality, e.g. the VT8231 only has one serial port. This commit adds VT8231_SUPERIO subclass based on the abstract VIA_SUPERIO class to emulate the superio part of VT8231.
--- hw/isa/vt82c686.c | 121 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+)
hw/isa/vt82c686.c +121 -0
@@ -489,6 +489,126 @@ static const TypeInfo vt82c686b_superio_info = { }; +#define TYPE_VT8231_SUPERIO "vt8231-superio" + +static void vt8231_superio_cfg_write (void *opaque,hwaddr addr, +uint64_t data,unsigned size) +{ +ViaSuperIOState *sc = opaque; +uint8_t idx = sc->regs[0 ]; + +if (addr ==0 ) {/* config index register */ + sc->regs[0 ] = data; +return ; + } + +/* config data register */ +trace_via_superio_write (idx, data); +switch (idx) { + case 0x00 ... 0xdf: + case 0xe7 ... 0xef: + case 0xf0 ... 0xf1: +case 0xf5 : +case 0xf8 : +case 0xfd : +/* ignore write to read only registers */ +return ; +case 0xf2 :/* Function select */ + { + data &=0x17 ; +if (data &BIT (2 )) {/* Serial port enable */ +ISADevice *dev = sc->superio.serial[0 ]; +if (!memory_region_is_mapped (sc->serial_io[0 ])) { +memory_region_add_subregion (isa_address_space_io (dev), + dev->ioport_id, sc->serial_io[0 ]); + } + }else { +MemoryRegion *io =isa_address_space_io (sc->superio.serial[0 ]); +if (memory_region_is_mapped (sc->serial_io[0 ])) { +memory_region_del_subregion (io, sc->serial_io[0 ]); + } + } +break ; + } +case 0xf4 :/* Serial port io base address */ + { + data &=0xfe ; + sc->superio.serial[0 ]->ioport_id = data <<2 ; +if (memory_region_is_mapped (sc->serial_io[0 ])) { +memory_region_set_address (sc->serial_io[0 ], data <<2 ); + } +break ; + } +default : +qemu_log_mask (LOG_UNIMP , +"via_superio_cfg: unimplemented register 0x%x\n" , idx); +break ; + } + sc->regs[idx] = data; +} + +static const MemoryRegionOps vt8231_superio_cfg_ops = { + .read = via_superio_cfg_read, + .write = vt8231_superio_cfg_write, + .endianness =DEVICE_NATIVE_ENDIAN , + .impl = { + .min_access_size =1 , + .max_access_size =1 , + }, +}; + +static void vt8231_superio_reset (DeviceState *dev) +{ +ViaSuperIOState *s =VIA_SUPERIO (dev); + +memset (s->regs,0 ,sizeof (s->regs)); +/* Device ID */ + s->regs[0xf0 ] =0x3c ; +/* Device revision */ + s->regs[0xf1 ] =0x01 ; +/* Function select - all disabled */ +vt8231_superio_cfg_write (s,0 ,0xf2 ,1 ); +vt8231_superio_cfg_write (s,1 ,0x03 ,1 ); +/* Serial port base addr */ +vt8231_superio_cfg_write (s,0 ,0xf4 ,1 ); +vt8231_superio_cfg_write (s,1 ,0xfe ,1 ); +/* Parallel port base addr */ +vt8231_superio_cfg_write (s,0 ,0xf6 ,1 ); +vt8231_superio_cfg_write (s,1 ,0xde ,1 ); +/* Floppy ctrl base addr */ +vt8231_superio_cfg_write (s,0 ,0xf7 ,1 ); +vt8231_superio_cfg_write (s,1 ,0xfc ,1 ); + +vt8231_superio_cfg_write (s,0 ,0 ,1 ); +} + +static void vt8231_superio_init (Object *obj) +{ +VIA_SUPERIO (obj)->io_ops = &vt8231_superio_cfg_ops; +} + +static void vt8231_superio_class_init (ObjectClass *klass,void *data) +{ +DeviceClass *dc =DEVICE_CLASS (klass); +ISASuperIOClass *sc =ISA_SUPERIO_CLASS (klass); + + dc->reset = vt8231_superio_reset; + sc->serial.count =1 ; + sc->parallel.count =1 ; + sc->ide.count =0 ;/* emulated by via-ide */ + sc->floppy.count =1 ; +} + +static const TypeInfo vt8231_superio_info = { + .name =TYPE_VT8231_SUPERIO , + .parent =TYPE_VIA_SUPERIO , + .instance_size =sizeof (ViaSuperIOState), + .instance_init = vt8231_superio_init, + .class_size =sizeof (ISASuperIOClass), + .class_init = vt8231_superio_class_init, +}; + + OBJECT_DECLARE_SIMPLE_TYPE(VT82C686BISAState, VT82C686B_ISA)struct VT82C686BISAState {
@@ -612,6 +732,7 @@ static void vt82c686b_register_types(void)type_register_static (&vt8231_pm_info);type_register_static (&via_superio_info);type_register_static (&vt82c686b_superio_info); +type_register_static (&vt8231_superio_info);type_register_static (&via_info); }
Signature · 1 line
2.21.3
Re: [PATCH v4 3/6] vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO
Quoted 36 lines · BALATON Zoltan
The VT8231 south bridge is very similar to VT82C686B but there are some differences in register addresses and functionality, e.g. the VT8231 only has one serial port. This commit adds
VT8231_SUPERIOsubclass based on the abstractVIA_SUPERIOclass to emulate the superio part of VT8231.Signed-off-by BALATON Zoltan <[email protected]>--- hw/isa/vt82c686.c | 121 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+)hw/isa/vt82c686.c +17
-0@@ -489,6 +489,126 @@ static const TypeInfo vt82c686b_superio_info = { }; +#define TYPE_VT8231_SUPERIO "vt8231-superio" + +static void vt8231_superio_cfg_write (void *opaque,hwaddr addr, +uint64_t data,unsigned size) +{ +ViaSuperIOState *sc = opaque; +uint8_t idx = sc->regs[0 ]; + +if (addr ==0 ) {/* config index register */ + sc->regs[0 ] = data; +return ; + } + +/* config data register */ +trace_via_superio_write (idx, data); +switch (idx) { + case 0x00 ... 0xdf:
hw/isa/vt82c686.c static const TypeInfo vt82c686b_superio_info = { · line 518
Quoted 10 lines
hw/isa/vt82c686.c +10
-0+ case 0xe7 ... 0xef: + case 0xf0 ... 0xf1: +case 0xf5 : +case 0xf8 : +case 0xfd : +/* ignore write to read only registers */ +return ; +case 0xf2 :/* Function select */ + { + data &=0x17 ;
I'd prefer a definition for this mask (and @0xf4) but well...
Quoted 30 lines
hw/isa/vt82c686.c +30
-0+if (data &BIT (2 )) {/* Serial port enable */ +ISADevice *dev = sc->superio.serial[0 ]; +if (!memory_region_is_mapped (sc->serial_io[0 ])) { +memory_region_add_subregion (isa_address_space_io (dev), + dev->ioport_id, sc->serial_io[0 ]); + } + }else { +MemoryRegion *io =isa_address_space_io (sc->superio.serial[0 ]); +if (memory_region_is_mapped (sc->serial_io[0 ])) { +memory_region_del_subregion (io, sc->serial_io[0 ]); + } + } +break ; + } +case 0xf4 :/* Serial port io base address */ + { + data &=0xfe ; + sc->superio.serial[0 ]->ioport_id = data <<2 ; +if (memory_region_is_mapped (sc->serial_io[0 ])) { +memory_region_set_address (sc->serial_io[0 ], data <<2 ); + } +break ; + } +default : +qemu_log_mask (LOG_UNIMP , +"via_superio_cfg: unimplemented register 0x%x\n" , idx); +break ; + } + sc->regs[idx] = data; +}
PATCH v4 4/6 vt82c686: Add emulation of VT8231 south bridge
In reply to BALATON ZoltanAdd emulation of VT8231 south bridge ISA part based on the similar VT82C686B but implemented in a separate subclass that holds the differences while reusing parts that can be shared.
--- hw/isa/vt82c686.c | 154 ++++++++++++++++++++++++++++++-------- include/hw/isa/vt82c686.h | 1 + include/hw/pci/pci_ids.h | 3 +- 3 files changed, 126 insertions(+), 32 deletions(-)
hw/isa/vt82c686.c +123 -31
@@ -8,6 +8,9 @@* * Contributions after 2012-01-13 are licensed under the terms of the * GNU GPL, version 2 or (at your option) any later version. +* +* VT8231 south bridge support and general clean up to allow it +* Copyright (c) 2018-2020 BALATON Zoltan */ #include "qemu/osdep.h"
@@ -609,24 +612,48 @@ static const TypeInfo vt8231_superio_info = { }; -OBJECT_DECLARE_SIMPLE_TYPE(VT82C686BISAState, VT82C686B_ISA) +#define TYPE_VIA_ISA "via-isa" +OBJECT_DECLARE_SIMPLE_TYPE(ViaISAState, VIA_ISA) -struct VT82C686BISAState { +struct ViaISAState {PCIDevice dev;qemu_irq cpu_intr;ViaSuperIOState *via_sio; }; +static const VMStateDescription vmstate_via = { + .name ="via-isa" , + .version_id =1 , + .minimum_version_id =1 , + .fields = (VMStateField []) { +VMSTATE_PCI_DEVICE (dev, ViaISAState), +VMSTATE_END_OF_LIST () + } +}; + +static const TypeInfo via_isa_info = { + .name =TYPE_VIA_ISA , + .parent =TYPE_PCI_DEVICE , + .instance_size =sizeof (ViaISAState), + .abstract = true, + .interfaces = (InterfaceInfo []) { + {INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, +}; +static void via_isa_request_i8259_irq (void *opaque,int irq,int level) { -VT82C686BISAState *s = opaque; +ViaISAState *s = opaque;qemu_set_irq (s->cpu_intr, level); } +/* TYPE_VT82C686B_ISA */ +static void vt82c686b_write_config (PCIDevice *d,uint32_t addr,uint32_t val,int len) { -VT82C686BISAState *s =VT82C686B_ISA (d); +ViaISAState *s =VIA_ISA (d);trace_via_isa_write (addr, val, len);pci_default_write_config (d, addr, val, len);
@@ -636,19 +663,9 @@ static void vt82c686b_write_config(PCIDevice *d, uint32_t addr, } } -static const VMStateDescription vmstate_via = { - .name ="vt82c686b" , - .version_id =1 , - .minimum_version_id =1 , - .fields = (VMStateField []) { -VMSTATE_PCI_DEVICE (dev, VT82C686BISAState), -VMSTATE_END_OF_LIST () - } -}; -static void vt82c686b_isa_reset (DeviceState *dev) { -VT82C686BISAState *s =VT82C686B_ISA (dev); +ViaISAState *s =VIA_ISA (dev);uint8_t *pci_conf = s->dev.config;pci_set_long (pci_conf +PCI_CAPABILITY_LIST ,0x000000c0 );
@@ -668,7 +685,7 @@ static void vt82c686b_isa_reset(DeviceState *dev)static void vt82c686b_realize (PCIDevice *d,Error **errp) { -VT82C686BISAState *s =VT82C686B_ISA (d); +ViaISAState *s =VIA_ISA (d);DeviceState *dev =DEVICE (d);ISABus *isa_bus;qemu_irq *isa_irq;
@@ -692,7 +709,7 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp) } } -static void via_class_init (ObjectClass *klass,void *data) +static void vt82c686b_class_init (ObjectClass *klass,void *data) {DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass);
@@ -700,28 +717,101 @@ static void via_class_init(ObjectClass *klass, void *data) k->realize = vt82c686b_realize; k->config_write = vt82c686b_write_config; k->vendor_id =PCI_VENDOR_ID_VIA ; - k->device_id =PCI_DEVICE_ID_VIA_ISA_BRIDGE ; + k->device_id =PCI_DEVICE_ID_VIA_82C686B_ISA ; k->class_id =PCI_CLASS_BRIDGE_ISA ; k->revision =0x40 ; dc->reset = vt82c686b_isa_reset; dc->desc ="ISA bridge" ; dc->vmsd = &vmstate_via; -/* -* Reason: part of VIA VT82C686 southbridge, needs to be wired up, -* e.g. by mips_fuloong2e_init() -*/ +/* Reason: part of VIA VT82C686 southbridge, needs to be wired up */ dc->user_creatable = false; } -static const TypeInfo via_info = { +static const TypeInfo vt82c686b_isa_info = { .name =TYPE_VT82C686B_ISA , - .parent =TYPE_PCI_DEVICE , - .instance_size =sizeof (VT82C686BISAState), - .class_init = via_class_init, - .interfaces = (InterfaceInfo []) { - {INTERFACE_CONVENTIONAL_PCI_DEVICE }, - { }, - }, + .parent =TYPE_VIA_ISA , + .instance_size =sizeof (ViaISAState), + .class_init = vt82c686b_class_init, +}; + +/* TYPE_VT8231_ISA */ + +static void vt8231_write_config (PCIDevice *d,uint32_t addr, +uint32_t val,int len) +{ +ViaISAState *s =VIA_ISA (d); + +trace_via_isa_write (addr, val, len); +pci_default_write_config (d, addr, val, len); +if (addr ==0x50 ) { +/* BIT(2): enable or disable superio config io ports */ +via_superio_io_enable (s->via_sio, val &BIT (2 )); + } +} + +static void vt8231_isa_reset (DeviceState *dev) +{ +ViaISAState *s =VIA_ISA (dev); +uint8_t *pci_conf = s->dev.config; + +pci_set_long (pci_conf +PCI_CAPABILITY_LIST ,0x000000c0 ); +pci_set_word (pci_conf +PCI_COMMAND ,PCI_COMMAND_IO |PCI_COMMAND_MEMORY | +PCI_COMMAND_MASTER |PCI_COMMAND_SPECIAL ); +pci_set_word (pci_conf +PCI_STATUS ,PCI_STATUS_DEVSEL_MEDIUM ); + + pci_conf[0x58 ] =0x40 ;/* Miscellaneous Control 0 */ + pci_conf[0x67 ] =0x08 ;/* Fast IR Config */ + pci_conf[0x6b ] =0x01 ;/* Fast IR I/O Base */ +} + +static void vt8231_realize (PCIDevice *d,Error **errp) +{ +ViaISAState *s =VIA_ISA (d); +DeviceState *dev =DEVICE (d); +ISABus *isa_bus; +qemu_irq *isa_irq; +int i; + +qdev_init_gpio_out (dev, &s->cpu_intr,1 ); + isa_irq =qemu_allocate_irqs (via_isa_request_i8259_irq, s,1 ); + isa_bus =isa_bus_new (dev,get_system_memory (),pci_address_space_io (d), + &error_fatal); +isa_bus_irqs (isa_bus,i8259_init (isa_bus, *isa_irq)); +i8254_pit_init (isa_bus,0x40 ,0 ,NULL ); +i8257_dma_init (isa_bus,0 ); + s->via_sio =VIA_SUPERIO (isa_create_simple (isa_bus,TYPE_VT8231_SUPERIO )); +mc146818_rtc_init (isa_bus,2000 ,NULL ); + +for (i =0 ; i <PCI_CONFIG_HEADER_SIZE ; i++) { +if (i <PCI_COMMAND || i >=PCI_REVISION_ID ) { + d->wmask[i] =0 ; + } + } +} + +static void vt8231_class_init (ObjectClass *klass,void *data) +{ +DeviceClass *dc =DEVICE_CLASS (klass); +PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); + + k->realize = vt8231_realize; + k->config_write = vt8231_write_config; + k->vendor_id =PCI_VENDOR_ID_VIA ; + k->device_id =PCI_DEVICE_ID_VIA_8231_ISA ; + k->class_id =PCI_CLASS_BRIDGE_ISA ; + k->revision =0x10 ; + dc->reset = vt8231_isa_reset; + dc->desc ="ISA bridge" ; + dc->vmsd = &vmstate_via; +/* Reason: part of VIA VT8231 southbridge, needs to be wired up */ + dc->user_creatable = false; +} + +static const TypeInfo vt8231_isa_info = { + .name =TYPE_VT8231_ISA , + .parent =TYPE_VIA_ISA , + .instance_size =sizeof (ViaISAState), + .class_init = vt8231_class_init, };
@@ -733,7 +823,9 @@ static void vt82c686b_register_types(void)type_register_static (&via_superio_info);type_register_static (&vt82c686b_superio_info);type_register_static (&vt8231_superio_info); -type_register_static (&via_info); +type_register_static (&via_isa_info); +type_register_static (&vt82c686b_isa_info); +type_register_static (&vt8231_isa_info); }type_init (vt82c686b_register_types)
include/hw/isa/vt82c686.h +1 -0
@@ -3,6 +3,7 @@#define TYPE_VT82C686B_ISA "vt82c686b-isa"#define TYPE_VT82C686B_PM "vt82c686b-pm" +#define TYPE_VT8231_ISA "vt8231-isa"#define TYPE_VT8231_PM "vt8231-pm"#define TYPE_VIA_AC97 "via-ac97"#define TYPE_VIA_MC97 "via-mc97"
include/hw/pci/pci_ids.h +2 -1
@@ -204,12 +204,13 @@#define PCI_VENDOR_ID_XILINX 0x10ee#define PCI_VENDOR_ID_VIA 0x1106 -#define PCI_DEVICE_ID_VIA_ISA_BRIDGE 0x0686 +#define PCI_DEVICE_ID_VIA_82C686B_ISA 0x0686#define PCI_DEVICE_ID_VIA_IDE 0x0571#define PCI_DEVICE_ID_VIA_UHCI 0x3038#define PCI_DEVICE_ID_VIA_82C686B_PM 0x3057#define PCI_DEVICE_ID_VIA_AC97 0x3058#define PCI_DEVICE_ID_VIA_MC97 0x3068 +#define PCI_DEVICE_ID_VIA_8231_ISA 0x8231#define PCI_DEVICE_ID_VIA_8231_PM 0x8235#define PCI_VENDOR_ID_MARVELL 0x11ab
Signature · 1 line
2.21.3
Re: [PATCH v4 4/6] vt82c686: Add emulation of VT8231 south bridge
Quoted 140 lines · BALATON Zoltan
Add emulation of VT8231 south bridge ISA part based on the similar VT82C686B but implemented in a separate subclass that holds the differences while reusing parts that can be shared.
Signed-off-by BALATON Zoltan <[email protected]>--- hw/isa/vt82c686.c | 154 ++++++++++++++++++++++++++++++-------- include/hw/isa/vt82c686.h | 1 + include/hw/pci/pci_ids.h | 3 +- 3 files changed, 126 insertions(+), 32 deletions(-)hw/isa/vt82c686.c +37
-24@@ -8,6 +8,9 @@* * Contributions after 2012-01-13 are licensed under the terms of the * GNU GPL, version 2 or (at your option) any later version. +* +* VT8231 south bridge support and general clean up to allow it +* Copyright (c) 2018-2020 BALATON Zoltan */ #include "qemu/osdep.h" @@ -609,24 +612,48 @@ static const TypeInfo vt8231_superio_info = { }; -OBJECT_DECLARE_SIMPLE_TYPE(VT82C686BISAState, VT82C686B_ISA) +#define TYPE_VIA_ISA "via-isa" +OBJECT_DECLARE_SIMPLE_TYPE(ViaISAState, VIA_ISA) -struct VT82C686BISAState { +struct ViaISAState {PCIDevice dev;qemu_irq cpu_intr;ViaSuperIOState *via_sio; }; +static const VMStateDescription vmstate_via = { + .name ="via-isa" , + .version_id =1 , + .minimum_version_id =1 , + .fields = (VMStateField []) { +VMSTATE_PCI_DEVICE (dev, ViaISAState), +VMSTATE_END_OF_LIST () + } +}; + +static const TypeInfo via_isa_info = { + .name =TYPE_VIA_ISA , + .parent =TYPE_PCI_DEVICE , + .instance_size =sizeof (ViaISAState), + .abstract = true, + .interfaces = (InterfaceInfo []) { + {INTERFACE_CONVENTIONAL_PCI_DEVICE }, + { }, + }, +}; +static void via_isa_request_i8259_irq (void *opaque,int irq,int level) { -VT82C686BISAState *s = opaque; +ViaISAState *s = opaque;qemu_set_irq (s->cpu_intr, level); } +/* TYPE_VT82C686B_ISA */ +static void vt82c686b_write_config (PCIDevice *d,uint32_t addr,uint32_t val,int len) { -VT82C686BISAState *s =VT82C686B_ISA (d); +ViaISAState *s =VIA_ISA (d);trace_via_isa_write (addr, val, len);pci_default_write_config (d, addr, val, len);@@ -636,19 +663,9 @@ static void vt82c686b_write_config(PCIDevice *d, uint32_t addr, } } -static const VMStateDescription vmstate_via = { - .name ="vt82c686b" , - .version_id =1 , - .minimum_version_id =1 , - .fields = (VMStateField []) { -VMSTATE_PCI_DEVICE (dev, VT82C686BISAState), -VMSTATE_END_OF_LIST () - } -}; -static void vt82c686b_isa_reset (DeviceState *dev) { -VT82C686BISAState *s =VT82C686B_ISA (dev); +ViaISAState *s =VIA_ISA (dev);uint8_t *pci_conf = s->dev.config;pci_set_long (pci_conf +PCI_CAPABILITY_LIST ,0x000000c0 );@@ -668,7 +685,7 @@ static void vt82c686b_isa_reset(DeviceState *dev)static void vt82c686b_realize (PCIDevice *d,Error **errp) { -VT82C686BISAState *s =VT82C686B_ISA (d); +ViaISAState *s =VIA_ISA (d);DeviceState *dev =DEVICE (d);ISABus *isa_bus;qemu_irq *isa_irq;@@ -692,7 +709,7 @@ static void vt82c686b_realize(PCIDevice *d, Error **errp) } } -static void via_class_init (ObjectClass *klass,void *data) +static void vt82c686b_class_init (ObjectClass *klass,void *data) {DeviceClass *dc =DEVICE_CLASS (klass);PCIDeviceClass *k =PCI_DEVICE_CLASS (klass);@@ -700,28 +717,101 @@ static void via_class_init(ObjectClass *klass, void *data) k->realize = vt82c686b_realize; k->config_write = vt82c686b_write_config; k->vendor_id =PCI_VENDOR_ID_VIA ; - k->device_id =PCI_DEVICE_ID_VIA_ISA_BRIDGE ; + k->device_id =PCI_DEVICE_ID_VIA_82C686B_ISA ; k->class_id =PCI_CLASS_BRIDGE_ISA ; k->revision =0x40 ; dc->reset = vt82c686b_isa_reset; dc->desc ="ISA bridge" ; dc->vmsd = &vmstate_via; -/* -* Reason: part of VIA VT82C686 southbridge, needs to be wired up, -* e.g. by mips_fuloong2e_init() -*/ +/* Reason: part of VIA VT82C686 southbridge, needs to be wired up */ dc->user_creatable = false; } -static const TypeInfo via_info = { +static const TypeInfo vt82c686b_isa_info = { .name =TYPE_VT82C686B_ISA , - .parent =TYPE_PCI_DEVICE ,
hw/isa/vt82c686.c static void via_class_init(ObjectClass *klass, void *data) · line 735
Quoted 10 lines
hw/isa/vt82c686.c +4
-6- .instance_size = sizeof(VT82C686BISAState), - .class_init = via_class_init, - .interfaces = (InterfaceInfo []) { - {INTERFACE_CONVENTIONAL_PCI_DEVICE }, - { }, - }, + .parent = TYPE_VIA_ISA, + .instance_size = sizeof(ViaISAState), + .class_init = vt82c686b_class_init, +};
Please split patch in 2:
1/ Extract common TYPE_VIA_ISA from TYPE_VT82C686B_ISA, make it abstract, and rename VT82C686BISAState as ViaISAState -- up to here.
Then following as 2/ Introduce TYPE_VT8231_ISA.
Quoted 125 lines
hw/isa/vt82c686.c +82
-1+ +/* TYPE_VT8231_ISA */ + +static void vt8231_write_config (PCIDevice *d,uint32_t addr, +uint32_t val,int len) +{ +ViaISAState *s =VIA_ISA (d); + +trace_via_isa_write (addr, val, len); +pci_default_write_config (d, addr, val, len); +if (addr ==0x50 ) { +/* BIT(2): enable or disable superio config io ports */ +via_superio_io_enable (s->via_sio, val &BIT (2 )); + } +} + +static void vt8231_isa_reset (DeviceState *dev) +{ +ViaISAState *s =VIA_ISA (dev); +uint8_t *pci_conf = s->dev.config; + +pci_set_long (pci_conf +PCI_CAPABILITY_LIST ,0x000000c0 ); +pci_set_word (pci_conf +PCI_COMMAND ,PCI_COMMAND_IO |PCI_COMMAND_MEMORY | +PCI_COMMAND_MASTER |PCI_COMMAND_SPECIAL ); +pci_set_word (pci_conf +PCI_STATUS ,PCI_STATUS_DEVSEL_MEDIUM ); + + pci_conf[0x58 ] =0x40 ;/* Miscellaneous Control 0 */ + pci_conf[0x67 ] =0x08 ;/* Fast IR Config */ + pci_conf[0x6b ] =0x01 ;/* Fast IR I/O Base */ +} + +static void vt8231_realize (PCIDevice *d,Error **errp) +{ +ViaISAState *s =VIA_ISA (d); +DeviceState *dev =DEVICE (d); +ISABus *isa_bus; +qemu_irq *isa_irq; +int i; + +qdev_init_gpio_out (dev, &s->cpu_intr,1 ); + isa_irq =qemu_allocate_irqs (via_isa_request_i8259_irq, s,1 ); + isa_bus =isa_bus_new (dev,get_system_memory (),pci_address_space_io (d), + &error_fatal); +isa_bus_irqs (isa_bus,i8259_init (isa_bus, *isa_irq)); +i8254_pit_init (isa_bus,0x40 ,0 ,NULL ); +i8257_dma_init (isa_bus,0 ); + s->via_sio =VIA_SUPERIO (isa_create_simple (isa_bus,TYPE_VT8231_SUPERIO )); +mc146818_rtc_init (isa_bus,2000 ,NULL ); + +for (i =0 ; i <PCI_CONFIG_HEADER_SIZE ; i++) { +if (i <PCI_COMMAND || i >=PCI_REVISION_ID ) { + d->wmask[i] =0 ; + } + } +} + +static void vt8231_class_init (ObjectClass *klass,void *data) +{ +DeviceClass *dc =DEVICE_CLASS (klass); +PCIDeviceClass *k =PCI_DEVICE_CLASS (klass); + + k->realize = vt8231_realize; + k->config_write = vt8231_write_config; + k->vendor_id =PCI_VENDOR_ID_VIA ; + k->device_id =PCI_DEVICE_ID_VIA_8231_ISA ; + k->class_id =PCI_CLASS_BRIDGE_ISA ; + k->revision =0x10 ; + dc->reset = vt8231_isa_reset; + dc->desc ="ISA bridge" ; + dc->vmsd = &vmstate_via; +/* Reason: part of VIA VT8231 southbridge, needs to be wired up */ + dc->user_creatable = false; +} + +static const TypeInfo vt8231_isa_info = { + .name =TYPE_VT8231_ISA , + .parent =TYPE_VIA_ISA , + .instance_size =sizeof (ViaISAState), + .class_init = vt8231_class_init, };@@ -733,7 +823,9 @@ static void vt82c686b_register_types(void)type_register_static (&via_superio_info);type_register_static (&vt82c686b_superio_info);type_register_static (&vt8231_superio_info); -type_register_static (&via_info); +type_register_static (&via_isa_info); +type_register_static (&vt82c686b_isa_info); +type_register_static (&vt8231_isa_info); }type_init (vt82c686b_register_types)include/hw/isa/vt82c686.h +1
-0@@ -3,6 +3,7 @@#define TYPE_VT82C686B_ISA "vt82c686b-isa"#define TYPE_VT82C686B_PM "vt82c686b-pm" +#define TYPE_VT8231_ISA "vt8231-isa"#define TYPE_VT8231_PM "vt8231-pm"#define TYPE_VIA_AC97 "via-ac97"#define TYPE_VIA_MC97 "via-mc97"include/hw/pci/pci_ids.h +2
-1@@ -204,12 +204,13 @@#define PCI_VENDOR_ID_XILINX 0x10ee#define PCI_VENDOR_ID_VIA 0x1106 -#define PCI_DEVICE_ID_VIA_ISA_BRIDGE 0x0686 +#define PCI_DEVICE_ID_VIA_82C686B_ISA 0x0686#define PCI_DEVICE_ID_VIA_IDE 0x0571#define PCI_DEVICE_ID_VIA_UHCI 0x3038#define PCI_DEVICE_ID_VIA_82C686B_PM 0x3057#define PCI_DEVICE_ID_VIA_AC97 0x3058#define PCI_DEVICE_ID_VIA_MC97 0x3068 +#define PCI_DEVICE_ID_VIA_8231_ISA 0x8231#define PCI_DEVICE_ID_VIA_8231_PM 0x8235#define PCI_VENDOR_ID_MARVELL 0x11ab
PATCH v4 5/6 hw/pci-host: Add emulation of Marvell MV64361 PPC system controller
In reply to BALATON ZoltanThe Marvell Discovery II aka. MV64361 is a PowerPC system controller chip that is used on the pegasos2 PPC board. This adds emulation of it that models the device enough to boot guests on this board. The mv643xx.h header with register definitions is taken from Linux 4.15.10 only fixing end of line white space errors and removing not needed parts, it's otherwise keeps Linux formatting.
--- hw/pci-host/Kconfig | 3 + hw/pci-host/meson.build | 2 + hw/pci-host/mv64361.c | 966 ++++++++++++++++++++++++++++++++++ hw/pci-host/mv643xx.h | 919 ++++++++++++++++++++++++++++++++ hw/pci-host/trace-events | 6 + include/hw/pci-host/mv64361.h | 8 + include/hw/pci/pci_ids.h | 1 + 7 files changed, 1905 insertions(+) create mode 100644 hw/pci-host/mv64361.c create mode 100644 hw/pci-host/mv643xx.h create mode 100644 include/hw/pci-host/mv64361.h
hw/pci-host/Kconfig +3 -0
@@ -68,3 +68,6 @@ config PCI_POWERNV config REMOTE_PCIHOST bool + +config MV64361 + bool
hw/pci-host/meson.build +2 -0
@@ -18,6 +18,8 @@ pci_ss.add(when: 'CONFIG_GRACKLE_PCI', if_true: files('grackle.c')) pci_ss.add(when: 'CONFIG_UNIN_PCI', if_true: files('uninorth.c')) # PowerPC E500 boards pci_ss.add(when: 'CONFIG_PPCE500_PCI', if_true: files('ppce500.c')) +# Pegasos2 +pci_ss.add(when: 'CONFIG_MV64361', if_true: files('mv64361.c')) # ARM devices pci_ss.add(when: 'CONFIG_VERSATILE_PCI', if_true: files('versatile.c'))
hw/pci-host/mv64361.c new file +966 -0
966 lines not on this page · raw message
hw/pci-host/mv643xx.h new file +919 -0
919 lines not on this page · raw message
hw/pci-host/trace-events +6 -0
@@ -3,6 +3,12 @@ # grackle.c grackle_set_irq(int irq_num, int level) "set_irq num %d level %d" +# mv64361.c +mv64361_region_map(const char *name, uint64_t poffs, uint64_t size, uint64_t moffs) "Mapping %s 0x%"PRIx64"+0x%"PRIx64" @ 0x%"PRIx64 +mv64361_region_enable(const char *op, int num) "Should %s region %d" +mv64361_reg_read(uint64_t addr, uint32_t val) "0x%"PRIx64" -> 0x%x" +mv64361_reg_write(uint64_t addr, uint64_t val) "0x%"PRIx64" <- 0x%"PRIx64 + # sabre.c sabre_set_request(int irq_num) "request irq %d" sabre_clear_request(int irq_num) "clear request irq %d"
include/hw/pci-host/mv64361.h new file +8 -0
@@ -0,0 +1,8 @@ +#ifndef MV64361_H +#define MV64361_H + +#define TYPE_MV64361 "mv64361" + +PCIBus *mv64361_get_pci_bus (DeviceState *dev,int n); + +#endif
include/hw/pci/pci_ids.h +1 -0
@@ -214,6 +214,7 @@#define PCI_DEVICE_ID_VIA_8231_PM 0x8235#define PCI_VENDOR_ID_MARVELL 0x11ab +#define PCI_DEVICE_ID_MARVELL_MV6436X 0x6460#define PCI_VENDOR_ID_SILICON_MOTION 0x126f#define PCI_DEVICE_ID_SM501 0x0501
Signature · 1 line
2.21.3
Re: [PATCH v4 5/6] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller
Quoted 7 lines · BALATON Zoltan
The Marvell Discovery II aka. MV64361 is a PowerPC system controller chip that is used on the pegasos2 PPC board. This adds emulation of it that models the device enough to boot guests on this board. The
mv643xx.hheader with register definitions is taken from Linux 4.15.10 only fixing end of line white space errors and removing not needed parts, it's otherwise keeps Linux formatting.
Quoted 6 lines
Signed-off-by BALATON Zoltan <[email protected]>--- hw/pci-host/Kconfig | 3 + hw/pci-host/meson.build | 2 + hw/pci-host/mv64361.c | 966 ++++++++++++++++++++++++++++++++++ hw/pci-host/mv643xx.h | 919 ++++++++++++++++++++++++++++++++
Maybe name this one mv643xx_regs.h?
Quoted 14 lines
hw/pci-host/trace-events | 6 + include/hw/pci-host/mv64361.h | 8 + include/hw/pci/pci_ids.h | 1 + 7 files changed, 1905 insertions(+) create mode 100644 hw/pci-host/mv64361.c create mode 100644 hw/pci-host/mv643xx.h create mode 100644 include/hw/pci-host/mv64361.hhw/pci-host/Kconfig +0
-0
hw/pci-host/Kconfig config PCI_POWERNV · line 73
Quoted 6 lines
hw/pci-host/Kconfig +3
-0@@ -68,3 +68,6 @@ config PCI_POWERNV config REMOTE_PCIHOST bool + +config MV64361 + bool
Missing:
select PCI
Re: [PATCH v4 5/6] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller
Quoted 8 lines · Philippe Mathieu-Daudé
Quoted 7 lines · BALATON Zoltan
The Marvell Discovery II aka. MV64361 is a PowerPC system controller chip that is used on the pegasos2 PPC board. This adds emulation of it that models the device enough to boot guests on this board. The
mv643xx.hheader with register definitions is taken from Linux 4.15.10 only fixing end of line white space errors and removing not needed parts, it's otherwise keeps Linux formatting.
Quoted 8 lines
Quoted 6 lines
Signed-off-by BALATON Zoltan <[email protected]>--- hw/pci-host/Kconfig | 3 + hw/pci-host/meson.build | 2 + hw/pci-host/mv64361.c | 966 ++++++++++++++++++++++++++++++++++ hw/pci-host/mv643xx.h | 919 ++++++++++++++++++++++++++++++++Maybe name this one
mv643xx_regs.h?
This comes originally from Linux where it had this name so to make it simpler to find where it comes from I've kept the name for now. If we ever change the contents beyond just formatting it could be renamed too.
Regards,
BALATON Zoltan
Quoted 26 lines
Quoted 14 lines
hw/pci-host/trace-events | 6 + include/hw/pci-host/mv64361.h | 8 + include/hw/pci/pci_ids.h | 1 + 7 files changed, 1905 insertions(+) create mode 100644 hw/pci-host/mv64361.c create mode 100644 hw/pci-host/mv643xx.h create mode 100644 include/hw/pci-host/mv64361.hhw/pci-host/Kconfig +0
-0hw/pci-host/Kconfig config PCI_POWERNV · line 73
Quoted 6 lines
hw/pci-host/Kconfig +3
-0@@ -68,3 +68,6 @@ config PCI_POWERNV config REMOTE_PCIHOST bool + +config MV64361 + boolMissing:
select PCI
PATCH v4 6/6 hw/ppc: Add emulation of Genesi/bPlan Pegasos II
In reply to BALATON ZoltanAdd new machine called pegasos2 emulating the Genesi/bPlan Pegasos II, a PowerPC board based on the Marvell MV64361 system controller and the VIA VT8231 integrated south bridge/superio chips. It can run Linux, AmigaOS and a wide range of MorphOS versions. Currently a firmware ROM image is needed to boot and only MorphOS has a video driver to produce graphics output. Linux could work too but distros that supported this machine don't include usual video drivers so those only run with serial console for now.
--- MAINTAINERS | 10 ++ default-configs/devices/ppc-softmmu.mak | 2 + hw/ppc/Kconfig | 10 ++ hw/ppc/meson.build | 2 + hw/ppc/pegasos2.c | 144 ++++++++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 hw/ppc/pegasos2.c
MAINTAINERS +10 -0
@@ -1345,6 +1345,16 @@ F: pc-bios/canyonlands.dt[sb] F: pc-bios/u-boot-sam460ex-20100605.bin F: roms/u-boot-sam460ex +pegasos2 +M: BALATON Zoltan <[email protected]> +R: David Gibson <[email protected]> +L: [email protected] +S: Maintained +F: hw/ppc/pegasos2.c +F: hw/pci-host/mv64361.c +F: hw/pci-host/mv643xx.h +F: include/hw/pci-host/mv64361.h + RISC-V Machines --------------- OpenTitan
default-configs/devices/ppc-softmmu.mak +2 -0
@@ -14,5 +14,7 @@ CONFIG_SAM460EX=y CONFIG_MAC_OLDWORLD=y CONFIG_MAC_NEWWORLD=y +CONFIG_PEGASOS2=y + # For PReP CONFIG_PREP=y
hw/ppc/Kconfig +10 -0
@@ -68,6 +68,16 @@ config SAM460EX select USB_OHCI select FDT_PPC +config PEGASOS2 + bool + select MV64361 + select VT82C686 + select IDE_VIA + select SMBUS_EEPROM +# These should come with VT82C686 + select APM + select ACPI_X86 + config PREP bool imply PCI_DEVICES
hw/ppc/meson.build +2 -0
@@ -78,5 +78,7 @@ ppc_ss.add(when: 'CONFIG_E500', if_true: files( )) # PowerPC 440 Xilinx ML507 reference board. ppc_ss.add(when: 'CONFIG_VIRTEX', if_true: files('virtex_ml507.c')) +# Pegasos2 +ppc_ss.add(when: 'CONFIG_PEGASOS2', if_true: files('pegasos2.c')) hw_arch += {'ppc': ppc_ss}
hw/ppc/pegasos2.c new file +144 -0
144 lines not on this page · raw message
Signature · 1 line
2.21.3
Re: [PATCH v4 6/6] hw/ppc: Add emulation of Genesi/bPlan Pegasos II
Quoted 24 lines · BALATON Zoltan
Add new machine called pegasos2 emulating the Genesi/bPlan Pegasos II, a PowerPC board based on the Marvell MV64361 system controller and the VIA VT8231 integrated south bridge/superio chips. It can run Linux, AmigaOS and a wide range of MorphOS versions. Currently a firmware ROM image is needed to boot and only MorphOS has a video driver to produce graphics output. Linux could work too but distros that supported this machine don't include usual video drivers so those only run with serial console for now.
Signed-off-by BALATON Zoltan <[email protected]>--- MAINTAINERS | 10 ++ default-configs/devices/ppc-softmmu.mak | 2 + hw/ppc/Kconfig | 10 ++ hw/ppc/meson.build | 2 + hw/ppc/pegasos2.c | 144 ++++++++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 hw/ppc/pegasos2.cMAINTAINERS +0
-0
MAINTAINERS F: pc-bios/canyonlands.dt[sb] · line 1350
Quoted 6 lines
MAINTAINERS +3
-0@@ -1345,6 +1345,16 @@ F: pc-bios/canyonlands.dt[sb] F: pc-bios/u-boot-sam460ex-20100605.bin F: roms/u-boot-sam460ex +pegasos2 +M: BALATON Zoltan <[email protected]> +R: David Gibson <[email protected]>
:)
Quoted 61 lines
MAINTAINERS +7
-0+L: [email protected] +S: Maintained +F: hw/ppc/pegasos2.c +F: hw/pci-host/mv64361.c +F: hw/pci-host/mv643xx.h +F: include/hw/pci-host/mv64361.h + RISC-V Machines --------------- OpenTitandefault-configs/devices/ppc-softmmu.mak +2
-0@@ -14,5 +14,7 @@ CONFIG_SAM460EX=y CONFIG_MAC_OLDWORLD=y CONFIG_MAC_NEWWORLD=y +CONFIG_PEGASOS2=y + # For PReP CONFIG_PREP=yhw/ppc/Kconfig +10
-0@@ -68,6 +68,16 @@ config SAM460EX select USB_OHCI select FDT_PPC +config PEGASOS2 + bool + select MV64361 + select VT82C686 + select IDE_VIA + select SMBUS_EEPROM +# These should come with VT82C686 + select APM + select ACPI_X86 + config PREP bool imply PCI_DEVICEShw/ppc/meson.build +2
-0@@ -78,5 +78,7 @@ ppc_ss.add(when: 'CONFIG_E500', if_true: files( )) # PowerPC 440 Xilinx ML507 reference board. ppc_ss.add(when: 'CONFIG_VIRTEX', if_true: files('virtex_ml507.c')) +# Pegasos2 +ppc_ss.add(when: 'CONFIG_PEGASOS2', if_true: files('pegasos2.c')) hw_arch += {'ppc': ppc_ss}hw/ppc/pegasos2.c new file +0
-0
hw/ppc/pegasos2.c line 4
Quoted 4 lines
hw/ppc/pegasos2.c new file +4
-0@@ -0,0 +1,144 @@ +/* +* QEMU PowerPC CHRP (Genesi/bPlan Pegasos II) hardware System Emulator +* +* Copyright (c) 2018-2020 BALATON Zoltan
2018-2021
Quoted 28 lines
hw/ppc/pegasos2.c new file +28
-0+* +* This work is licensed under the GNU GPL license version 2 or later. +* +*/ + +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "qemu/units.h" +#include "qapi/error.h" +#include "hw/hw.h" +#include "hw/ppc/ppc.h" +#include "hw/sysbus.h" +#include "hw/pci/pci_host.h" +#include "hw/irq.h" +#include "hw/pci-host/mv64361.h" +#include "hw/isa/vt82c686.h" +#include "hw/ide/pci.h" +#include "hw/i2c/smbus_eeprom.h" +#include "hw/qdev-properties.h" +#include "sysemu/reset.h" +#include "hw/boards.h" +#include "hw/loader.h" +#include "hw/fw-path-provider.h" +#include "elf.h" +#include "qemu/log.h" +#include "qemu/error-report.h" +#include "sysemu/kvm.h" +#include "kvm_ppc.h"
hw/ppc/pegasos2.c line 42
Quoted 10 lines
hw/ppc/pegasos2.c new file +10
-0+#include "exec/address-spaces.h" +#include "trace.h" +#include "qemu/datadir.h" +#include "sysemu/device_tree.h" + +#define PROM_FILENAME "pegasos2.rom" +#define PROM_ADDR 0xfff00000 +#define PROM_SIZE 0x80000 + +#define BUS_FREQ 133333333
Can you rename as BUS_FREQ_HZ?
Quoted 48 lines
hw/ppc/pegasos2.c new file +48
-0+ +static void pegasos2_cpu_reset (void *opaque) +{ +PowerPCCPU *cpu = opaque; + +cpu_reset (CPU (cpu)); + cpu->env.spr[SPR_HID1 ] =7ULL <<28 ; +} + +static void pegasos2_init (MachineState *machine) +{ +PowerPCCPU *cpu =NULL ; +MemoryRegion *rom =g_new (MemoryRegion,1 ); +DeviceState *mv; +PCIBus *pci_bus; +PCIDevice *dev; +I2CBus *i2c_bus; +const char *fwname = machine->firmware ?:PROM_FILENAME ; +char *filename; +int sz; +uint8_t *spd_data; + +/* init CPU */ + cpu =POWERPC_CPU (cpu_create (machine->cpu_type)); +if (PPC_INPUT (&cpu->env) != PPC_FLAGS_INPUT_6xx) { +error_report ("Incompatible CPU, only 6xx bus supported" ); +exit (1 ); + } + +/* Set time-base frequency */ +cpu_ppc_tb_init (&cpu->env,BUS_FREQ /4 ); +qemu_register_reset (pegasos2_cpu_reset, cpu); + +/* RAM */ +memory_region_add_subregion (get_system_memory (),0 , machine->ram); + +/* allocate and load firmware */ + filename =qemu_find_file (QEMU_FILE_TYPE_BIOS , fwname); +if (!filename) { +error_report ("Could not find firmware '%s'" , fwname); +exit (1 ); + } +memory_region_init_rom (rom,NULL ,"pegasos2.rom" ,PROM_SIZE , &error_fatal); +memory_region_add_subregion (get_system_memory (),PROM_ADDR , rom); + sz =load_elf (filename,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,1 , +PPC_ELF_MACHINE ,0 ,0 ); +if (sz <=0 ) { + sz =load_image_targphys (filename,PROM_ADDR ,PROM_SIZE );
hw/ppc/pegasos2.c line 100
Quoted 10 lines
hw/ppc/pegasos2.c new file +10
-0+ } +if (sz <=0 || sz >PROM_SIZE ) { +error_report ("Could not load firmware '%s'" , filename); +exit (1 ); + } +g_free (filename); + +/* Marvell Discovery II system controller */ + mv =DEVICE (sysbus_create_simple (TYPE_MV64361 ,-1 , + ((qemu_irq *)cpu->env.irq_inputs)[PPC6xx_INPUT_INT]));
Indent off.
Otherwise:
Re: [PATCH v4 6/6] hw/ppc: Add emulation of Genesi/bPlan Pegasos II
Quoted 28 lines · Philippe Mathieu-Daudé
Quoted 27 lines · BALATON Zoltan
Add new machine called pegasos2 emulating the Genesi/bPlan Pegasos II, a PowerPC board based on the Marvell MV64361 system controller and the VIA VT8231 integrated south bridge/superio chips. It can run Linux, AmigaOS and a wide range of MorphOS versions. Currently a firmware ROM image is needed to boot and only MorphOS has a video driver to produce graphics output. Linux could work too but distros that supported this machine don't include usual video drivers so those only run with serial console for now.
Signed-off-by BALATON Zoltan <[email protected]>--- MAINTAINERS | 10 ++ default-configs/devices/ppc-softmmu.mak | 2 + hw/ppc/Kconfig | 10 ++ hw/ppc/meson.build | 2 + hw/ppc/pegasos2.c | 144 ++++++++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 hw/ppc/pegasos2.cMAINTAINERS +0
-0@@ -1345,6 +1345,16 @@ F: pc-bios/canyonlands.dt[sb] F: pc-bios/u-boot-sam460ex-20100605.bin F: roms/u-boot-sam460ex
Quoted 5 lines
MAINTAINERS F: pc-bios/canyonlands.dt[sb] · line 1350
Quoted 3 lines
MAINTAINERS +3
-0+pegasos2 +M: BALATON Zoltan <[email protected]> +R: David Gibson <[email protected]>:)
He's also listed as reviewer for the sam460ex and I think as the PPC maintainer probably should be notified about changes that's why this is here. I guess he can complain or submit a patch later if he wants to be removed.
Quoted 54 lines
Quoted 54 lines
MAINTAINERS +7
-0+L: [email protected] +S: Maintained +F: hw/ppc/pegasos2.c +F: hw/pci-host/mv64361.c +F: hw/pci-host/mv643xx.h +F: include/hw/pci-host/mv64361.h + RISC-V Machines --------------- OpenTitandefault-configs/devices/ppc-softmmu.mak +2
-0@@ -14,5 +14,7 @@ CONFIG_SAM460EX=y CONFIG_MAC_OLDWORLD=y CONFIG_MAC_NEWWORLD=y +CONFIG_PEGASOS2=y + # For PReP CONFIG_PREP=yhw/ppc/Kconfig +10
-0@@ -68,6 +68,16 @@ config SAM460EX select USB_OHCI select FDT_PPC +config PEGASOS2 + bool + select MV64361 + select VT82C686 + select IDE_VIA + select SMBUS_EEPROM +# These should come with VT82C686 + select APM + select ACPI_X86 + config PREP bool imply PCI_DEVICEShw/ppc/meson.build +2
-0@@ -78,5 +78,7 @@ ppc_ss.add(when: 'CONFIG_E500', if_true: files( )) # PowerPC 440 Xilinx ML507 reference board. ppc_ss.add(when: 'CONFIG_VIRTEX', if_true: files('virtex_ml507.c')) +# Pegasos2 +ppc_ss.add(when: 'CONFIG_PEGASOS2', if_true: files('pegasos2.c'))
Quoted 13 lines
hw/ppc/pegasos2.c line 4
Quoted 11 lines
hw/ppc/meson.build +0
-0hw_arch += {'ppc': ppc_ss}hw/ppc/pegasos2.c new file +4
-0@@ -0,0 +1,144 @@ +/* +* QEMU PowerPC CHRP (Genesi/bPlan Pegasos II) hardware System Emulator +* +* Copyright (c) 2018-2020 BALATON Zoltan 2018-2021
Not really. I've done this between Christmas of 2018 and 2020. This year were only changes for upstreaming and review comments so I preserved the dates to record when the actual code was written.
Quoted 93 lines
Quoted 28 lines
hw/ppc/pegasos2.c new file +28
-0+* +* This work is licensed under the GNU GPL license version 2 or later. +* +*/ + +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "qemu/units.h" +#include "qapi/error.h" +#include "hw/hw.h" +#include "hw/ppc/ppc.h" +#include "hw/sysbus.h" +#include "hw/pci/pci_host.h" +#include "hw/irq.h" +#include "hw/pci-host/mv64361.h" +#include "hw/isa/vt82c686.h" +#include "hw/ide/pci.h" +#include "hw/i2c/smbus_eeprom.h" +#include "hw/qdev-properties.h" +#include "sysemu/reset.h" +#include "hw/boards.h" +#include "hw/loader.h" +#include "hw/fw-path-provider.h" +#include "elf.h" +#include "qemu/log.h" +#include "qemu/error-report.h" +#include "sysemu/kvm.h" +#include "kvm_ppc.h" hw/ppc/pegasos2.c line 42
Quoted 10 lines
hw/ppc/pegasos2.c new file +10
-0+#include "exec/address-spaces.h" +#include "trace.h" +#include "qemu/datadir.h" +#include "sysemu/device_tree.h" + +#define PROM_FILENAME "pegasos2.rom" +#define PROM_ADDR 0xfff00000 +#define PROM_SIZE 0x80000 + +#define BUS_FREQ 133333333Can you rename as
BUS_FREQ_HZ?Quoted 52 lines
hw/ppc/pegasos2.c new file +52
-0+ +static void pegasos2_cpu_reset (void *opaque) +{ +PowerPCCPU *cpu = opaque; + +cpu_reset (CPU (cpu)); + cpu->env.spr[SPR_HID1 ] =7ULL <<28 ; +} + +static void pegasos2_init (MachineState *machine) +{ +PowerPCCPU *cpu =NULL ; +MemoryRegion *rom =g_new (MemoryRegion,1 ); +DeviceState *mv; +PCIBus *pci_bus; +PCIDevice *dev; +I2CBus *i2c_bus; +const char *fwname = machine->firmware ?:PROM_FILENAME ; +char *filename; +int sz; +uint8_t *spd_data; + +/* init CPU */ + cpu =POWERPC_CPU (cpu_create (machine->cpu_type)); +if (PPC_INPUT (&cpu->env) != PPC_FLAGS_INPUT_6xx) { +error_report ("Incompatible CPU, only 6xx bus supported" ); +exit (1 ); + } + +/* Set time-base frequency */ +cpu_ppc_tb_init (&cpu->env,BUS_FREQ /4 ); +qemu_register_reset (pegasos2_cpu_reset, cpu); + +/* RAM */ +memory_region_add_subregion (get_system_memory (),0 , machine->ram); + +/* allocate and load firmware */ + filename =qemu_find_file (QEMU_FILE_TYPE_BIOS , fwname); +if (!filename) { +error_report ("Could not find firmware '%s'" , fwname); +exit (1 ); + } +memory_region_init_rom (rom,NULL ,"pegasos2.rom" ,PROM_SIZE , &error_fatal); +memory_region_add_subregion (get_system_memory (),PROM_ADDR , rom); + sz =load_elf (filename,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,1 , +PPC_ELF_MACHINE ,0 ,0 ); +if (sz <=0 ) { + sz =load_image_targphys (filename,PROM_ADDR ,PROM_SIZE ); + } +if (sz <=0 || sz >PROM_SIZE ) { +error_report ("Could not load firmware '%s'" , filename); +exit (1 );
Quoted 8 lines
hw/ppc/pegasos2.c line 100
Quoted 6 lines
hw/ppc/pegasos2.c new file +6
-0+ } +g_free (filename); + +/* Marvell Discovery II system controller */ + mv =DEVICE (sysbus_create_simple (TYPE_MV64361 ,-1 , + ((qemu_irq *)cpu->env.irq_inputs)[PPC6xx_INPUT_INT]));Indent off.
There's no other way to fit in the 80 chars line length limit in a sensible way. (Aligning to DEVICE( would be confusing as last arg belongs to sysbus_create_simple().)
Quoted 2 lines
Otherwise:
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Thanks, I'll do the other changes you've recommended.
Regards,
BALATON Zoltan
Re: [PATCH v4 6/6] hw/ppc: Add emulation of Genesi/bPlan Pegasos II
Quoted 35 lines · BALATON Zoltan
Quoted 28 lines · Philippe Mathieu-Daudé
Quoted 27 lines · BALATON Zoltan
Add new machine called pegasos2 emulating the Genesi/bPlan Pegasos II, a PowerPC board based on the Marvell MV64361 system controller and the VIA VT8231 integrated south bridge/superio chips. It can run Linux, AmigaOS and a wide range of MorphOS versions. Currently a firmware ROM image is needed to boot and only MorphOS has a video driver to produce graphics output. Linux could work too but distros that supported this machine don't include usual video drivers so those only run with serial console for now.
Signed-off-by BALATON Zoltan <[email protected]>---
MAINTAINERS | 10 ++ default-configs/devices/ppc-softmmu.mak | 2 + hw/ppc/Kconfig | 10 ++ hw/ppc/meson.build | 2 + hw/ppc/pegasos2.c | 144 ++++++++++++++++++++++++5 files changed, 168 insertions(+)create mode 100644
hw/ppc/pegasos2.cMAINTAINERS +0
-0@@ -1345,6 +1345,16 @@ F: pc-bios/canyonlands.dt[sb]F: pc-bios/u-boot-sam460ex-20100605.bin
F: roms/u-boot-sam460exQuoted 5 lines
MAINTAINERS F: pc-bios/canyonlands.dt[sb] · line 1350
Quoted 3 lines
MAINTAINERS +3
-0+pegasos2 +M: BALATON Zoltan <[email protected]> +R: David Gibson <[email protected]>:)
Quoted 4 lines
He's also listed as reviewer for the sam460ex and I think as the PPC maintainer probably should be notified about changes that's why this is here. I guess he can complain or submit a patch later if he wants to be removed.
To clarify the confusion with this simple smiley, I meant I'm glad you found someone interested in being reviewer with your board, it was not a mockery...
Quoted 32 lines
Quoted 32 lines
Quoted 32 lines
MAINTAINERS +7
-0+L: [email protected] +S: Maintained +F: hw/ppc/pegasos2.c +F: hw/pci-host/mv64361.c +F: hw/pci-host/mv643xx.h +F: include/hw/pci-host/mv64361.h +RISC-V Machines
---------------
OpenTitandefault-configs/devices/ppc-softmmu.mak +0
-0@@ -14,5 +14,7 @@ CONFIG_SAM460EX=yCONFIG_MAC_OLDWORLD=y
CONFIG_MAC_NEWWORLD=ydefault-configs/devices/ppc-softmmu.mak +2
-0+CONFIG_PEGASOS2=y +# For PReP
CONFIG_PREP=yhw/ppc/Kconfig +0
-0@@ -68,6 +68,16 @@ config SAM460EXselect
USB_OHCI
selectFDT_PPC
Quoted 8 lines
Quoted 8 lines
hw/ppc/Kconfig config SAM460EX · line 78
Quoted 8 lines
hw/ppc/Kconfig +8
-0+config PEGASOS2 + bool + select MV64361 + select VT82C686 + select IDE_VIA + select SMBUS_EEPROM +# These should come with VT82C686 + select APM
You might get ride of this one by rebasing/including
https://www.mail-archive.com/[email protected]/msg786878.html
Quoted 139 lines
Quoted 16 lines
Quoted 16 lines
+ select
ACPI_X86
+
config PREP
bool
implyPCI_DEVICEShw/ppc/meson.build +2
-0@@ -78,5 +78,7 @@ ppc_ss.add(when: 'CONFIG_E500', if_true: files( )) # PowerPC 440 Xilinx ML507 reference board. ppc_ss.add(when: 'CONFIG_VIRTEX', if_true: files('virtex_ml507.c')) +# Pegasos2 +ppc_ss.add(when: 'CONFIG_PEGASOS2', if_true: files('pegasos2.c'))Quoted 13 lines
hw/ppc/pegasos2.c line 4
Quoted 11 lines
hw/ppc/meson.build +0
-0hw_arch += {'ppc': ppc_ss}hw/ppc/pegasos2.c new file +4
-0@@ -0,0 +1,144 @@ +/* +* QEMU PowerPC CHRP (Genesi/bPlan Pegasos II) hardware System Emulator +* +* Copyright (c) 2018-2020 BALATON Zoltan 2018-2021
Not really. I've done this between Christmas of 2018 and 2020. This year were only changes for upstreaming and review comments so I preserved the dates to record when the actual code was written.
Quoted 96 lines
Quoted 28 lines
hw/ppc/pegasos2.c new file +28
-0+* +* This work is licensed under the GNU GPL license version 2 or later. +* +*/ + +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "qemu/units.h" +#include "qapi/error.h" +#include "hw/hw.h" +#include "hw/ppc/ppc.h" +#include "hw/sysbus.h" +#include "hw/pci/pci_host.h" +#include "hw/irq.h" +#include "hw/pci-host/mv64361.h" +#include "hw/isa/vt82c686.h" +#include "hw/ide/pci.h" +#include "hw/i2c/smbus_eeprom.h" +#include "hw/qdev-properties.h" +#include "sysemu/reset.h" +#include "hw/boards.h" +#include "hw/loader.h" +#include "hw/fw-path-provider.h" +#include "elf.h" +#include "qemu/log.h" +#include "qemu/error-report.h" +#include "sysemu/kvm.h" +#include "kvm_ppc.h" hw/ppc/pegasos2.c line 42
Quoted 10 lines
hw/ppc/pegasos2.c new file +10
-0+#include "exec/address-spaces.h" +#include "trace.h" +#include "qemu/datadir.h" +#include "sysemu/device_tree.h" + +#define PROM_FILENAME "pegasos2.rom" +#define PROM_ADDR 0xfff00000 +#define PROM_SIZE 0x80000 + +#define BUS_FREQ 133333333Can you rename as
BUS_FREQ_HZ?Quoted 55 lines
hw/ppc/pegasos2.c new file +43
-0+ +static void pegasos2_cpu_reset (void *opaque) +{ + PowerPCCPU *cpu = opaque; + + cpu_reset(CPU(cpu)); + cpu->env.spr[SPR_HID1] = 7ULL << 28; +} + +static void pegasos2_init (MachineState *machine) +{ + PowerPCCPU *cpu = NULL; + MemoryRegion *rom = g_new(MemoryRegion, 1); + DeviceState *mv; + PCIBus *pci_bus; + PCIDevice *dev; + I2CBus *i2c_bus; + const char *fwname = machine->firmware ?: PROM_FILENAME; + char *filename; + int sz; + uint8_t *spd_data; + + /* init CPU */ + cpu = POWERPC_CPU(cpu_create(machine->cpu_type)); + if (PPC_INPUT(&cpu->env) != PPC_FLAGS_INPUT_6xx) { + error_report("Incompatible CPU, only 6xx bus supported"); + exit(1); + } + + /* Set time-base frequency */ + cpu_ppc_tb_init(&cpu->env, BUS_FREQ / 4); + qemu_register_reset(pegasos2_cpu_reset, cpu); + + /* RAM */ + memory_region_add_subregion(get_system_memory(), 0, machine->ram); + + /* allocate and load firmware */ + filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, fwname); + if (!filename) { + error_report("Could not find firmware '%s'", fwname); + exit(1); + } + memory_region_init_rom(rom, NULL, "pegasos2.rom", PROM_SIZE,
&error_fatal);
+memory_region_add_subregion(get_system_memory(), PROM_ADDR, rom); + sz = load_elf(filename, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1,
+PPC_ELF_MACHINE, 0, 0);
+ if (sz <= 0) {
+ sz =load_image_targphys(filename, PROM_ADDR, PROM_SIZE); + }
+ if (sz <= 0 || sz >PROM_SIZE) {
+error_report("Could not load firmware '%s'", filename); + exit(1);
+ }Quoted 8 lines
Quoted 6 lines
+
g_free(filename);
+
+ /* Marvell Discovery II system controller */ + mv = DEVICE(sysbus_create_simple(TYPE_MV64361, -1, + ((qemu_irq*)cpu->env.irq_inputs)[PPC6xx_INPUT_INT]));Indent off.
Quoted 3 lines
There's no other way to fit in the 80 chars line length limit in a sensible way. (Aligning to
DEVICE( would be confusing as last arg belongs to sysbus_create_simple().)
You are right, I got confused by sysbus_create_simple() indeed.
Quoted 8 lines
Quoted 3 lines
Otherwise:
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Thanks, I'll do the other changes you've recommended.
Regards,
BALATON Zoltan
Re: [PATCH v4 6/6] hw/ppc: Add emulation of Genesi/bPlan Pegasos II
In reply to BALATON ZoltanQuoted 35 lines · BALATON Zoltan
Quoted 28 lines · Philippe Mathieu-Daudé
Quoted 27 lines · BALATON Zoltan
Add new machine called pegasos2 emulating the Genesi/bPlan Pegasos II, a PowerPC board based on the Marvell MV64361 system controller and the VIA VT8231 integrated south bridge/superio chips. It can run Linux, AmigaOS and a wide range of MorphOS versions. Currently a firmware ROM image is needed to boot and only MorphOS has a video driver to produce graphics output. Linux could work too but distros that supported this machine don't include usual video drivers so those only run with serial console for now.
Signed-off-by BALATON Zoltan <[email protected]>--- MAINTAINERS | 10 ++ default-configs/devices/ppc-softmmu.mak | 2 + hw/ppc/Kconfig | 10 ++ hw/ppc/meson.build | 2 + hw/ppc/pegasos2.c | 144 ++++++++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 hw/ppc/pegasos2.cMAINTAINERS +0
-0@@ -1345,6 +1345,16 @@ F: pc-bios/canyonlands.dt[sb] F: pc-bios/u-boot-sam460ex-20100605.bin F: roms/u-boot-sam460exQuoted 5 lines
MAINTAINERS F: pc-bios/canyonlands.dt[sb] · line 1350
Quoted 3 lines
MAINTAINERS +3
-0+pegasos2 +M: BALATON Zoltan <[email protected]> +R: David Gibson <[email protected]>:)
Quoted 4 lines
He's also listed as reviewer for the sam460ex and I think as the PPC maintainer probably should be notified about changes that's why this is here. I guess he can complain or submit a patch later if he wants to be removed.
Including me as reviewer is fine for now.
Quoted 69 lines
Quoted 55 lines
Quoted 55 lines
MAINTAINERS +7
-0+L: [email protected] +S: Maintained +F: hw/ppc/pegasos2.c +F: hw/pci-host/mv64361.c +F: hw/pci-host/mv643xx.h +F: include/hw/pci-host/mv64361.h + RISC-V Machines --------------- OpenTitandefault-configs/devices/ppc-softmmu.mak +2
-0@@ -14,5 +14,7 @@ CONFIG_SAM460EX=y CONFIG_MAC_OLDWORLD=y CONFIG_MAC_NEWWORLD=y +CONFIG_PEGASOS2=y + # For PReP CONFIG_PREP=yhw/ppc/Kconfig +10
-0@@ -68,6 +68,16 @@ config SAM460EX select USB_OHCI select FDT_PPC +config PEGASOS2 + bool + select MV64361 + select VT82C686 + select IDE_VIA + select SMBUS_EEPROM +# These should come with VT82C686 + select APM + select ACPI_X86 + config PREP bool imply PCI_DEVICEShw/ppc/meson.build +2
-0@@ -78,5 +78,7 @@ ppc_ss.add(when: 'CONFIG_E500', if_true: files( )) # PowerPC 440 Xilinx ML507 reference board. ppc_ss.add(when: 'CONFIG_VIRTEX', if_true: files('virtex_ml507.c')) +# Pegasos2 +ppc_ss.add(when: 'CONFIG_PEGASOS2', if_true: files('pegasos2.c'))Quoted 13 lines
hw/ppc/pegasos2.c line 4
Quoted 11 lines
hw/ppc/meson.build +0
-0hw_arch += {'ppc': ppc_ss}hw/ppc/pegasos2.c new file +4
-0@@ -0,0 +1,144 @@ +/* +* QEMU PowerPC CHRP (Genesi/bPlan Pegasos II) hardware System Emulator +* +* Copyright (c) 2018-2020 BALATON Zoltan 2018-2021
Quoted 3 lines
Not really. I've done this between Christmas of 2018 and 2020. This year were only changes for upstreaming and review comments so I preserved the dates to record when the actual code was written.
Fwiw, Red Hat's internal guidelines have the opinion that the years don't matter that much and are usually out of date, so they suggest simply "Copyright Red Hat." for contributions from us. IANAL.
Quoted 102 lines
Quoted 93 lines
Quoted 28 lines
hw/ppc/pegasos2.c new file +28
-0+* +* This work is licensed under the GNU GPL license version 2 or later. +* +*/ + +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "qemu/units.h" +#include "qapi/error.h" +#include "hw/hw.h" +#include "hw/ppc/ppc.h" +#include "hw/sysbus.h" +#include "hw/pci/pci_host.h" +#include "hw/irq.h" +#include "hw/pci-host/mv64361.h" +#include "hw/isa/vt82c686.h" +#include "hw/ide/pci.h" +#include "hw/i2c/smbus_eeprom.h" +#include "hw/qdev-properties.h" +#include "sysemu/reset.h" +#include "hw/boards.h" +#include "hw/loader.h" +#include "hw/fw-path-provider.h" +#include "elf.h" +#include "qemu/log.h" +#include "qemu/error-report.h" +#include "sysemu/kvm.h" +#include "kvm_ppc.h" hw/ppc/pegasos2.c line 42
Quoted 10 lines
hw/ppc/pegasos2.c new file +10
-0+#include "exec/address-spaces.h" +#include "trace.h" +#include "qemu/datadir.h" +#include "sysemu/device_tree.h" + +#define PROM_FILENAME "pegasos2.rom" +#define PROM_ADDR 0xfff00000 +#define PROM_SIZE 0x80000 + +#define BUS_FREQ 133333333Can you rename as
BUS_FREQ_HZ?Quoted 52 lines
hw/ppc/pegasos2.c new file +52
-0+ +static void pegasos2_cpu_reset (void *opaque) +{ +PowerPCCPU *cpu = opaque; + +cpu_reset (CPU (cpu)); + cpu->env.spr[SPR_HID1 ] =7ULL <<28 ; +} + +static void pegasos2_init (MachineState *machine) +{ +PowerPCCPU *cpu =NULL ; +MemoryRegion *rom =g_new (MemoryRegion,1 ); +DeviceState *mv; +PCIBus *pci_bus; +PCIDevice *dev; +I2CBus *i2c_bus; +const char *fwname = machine->firmware ?:PROM_FILENAME ; +char *filename; +int sz; +uint8_t *spd_data; + +/* init CPU */ + cpu =POWERPC_CPU (cpu_create (machine->cpu_type)); +if (PPC_INPUT (&cpu->env) != PPC_FLAGS_INPUT_6xx) { +error_report ("Incompatible CPU, only 6xx bus supported" ); +exit (1 ); + } + +/* Set time-base frequency */ +cpu_ppc_tb_init (&cpu->env,BUS_FREQ /4 ); +qemu_register_reset (pegasos2_cpu_reset, cpu); + +/* RAM */ +memory_region_add_subregion (get_system_memory (),0 , machine->ram); + +/* allocate and load firmware */ + filename =qemu_find_file (QEMU_FILE_TYPE_BIOS , fwname); +if (!filename) { +error_report ("Could not find firmware '%s'" , fwname); +exit (1 ); + } +memory_region_init_rom (rom,NULL ,"pegasos2.rom" ,PROM_SIZE , &error_fatal); +memory_region_add_subregion (get_system_memory (),PROM_ADDR , rom); + sz =load_elf (filename,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,1 , +PPC_ELF_MACHINE ,0 ,0 ); +if (sz <=0 ) { + sz =load_image_targphys (filename,PROM_ADDR ,PROM_SIZE ); + } +if (sz <=0 || sz >PROM_SIZE ) { +error_report ("Could not load firmware '%s'" , filename); +exit (1 );Quoted 8 lines
hw/ppc/pegasos2.c line 100
Quoted 6 lines
hw/ppc/pegasos2.c new file +6
-0+ } +g_free (filename); + +/* Marvell Discovery II system controller */ + mv =DEVICE (sysbus_create_simple (TYPE_MV64361 ,-1 , + ((qemu_irq *)cpu->env.irq_inputs)[PPC6xx_INPUT_INT]));Indent off.
Quoted 3 lines
There's no other way to fit in the 80 chars line length limit in a sensible way. (Aligning to
DEVICE( would be confusing as last arg belongs to sysbus_create_simple().)
You could declare a temporary variable with the complex irq_inputs expression.
Quoted 8 lines
Quoted 3 lines
Otherwise:
Reviewed-by Philippe Mathieu-Daudé <[email protected]>Thanks, I'll do the other changes you've recommended.
Regards,
BALATON Zoltan
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Re: [PATCH v4 6/6] hw/ppc: Add emulation of Genesi/bPlan Pegasos II
Quoted 112 lines · David Gibson
Quoted 35 lines · BALATON Zoltan
Quoted 28 lines · Philippe Mathieu-Daudé
Quoted 27 lines · BALATON Zoltan
Add new machine called pegasos2 emulating the Genesi/bPlan Pegasos II, a PowerPC board based on the Marvell MV64361 system controller and the VIA VT8231 integrated south bridge/superio chips. It can run Linux, AmigaOS and a wide range of MorphOS versions. Currently a firmware ROM image is needed to boot and only MorphOS has a video driver to produce graphics output. Linux could work too but distros that supported this machine don't include usual video drivers so those only run with serial console for now.
Signed-off-by BALATON Zoltan <[email protected]>--- MAINTAINERS | 10 ++ default-configs/devices/ppc-softmmu.mak | 2 + hw/ppc/Kconfig | 10 ++ hw/ppc/meson.build | 2 + hw/ppc/pegasos2.c | 144 ++++++++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 hw/ppc/pegasos2.cMAINTAINERS +0
-0@@ -1345,6 +1345,16 @@ F: pc-bios/canyonlands.dt[sb] F: pc-bios/u-boot-sam460ex-20100605.bin F: roms/u-boot-sam460exQuoted 5 lines
MAINTAINERS F: pc-bios/canyonlands.dt[sb] · line 1350
Quoted 3 lines
MAINTAINERS +3
-0+pegasos2 +M: BALATON Zoltan <[email protected]> +R: David Gibson <[email protected]>:)
Quoted 4 lines
He's also listed as reviewer for the sam460ex and I think as the PPC maintainer probably should be notified about changes that's why this is here. I guess he can complain or submit a patch later if he wants to be removed.
Including me as reviewer is fine for now.
Quoted 69 lines
Quoted 68 lines
Quoted 62 lines
MAINTAINERS +7
-0+L: [email protected] +S: Maintained +F: hw/ppc/pegasos2.c +F: hw/pci-host/mv64361.c +F: hw/pci-host/mv643xx.h +F: include/hw/pci-host/mv64361.h + RISC-V Machines --------------- OpenTitandefault-configs/devices/ppc-softmmu.mak +2
-0@@ -14,5 +14,7 @@ CONFIG_SAM460EX=y CONFIG_MAC_OLDWORLD=y CONFIG_MAC_NEWWORLD=y +CONFIG_PEGASOS2=y + # For PReP CONFIG_PREP=yhw/ppc/Kconfig +10
-0@@ -68,6 +68,16 @@ config SAM460EX select USB_OHCI select FDT_PPC +config PEGASOS2 + bool + select MV64361 + select VT82C686 + select IDE_VIA + select SMBUS_EEPROM +# These should come with VT82C686 + select APM + select ACPI_X86 + config PREP bool imply PCI_DEVICEShw/ppc/meson.build +2
-0@@ -78,5 +78,7 @@ ppc_ss.add(when: 'CONFIG_E500', if_true: files( )) # PowerPC 440 Xilinx ML507 reference board. ppc_ss.add(when: 'CONFIG_VIRTEX', if_true: files('virtex_ml507.c')) +# Pegasos2 +ppc_ss.add(when: 'CONFIG_PEGASOS2', if_true: files('pegasos2.c')) hw_arch += {'ppc': ppc_ss}hw/ppc/pegasos2.c new file +0
-0hw/ppc/pegasos2.c line 4
Quoted 4 lines
hw/ppc/pegasos2.c new file +4
-0@@ -0,0 +1,144 @@ +/* +* QEMU PowerPC CHRP (Genesi/bPlan Pegasos II) hardware System Emulator +* +* Copyright (c) 2018-2020 BALATON Zoltan 2018-2021
Quoted 7 lines
Quoted 3 lines
Not really. I've done this between Christmas of 2018 and 2020. This year were only changes for upstreaming and review comments so I preserved the dates to record when the actual code was written.
Fwiw, Red Hat's internal guidelines have the opinion that the years don't matter that much and are usually out of date, so they suggest simply "Copyright Red Hat." for contributions from us. IANAL.
I think including the year originally comes from that in some jurisdictions there is or was a limit for how long copyright is reserved starting from this date and then each modification may restart that period but I read somewhere that it's not any more relevant. Anyway, I've just added the year to record when did I do it and the whole copyright message is mostly to state who's to blame for this as it's under GPL anyway so copyright does not matter much and the commit log also has this info it's just easier to find in the header comment.
Quoted 102 lines
Quoted 102 lines
Quoted 101 lines
Quoted 28 lines
hw/ppc/pegasos2.c new file +28
-0+* +* This work is licensed under the GNU GPL license version 2 or later. +* +*/ + +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "qemu/units.h" +#include "qapi/error.h" +#include "hw/hw.h" +#include "hw/ppc/ppc.h" +#include "hw/sysbus.h" +#include "hw/pci/pci_host.h" +#include "hw/irq.h" +#include "hw/pci-host/mv64361.h" +#include "hw/isa/vt82c686.h" +#include "hw/ide/pci.h" +#include "hw/i2c/smbus_eeprom.h" +#include "hw/qdev-properties.h" +#include "sysemu/reset.h" +#include "hw/boards.h" +#include "hw/loader.h" +#include "hw/fw-path-provider.h" +#include "elf.h" +#include "qemu/log.h" +#include "qemu/error-report.h" +#include "sysemu/kvm.h" +#include "kvm_ppc.h" hw/ppc/pegasos2.c line 42
Quoted 10 lines
hw/ppc/pegasos2.c new file +10
-0+#include "exec/address-spaces.h" +#include "trace.h" +#include "qemu/datadir.h" +#include "sysemu/device_tree.h" + +#define PROM_FILENAME "pegasos2.rom" +#define PROM_ADDR 0xfff00000 +#define PROM_SIZE 0x80000 + +#define BUS_FREQ 133333333Can you rename as
BUS_FREQ_HZ?Quoted 48 lines
hw/ppc/pegasos2.c new file +48
-0+ +static void pegasos2_cpu_reset (void *opaque) +{ +PowerPCCPU *cpu = opaque; + +cpu_reset (CPU (cpu)); + cpu->env.spr[SPR_HID1 ] =7ULL <<28 ; +} + +static void pegasos2_init (MachineState *machine) +{ +PowerPCCPU *cpu =NULL ; +MemoryRegion *rom =g_new (MemoryRegion,1 ); +DeviceState *mv; +PCIBus *pci_bus; +PCIDevice *dev; +I2CBus *i2c_bus; +const char *fwname = machine->firmware ?:PROM_FILENAME ; +char *filename; +int sz; +uint8_t *spd_data; + +/* init CPU */ + cpu =POWERPC_CPU (cpu_create (machine->cpu_type)); +if (PPC_INPUT (&cpu->env) != PPC_FLAGS_INPUT_6xx) { +error_report ("Incompatible CPU, only 6xx bus supported" ); +exit (1 ); + } + +/* Set time-base frequency */ +cpu_ppc_tb_init (&cpu->env,BUS_FREQ /4 ); +qemu_register_reset (pegasos2_cpu_reset, cpu); + +/* RAM */ +memory_region_add_subregion (get_system_memory (),0 , machine->ram); + +/* allocate and load firmware */ + filename =qemu_find_file (QEMU_FILE_TYPE_BIOS , fwname); +if (!filename) { +error_report ("Could not find firmware '%s'" , fwname); +exit (1 ); + } +memory_region_init_rom (rom,NULL ,"pegasos2.rom" ,PROM_SIZE , &error_fatal); +memory_region_add_subregion (get_system_memory (),PROM_ADDR , rom); + sz =load_elf (filename,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,1 , +PPC_ELF_MACHINE ,0 ,0 ); +if (sz <=0 ) { + sz =load_image_targphys (filename,PROM_ADDR ,PROM_SIZE );hw/ppc/pegasos2.c line 100
Quoted 10 lines
hw/ppc/pegasos2.c new file +10
-0+ } +if (sz <=0 || sz >PROM_SIZE ) { +error_report ("Could not load firmware '%s'" , filename); +exit (1 ); + } +g_free (filename); + +/* Marvell Discovery II system controller */ + mv =DEVICE (sysbus_create_simple (TYPE_MV64361 ,-1 , + ((qemu_irq *)cpu->env.irq_inputs)[PPC6xx_INPUT_INT]));Indent off.
Quoted 5 lines
Quoted 3 lines
There's no other way to fit in the 80 chars line length limit in a sensible way. (Aligning to
DEVICE( would be confusing as last arg belongs to sysbus_create_simple().)You could declare a temporary variable with the complex
irq_inputsexpression.
Should I submit a new version with that change or you just noted it as a possibility? I've also thought about that but I think it's not worth it if it's only used at this one place. This may also be simplified in the future if PPC interrupts are converted to gpios as Peter suggested.
Regards,
BALATON Zoltan
Re: [PATCH v4 6/6] hw/ppc: Add emulation of Genesi/bPlan Pegasos II
Quoted 228 lines · BALATON Zoltan
Quoted 112 lines · David Gibson
Quoted 35 lines · BALATON Zoltan
Quoted 28 lines · Philippe Mathieu-Daudé
Quoted 27 lines · BALATON Zoltan
Add new machine called pegasos2 emulating the Genesi/bPlan Pegasos II, a PowerPC board based on the Marvell MV64361 system controller and the VIA VT8231 integrated south bridge/superio chips. It can run Linux, AmigaOS and a wide range of MorphOS versions. Currently a firmware ROM image is needed to boot and only MorphOS has a video driver to produce graphics output. Linux could work too but distros that supported this machine don't include usual video drivers so those only run with serial console for now.
Signed-off-by BALATON Zoltan <[email protected]>--- MAINTAINERS | 10 ++ default-configs/devices/ppc-softmmu.mak | 2 + hw/ppc/Kconfig | 10 ++ hw/ppc/meson.build | 2 + hw/ppc/pegasos2.c | 144 ++++++++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 hw/ppc/pegasos2.cMAINTAINERS +0
-0@@ -1345,6 +1345,16 @@ F: pc-bios/canyonlands.dt[sb] F: pc-bios/u-boot-sam460ex-20100605.bin F: roms/u-boot-sam460exQuoted 5 lines
MAINTAINERS F: pc-bios/canyonlands.dt[sb] · line 1350
Quoted 3 lines
MAINTAINERS +3
-0+pegasos2 +M: BALATON Zoltan <[email protected]> +R: David Gibson <[email protected]>:)
Quoted 4 lines
He's also listed as reviewer for the sam460ex and I think as the PPC maintainer probably should be notified about changes that's why this is here. I guess he can complain or submit a patch later if he wants to be removed.
Including me as reviewer is fine for now.
Quoted 69 lines
Quoted 68 lines
Quoted 62 lines
MAINTAINERS +7
-0+L: [email protected] +S: Maintained +F: hw/ppc/pegasos2.c +F: hw/pci-host/mv64361.c +F: hw/pci-host/mv643xx.h +F: include/hw/pci-host/mv64361.h + RISC-V Machines --------------- OpenTitandefault-configs/devices/ppc-softmmu.mak +2
-0@@ -14,5 +14,7 @@ CONFIG_SAM460EX=y CONFIG_MAC_OLDWORLD=y CONFIG_MAC_NEWWORLD=y +CONFIG_PEGASOS2=y + # For PReP CONFIG_PREP=yhw/ppc/Kconfig +10
-0@@ -68,6 +68,16 @@ config SAM460EX select USB_OHCI select FDT_PPC +config PEGASOS2 + bool + select MV64361 + select VT82C686 + select IDE_VIA + select SMBUS_EEPROM +# These should come with VT82C686 + select APM + select ACPI_X86 + config PREP bool imply PCI_DEVICEShw/ppc/meson.build +2
-0@@ -78,5 +78,7 @@ ppc_ss.add(when: 'CONFIG_E500', if_true: files( )) # PowerPC 440 Xilinx ML507 reference board. ppc_ss.add(when: 'CONFIG_VIRTEX', if_true: files('virtex_ml507.c')) +# Pegasos2 +ppc_ss.add(when: 'CONFIG_PEGASOS2', if_true: files('pegasos2.c')) hw_arch += {'ppc': ppc_ss}hw/ppc/pegasos2.c new file +0
-0hw/ppc/pegasos2.c line 4
Quoted 4 lines
hw/ppc/pegasos2.c new file +4
-0@@ -0,0 +1,144 @@ +/* +* QEMU PowerPC CHRP (Genesi/bPlan Pegasos II) hardware System Emulator +* +* Copyright (c) 2018-2020 BALATON Zoltan 2018-2021
Quoted 7 lines
Quoted 3 lines
Not really. I've done this between Christmas of 2018 and 2020. This year were only changes for upstreaming and review comments so I preserved the dates to record when the actual code was written.
Fwiw, Red Hat's internal guidelines have the opinion that the years don't matter that much and are usually out of date, so they suggest simply "Copyright Red Hat." for contributions from us. IANAL.
I think including the year originally comes from that in some jurisdictions there is or was a limit for how long copyright is reserved starting from this date and then each modification may restart that period but I read somewhere that it's not any more relevant. Anyway, I've just added the year to record when did I do it and the whole copyright message is mostly to state who's to blame for this as it's under GPL anyway so copyright does not matter much and the commit log also has this info it's just easier to find in the header comment.
Quoted 105 lines
Quoted 105 lines
Quoted 104 lines
Quoted 28 lines
hw/ppc/pegasos2.c new file +28
-0+* +* This work is licensed under the GNU GPL license version 2 or later. +* +*/ + +#include "qemu/osdep.h" +#include "qemu-common.h" +#include "qemu/units.h" +#include "qapi/error.h" +#include "hw/hw.h" +#include "hw/ppc/ppc.h" +#include "hw/sysbus.h" +#include "hw/pci/pci_host.h" +#include "hw/irq.h" +#include "hw/pci-host/mv64361.h" +#include "hw/isa/vt82c686.h" +#include "hw/ide/pci.h" +#include "hw/i2c/smbus_eeprom.h" +#include "hw/qdev-properties.h" +#include "sysemu/reset.h" +#include "hw/boards.h" +#include "hw/loader.h" +#include "hw/fw-path-provider.h" +#include "elf.h" +#include "qemu/log.h" +#include "qemu/error-report.h" +#include "sysemu/kvm.h" +#include "kvm_ppc.h" hw/ppc/pegasos2.c line 42
Quoted 10 lines
hw/ppc/pegasos2.c new file +10
-0+#include "exec/address-spaces.h" +#include "trace.h" +#include "qemu/datadir.h" +#include "sysemu/device_tree.h" + +#define PROM_FILENAME "pegasos2.rom" +#define PROM_ADDR 0xfff00000 +#define PROM_SIZE 0x80000 + +#define BUS_FREQ 133333333Can you rename as
BUS_FREQ_HZ?Quoted 60 lines
hw/ppc/pegasos2.c new file +43
-0+ +static void pegasos2_cpu_reset (void *opaque) +{ +PowerPCCPU *cpu = opaque; + +cpu_reset (CPU (cpu)); + cpu->env.spr[SPR_HID1 ] =7ULL <<28 ; +} + +static void pegasos2_init (MachineState *machine) +{ +PowerPCCPU *cpu =NULL ; +MemoryRegion *rom =g_new (MemoryRegion,1 ); +DeviceState *mv; +PCIBus *pci_bus; +PCIDevice *dev; +I2CBus *i2c_bus; +const char *fwname = machine->firmware ?:PROM_FILENAME ; +char *filename; +int sz; +uint8_t *spd_data; + +/* init CPU */ + cpu =POWERPC_CPU (cpu_create (machine->cpu_type)); +if (PPC_INPUT (&cpu->env) != PPC_FLAGS_INPUT_6xx) { +error_report ("Incompatible CPU, only 6xx bus supported" ); +exit (1 ); + } + +/* Set time-base frequency */ +cpu_ppc_tb_init (&cpu->env,BUS_FREQ /4 ); +qemu_register_reset (pegasos2_cpu_reset, cpu); + +/* RAM */ +memory_region_add_subregion (get_system_memory (),0 , machine->ram); + +/* allocate and load firmware */ + filename =qemu_find_file (QEMU_FILE_TYPE_BIOS , fwname); +if (!filename) { +error_report ("Could not find firmware '%s'" , fwname); +exit (1 ); + } + memory_region_init_rom(rom, NULL, "pegasos2.rom", PROM_SIZE,
&error_fatal);hw/ppc/pegasos2.c new file +2
-0+memory_region_add_subregion (get_system_memory (),PROM_ADDR , rom); + sz = load_elf(filename, NULL, NULL, NULL, NULL, NULL, NULL, NULL,1,
hw/ppc/pegasos2.c new file +13
-0+ PPC_ELF_MACHINE, 0, 0); +if (sz <=0 ) { + sz =load_image_targphys (filename,PROM_ADDR ,PROM_SIZE ); + } +if (sz <=0 || sz >PROM_SIZE ) { +error_report ("Could not load firmware '%s'" , filename); +exit (1 ); + } +g_free (filename); + +/* Marvell Discovery II system controller */ + mv = DEVICE(sysbus_create_simple(TYPE_MV64361, -1, + ((qemu_irqQuoted 1 line
*)cpu->env.irq_inputs)[PPC6xx_INPUT_INT]));
Indent off.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
There's no other way to fit in the 80 chars line length limit in a sensible way. (Aligning to
DEVICE( would be confusing as last arg belongs to sysbus_create_simple().)You could declare a temporary variable with the complex
irq_inputsexpression.Should I submit a new version with that change or you just noted it as a possibility? I've also thought about that but I think it's not worth it if it's only used at this one place. This may also be simplified in the future if PPC interrupts are converted to gpios as Peter suggested.
Ping? Is there anything that needs a respin that you're waiting for or you just did not yet have the time yet to merge this series?
Regards,
BALATON Zoltan
Re: [PATCH v4 6/6] hw/ppc: Add emulation of Genesi/bPlan Pegasos II
Quoted 2 lines · BALATON Zoltan
Ping? Is there anything that needs a respin that you're waiting for or you just did not yet have the time yet to merge this series?
I asked you to split patch 4:
https://www.mail-archive.com/[email protected]/msg786871.html
If you can get Paolo to Ack patch #1 and split patch 4, I'm OK to queue the VIA patches via the MIPS tree, letting this single one for the PPC tree.
Regards,
Phil.
Re: [PATCH v4 6/6] hw/ppc: Add emulation of Genesi/bPlan Pegasos II
Quoted 6 lines · Philippe Mathieu-Daudé
Quoted 2 lines · BALATON Zoltan
Ping? Is there anything that needs a respin that you're waiting for or you just did not yet have the time yet to merge this series?
I asked you to split patch 4:
https://www.mail-archive.com/[email protected]/msg786871.html
I did that in v5 and you've reviewed it I think, (Just replied to the ping message sent for v4 but I've also sent a v5 meanwhile and this ping was meant for that, sorry for the confusion).
Quoted 1 line
If you can get Paolo to Ack patch #1 and split patch 4, I'm
He was cc'd on all this and haven't answered so far so I guess he doesn't care about it.
Quoted 2 lines
OK to queue the VIA patches via the MIPS tree, letting this single one for the PPC tree.
There's also the MV64361 patch that's only used by pegasos2 so may be PPC specific and the other VT8231 patches are useless without these last two. I hope David will be able to take the series so I'd wait a bit for his answer on what he prefers.
Thank you,
BALATON Zoltan
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PATCH v4 0/6] Pegasos2 emulation
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
7ef8134..51db2d7 master -> master - [tag update] patchew/[email protected] -> patchew/[email protected] * [new tag] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
42b2a15 hw/ppc: Add emulation of Genesi/bPlan Pegasos II
2b43495 hw/pci-host: Add emulation of Marvell MV64361 PPC system controller 0ba0ef2 vt82c686: Add emulation of VT8231 south bridge
4d547c7 vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO af493ab vt82c686: QOM-ify superio related functionality
9041915 vt82c686: Implement control of serial port io ranges via config regs
=== OUTPUT BEGIN ===
1/6 Checking commit 904191528152 (vt82c686: Implement control of serial port io ranges via config regs) 2/6 Checking commit af493ab3ac51 (vt82c686: QOM-ify superio related functionality)
3/6 Checking commit 4d547c7dc19d (vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO) 4/6 Checking commit 0ba0ef255e0d (vt82c686: Add emulation of VT8231 south bridge)
5/6 Checking commit 2b43495ccd8f (hw/pci-host: Add emulation of Marvell MV64361 PPC system controller) Use of uninitialized value $acpi_testexpected in string eq at ./scripts/checkpatch.pl line 1529.
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#51:
new file mode 100644
WARNING: line over 80 characters
#307: FILE: hw/pci-host/mv64361.c:252:
+ trace_mv64361_region_enable(!(val & mask) ? "enable" : "disable", i);
ERROR: code indent should never use tabs
#1032: FILE: hw/pci-host/mv643xx.h:5:
+ * ^IAuthor: Matthew Dharm <[email protected]>$
WARNING: architecture specific defines should be avoided #1040: FILE: hw/pci-host/mv643xx.h:13:
+#ifndef __ASM_MV643XX_H
WARNING: Block comments use a leading /* on a separate line #1102: FILE: hw/pci-host/mv643xx.h:75:
+/* Enables the CS , DEV_CS , PCI 0 and PCI 1
WARNING: Block comments use * on subsequent lines
#1103: FILE: hw/pci-host/mv643xx.h:76:
+/* Enables the CS , DEV_CS , PCI 0 and PCI 1
+ windows above */
WARNING: Block comments use a trailing */ on a separate line #1103: FILE: hw/pci-host/mv643xx.h:76:
+ windows above */
ERROR: code indent should never use tabs
#1206: FILE: hw/pci-host/mv643xx.h:179:
+/* CPU Interface Debug Registers ^I*/$
ERROR: code indent should never use tabs
#1283: FILE: hw/pci-host/mv643xx.h:256:
+/* Device Parameters^I^I^I*/$
ERROR: code indent should never use tabs
#1286: FILE: hw/pci-host/mv643xx.h:259:
+#define MV64340_DEVICE_BANK0_PARAMETERS^I^I^I^I 0x45c$
ERROR: code indent should never use tabs
#1287: FILE: hw/pci-host/mv643xx.h:260:
+#define MV64340_DEVICE_BANK1_PARAMETERS^I^I^I^I 0x460$
ERROR: code indent should never use tabs
#1288: FILE: hw/pci-host/mv643xx.h:261:
+#define MV64340_DEVICE_BANK2_PARAMETERS^I^I^I^I 0x464$
ERROR: code indent should never use tabs
#1289: FILE: hw/pci-host/mv643xx.h:262:
+#define MV64340_DEVICE_BANK3_PARAMETERS^I^I^I^I 0x468$
ERROR: code indent should never use tabs
#1290: FILE: hw/pci-host/mv643xx.h:263:
+#define MV64340_DEVICE_BOOT_BANK_PARAMETERS^I^I^I 0x46c$
ERROR: code indent should never use tabs
#1297: FILE: hw/pci-host/mv643xx.h:270:
+/* Device interrupt registers^I^I*/$
ERROR: code indent should never use tabs
#1300: FILE: hw/pci-host/mv643xx.h:273:
+#define MV64340_DEVICE_INTERRUPT_CAUSE^I^I^I^I 0x4d0$
ERROR: code indent should never use tabs
#1301: FILE: hw/pci-host/mv643xx.h:274:
+#define MV64340_DEVICE_INTERRUPT_MASK^I^I^I^I 0x4d4$
ERROR: code indent should never use tabs
#1302: FILE: hw/pci-host/mv643xx.h:275:
+#define MV64340_DEVICE_ERROR_ADDR^I^I^I^I 0x4d8$
ERROR: code indent should never use tabs
#1303: FILE: hw/pci-host/mv643xx.h:276:
+#define MV64340_DEVICE_ERROR_DATA ^I^I^I^I 0x4dc$
ERROR: code indent should never use tabs
#1304: FILE: hw/pci-host/mv643xx.h:277:
+#define MV64340_DEVICE_ERROR_PARITY ^I^I^I 0x4e0$
ERROR: code indent should never use tabs
#1307: FILE: hw/pci-host/mv643xx.h:280:
+/* Device debug registers ^I^I*/$
ERROR: code indent should never use tabs
#1310: FILE: hw/pci-host/mv643xx.h:283:
+#define MV64340_DEVICE_DEBUG_LOW ^I^I^I^I 0x4e4$
ERROR: code indent should never use tabs
#1311: FILE: hw/pci-host/mv643xx.h:284:
+#define MV64340_DEVICE_DEBUG_HIGH ^I^I^I^I 0x4e8$
ERROR: code indent should never use tabs
#1350: FILE: hw/pci-host/mv643xx.h:323:
+#define MV64340_PCI_0_CS_0_BASE_ADDR_REMAP^I^I^I 0xc48$
ERROR: code indent should never use tabs
#1351: FILE: hw/pci-host/mv643xx.h:324:
+#define MV64340_PCI_1_CS_0_BASE_ADDR_REMAP^I^I^I 0xcc8$
ERROR: code indent should never use tabs
#1352: FILE: hw/pci-host/mv643xx.h:325:
+#define MV64340_PCI_0_CS_1_BASE_ADDR_REMAP^I^I^I 0xd48$
ERROR: code indent should never use tabs
#1353: FILE: hw/pci-host/mv643xx.h:326:
+#define MV64340_PCI_1_CS_1_BASE_ADDR_REMAP^I^I^I 0xdc8$
ERROR: code indent should never use tabs
#1354: FILE: hw/pci-host/mv643xx.h:327:
+#define MV64340_PCI_0_CS_2_BASE_ADDR_REMAP^I^I^I 0xc4c$
ERROR: code indent should never use tabs
#1355: FILE: hw/pci-host/mv643xx.h:328:
+#define MV64340_PCI_1_CS_2_BASE_ADDR_REMAP^I^I^I 0xccc$
ERROR: code indent should never use tabs
#1356: FILE: hw/pci-host/mv643xx.h:329:
+#define MV64340_PCI_0_CS_3_BASE_ADDR_REMAP^I^I^I 0xd4c$
ERROR: code indent should never use tabs
#1357: FILE: hw/pci-host/mv643xx.h:330:
+#define MV64340_PCI_1_CS_3_BASE_ADDR_REMAP^I^I^I 0xdcc$
ERROR: code indent should never use tabs
#1358: FILE: hw/pci-host/mv643xx.h:331:
+#define MV64340_PCI_0_CS_0_BASE_HIGH_ADDR_REMAP^I^I^I 0xF04$
ERROR: code indent should never use tabs
#1359: FILE: hw/pci-host/mv643xx.h:332:
+#define MV64340_PCI_1_CS_0_BASE_HIGH_ADDR_REMAP^I^I^I 0xF84$
ERROR: code indent should never use tabs
#1360: FILE: hw/pci-host/mv643xx.h:333:
+#define MV64340_PCI_0_CS_1_BASE_HIGH_ADDR_REMAP^I^I^I 0xF08$
ERROR: code indent should never use tabs
#1361: FILE: hw/pci-host/mv643xx.h:334:
+#define MV64340_PCI_1_CS_1_BASE_HIGH_ADDR_REMAP^I^I^I 0xF88$
ERROR: code indent should never use tabs
#1362: FILE: hw/pci-host/mv643xx.h:335:
+#define MV64340_PCI_0_CS_2_BASE_HIGH_ADDR_REMAP^I^I^I 0xF0C$
ERROR: code indent should never use tabs
#1363: FILE: hw/pci-host/mv643xx.h:336:
+#define MV64340_PCI_1_CS_2_BASE_HIGH_ADDR_REMAP^I^I^I 0xF8C$
ERROR: code indent should never use tabs
#1364: FILE: hw/pci-host/mv643xx.h:337:
+#define MV64340_PCI_0_CS_3_BASE_HIGH_ADDR_REMAP^I^I^I 0xF10$
ERROR: code indent should never use tabs
#1365: FILE: hw/pci-host/mv643xx.h:338:
+#define MV64340_PCI_1_CS_3_BASE_HIGH_ADDR_REMAP^I^I^I 0xF90$
ERROR: code indent should never use tabs
#1366: FILE: hw/pci-host/mv643xx.h:339:
+#define MV64340_PCI_0_DEVCS_0_BASE_ADDR_REMAP^I^I^I 0xc50$
ERROR: code indent should never use tabs
#1367: FILE: hw/pci-host/mv643xx.h:340:
+#define MV64340_PCI_1_DEVCS_0_BASE_ADDR_REMAP^I^I^I 0xcd0$
ERROR: code indent should never use tabs
#1368: FILE: hw/pci-host/mv643xx.h:341:
+#define MV64340_PCI_0_DEVCS_1_BASE_ADDR_REMAP^I^I^I 0xd50$
ERROR: code indent should never use tabs
#1369: FILE: hw/pci-host/mv643xx.h:342:
+#define MV64340_PCI_1_DEVCS_1_BASE_ADDR_REMAP^I^I^I 0xdd0$
ERROR: code indent should never use tabs
#1370: FILE: hw/pci-host/mv643xx.h:343:
+#define MV64340_PCI_0_DEVCS_2_BASE_ADDR_REMAP^I^I^I 0xd58$
ERROR: code indent should never use tabs
#1371: FILE: hw/pci-host/mv643xx.h:344:
+#define MV64340_PCI_1_DEVCS_2_BASE_ADDR_REMAP^I^I^I 0xdd8$
ERROR: code indent should never use tabs
#1372: FILE: hw/pci-host/mv643xx.h:345:
+#define MV64340_PCI_0_DEVCS_3_BASE_ADDR_REMAP ^I 0xc54$
ERROR: code indent should never use tabs
#1373: FILE: hw/pci-host/mv643xx.h:346:
+#define MV64340_PCI_1_DEVCS_3_BASE_ADDR_REMAP ^I 0xcd4$
ERROR: code indent should never use tabs
#1374: FILE: hw/pci-host/mv643xx.h:347:
+#define MV64340_PCI_0_DEVCS_BOOTCS_BASE_ADDR_REMAP ^I 0xd54$
ERROR: code indent should never use tabs
#1375: FILE: hw/pci-host/mv643xx.h:348:
+#define MV64340_PCI_1_DEVCS_BOOTCS_BASE_ADDR_REMAP ^I 0xdd4$
ERROR: code indent should never use tabs
#1411: FILE: hw/pci-host/mv643xx.h:384:
+#define MV64340_PCI_0_COMMAND^I^I^I ^I 0xc00$
ERROR: code indent should never use tabs
#1412: FILE: hw/pci-host/mv643xx.h:385:
+#define MV64340_PCI_1_COMMAND^I^I^I^I^I 0xc80$
ERROR: code indent should never use tabs
#1415: FILE: hw/pci-host/mv643xx.h:388:
+#define MV64340_PCI_0_RETRY^I ^I ^I^I 0xc04$
ERROR: code indent should never use tabs
#1416: FILE: hw/pci-host/mv643xx.h:389:
+#define MV64340_PCI_1_RETRY^I^I^I^I 0xc84$
ERROR: code indent should never use tabs
#1478: FILE: hw/pci-host/mv643xx.h:451:
+#define MV64340_PCI_0_CONFIG_ADDR ^I^I^I^I 0xcf8$
ERROR: code indent should never use tabs
#1480: FILE: hw/pci-host/mv643xx.h:453:
+#define MV64340_PCI_1_CONFIG_ADDR ^I^I^I^I 0xc78$
ERROR: code indent should never use tabs
#1482: FILE: hw/pci-host/mv643xx.h:455:
+#define MV64340_PCI_0_INTERRUPT_ACKNOWLEDGE_VIRTUAL_REG^I 0xc34$
ERROR: code indent should never use tabs
#1483: FILE: hw/pci-host/mv643xx.h:456:
+#define MV64340_PCI_1_INTERRUPT_ACKNOWLEDGE_VIRTUAL_REG^I 0xcb4$
ERROR: code indent should never use tabs
#1489: FILE: hw/pci-host/mv643xx.h:462:
+#define MV64340_PCI_0_SERR_MASK^I^I^I^I^I 0xc28$
ERROR: code indent should never use tabs
#1490: FILE: hw/pci-host/mv643xx.h:463:
+#define MV64340_PCI_1_SERR_MASK^I^I^I^I^I 0xca8$
ERROR: code indent should never use tabs
#1515: FILE: hw/pci-host/mv643xx.h:488:
+#define MV64340_PCI_DEVICE_AND_VENDOR_ID ^I^I^I 0x000$
ERROR: code indent should never use tabs
#1516: FILE: hw/pci-host/mv643xx.h:489:
+#define MV64340_PCI_STATUS_AND_COMMAND^I^I^I^I 0x004$
ERROR: code indent should never use tabs
#1517: FILE: hw/pci-host/mv643xx.h:490:
+#define MV64340_PCI_CLASS_CODE_AND_REVISION_ID^I^I^I 0x008$
ERROR: code indent should never use tabs
#1518: FILE: hw/pci-host/mv643xx.h:491:
+#define MV64340_PCI_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE ^I 0x00C$
ERROR: code indent should never use tabs
#1520: FILE: hw/pci-host/mv643xx.h:493:
+#define MV64340_PCI_SCS_0_BASE_ADDR_LOW ^I ^I^I 0x010$
ERROR: code indent should never use tabs
#1521: FILE: hw/pci-host/mv643xx.h:494:
+#define MV64340_PCI_SCS_0_BASE_ADDR_HIGH ^I^I 0x014$
ERROR: code indent should never use tabs
#1522: FILE: hw/pci-host/mv643xx.h:495:
+#define MV64340_PCI_SCS_1_BASE_ADDR_LOW ^I ^I 0x018$
ERROR: code indent should never use tabs
#1523: FILE: hw/pci-host/mv643xx.h:496:
+#define MV64340_PCI_SCS_1_BASE_ADDR_HIGH ^I^I 0x01C$
ERROR: code indent should never use tabs
#1524: FILE: hw/pci-host/mv643xx.h:497:
+#define MV64340_PCI_INTERNAL_REG_MEM_MAPPED_BASE_ADDR_LOW ^I 0x020$
ERROR: code indent should never use tabs
#1525: FILE: hw/pci-host/mv643xx.h:498:
+#define MV64340_PCI_INTERNAL_REG_MEM_MAPPED_BASE_ADDR_HIGH ^I 0x024$
ERROR: code indent should never use tabs
#1526: FILE: hw/pci-host/mv643xx.h:499:
+#define MV64340_PCI_SUBSYSTEM_ID_AND_SUBSYSTEM_VENDOR_ID^I 0x02c$
ERROR: code indent should never use tabs
#1527: FILE: hw/pci-host/mv643xx.h:500:
+#define MV64340_PCI_EXPANSION_ROM_BASE_ADDR_REG^I 0x030$
ERROR: code indent should never use tabs
#1529: FILE: hw/pci-host/mv643xx.h:502:
+#define MV64340_PCI_INTERRUPT_PIN_AND_LINE ^I^I^I 0x03C$
ERROR: code indent should never use tabs
#1547: FILE: hw/pci-host/mv643xx.h:520:
+#define MV64340_PCI_SCS_2_BASE_ADDR_LOW ^I^I^I 0x110$
ERROR: code indent should never use tabs
#1548: FILE: hw/pci-host/mv643xx.h:521:
+#define MV64340_PCI_SCS_2_BASE_ADDR_HIGH^I^I^I 0x114$
ERROR: code indent should never use tabs
#1549: FILE: hw/pci-host/mv643xx.h:522:
+#define MV64340_PCI_SCS_3_BASE_ADDR_LOW ^I^I^I 0x118$
ERROR: code indent should never use tabs
#1550: FILE: hw/pci-host/mv643xx.h:523:
+#define MV64340_PCI_SCS_3_BASE_ADDR_HIGH^I^I^I 0x11c$
ERROR: code indent should never use tabs
#1551: FILE: hw/pci-host/mv643xx.h:524:
+#define MV64340_PCI_INTERNAL_SRAM_BASE_ADDR_LOW ^I 0x120$
ERROR: code indent should never use tabs
#1552: FILE: hw/pci-host/mv643xx.h:525:
+#define MV64340_PCI_INTERNAL_SRAM_BASE_ADDR_HIGH ^I 0x124$
ERROR: code indent should never use tabs
#1558: FILE: hw/pci-host/mv643xx.h:531:
+#define MV64340_PCI_DEVCS_0_BASE_ADDR_LOW^I ^I^I 0x210$
ERROR: code indent should never use tabs
#1559: FILE: hw/pci-host/mv643xx.h:532:
+#define MV64340_PCI_DEVCS_0_BASE_ADDR_HIGH ^I^I^I 0x214$
ERROR: code indent should never use tabs
#1560: FILE: hw/pci-host/mv643xx.h:533:
+#define MV64340_PCI_DEVCS_1_BASE_ADDR_LOW ^I^I^I 0x218$
ERROR: code indent should never use tabs
#1561: FILE: hw/pci-host/mv643xx.h:534:
+#define MV64340_PCI_DEVCS_1_BASE_ADDR_HIGH ^I^I 0x21c$
ERROR: code indent should never use tabs
#1562: FILE: hw/pci-host/mv643xx.h:535:
+#define MV64340_PCI_DEVCS_2_BASE_ADDR_LOW ^I^I^I 0x220$
ERROR: code indent should never use tabs
#1563: FILE: hw/pci-host/mv643xx.h:536:
+#define MV64340_PCI_DEVCS_2_BASE_ADDR_HIGH ^I^I 0x224$
ERROR: code indent should never use tabs
#1569: FILE: hw/pci-host/mv643xx.h:542:
+#define MV64340_PCI_DEVCS_3_BASE_ADDR_LOW^I ^I^I 0x310$
ERROR: code indent should never use tabs
#1570: FILE: hw/pci-host/mv643xx.h:543:
+#define MV64340_PCI_DEVCS_3_BASE_ADDR_HIGH ^I^I^I 0x314$
ERROR: code indent should never use tabs
#1571: FILE: hw/pci-host/mv643xx.h:544:
+#define MV64340_PCI_BOOT_CS_BASE_ADDR_LOW^I^I^I 0x318$
ERROR: code indent should never use tabs
#1572: FILE: hw/pci-host/mv643xx.h:545:
+#define MV64340_PCI_BOOT_CS_BASE_ADDR_HIGH ^I^I 0x31c$
ERROR: code indent should never use tabs
#1573: FILE: hw/pci-host/mv643xx.h:546:
+#define MV64340_PCI_CPU_BASE_ADDR_LOW ^I^I^I^I 0x220$
ERROR: code indent should never use tabs
#1574: FILE: hw/pci-host/mv643xx.h:547:
+#define MV64340_PCI_CPU_BASE_ADDR_HIGH ^I^I^I 0x224$
ERROR: code indent should never use tabs
#1580: FILE: hw/pci-host/mv643xx.h:553:
+#define MV64340_PCI_P2P_MEM0_BASE_ADDR_LOW ^I^I^I 0x410$
ERROR: code indent should never use tabs
#1581: FILE: hw/pci-host/mv643xx.h:554:
+#define MV64340_PCI_P2P_MEM0_BASE_ADDR_HIGH ^I^I^I 0x414$
ERROR: code indent should never use tabs
#1582: FILE: hw/pci-host/mv643xx.h:555:
+#define MV64340_PCI_P2P_MEM1_BASE_ADDR_LOW ^I^I^I 0x418$
ERROR: code indent should never use tabs
#1583: FILE: hw/pci-host/mv643xx.h:556:
+#define MV64340_PCI_P2P_MEM1_BASE_ADDR_HIGH ^I^I^I 0x41c$
ERROR: code indent should never use tabs
#1584: FILE: hw/pci-host/mv643xx.h:557:
+#define MV64340_PCI_P2P_I_O_BASE_ADDR ^I 0x420$
ERROR: code indent should never use tabs
#1588: FILE: hw/pci-host/mv643xx.h:561:
+/* Messaging Unit Registers (I20) ^I*/$
ERROR: code indent should never use tabs
#1591: FILE: hw/pci-host/mv643xx.h:564:
+#define MV64340_I2O_INBOUND_MESSAGE_REG0_PCI_0_SIDE^I^I 0x010$
ERROR: code indent should never use tabs
#1592: FILE: hw/pci-host/mv643xx.h:565:
+#define MV64340_I2O_INBOUND_MESSAGE_REG1_PCI_0_SIDE ^I^I 0x014$
ERROR: code indent should never use tabs
#1593: FILE: hw/pci-host/mv643xx.h:566:
+#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_PCI_0_SIDE ^I^I 0x018$
ERROR: code indent should never use tabs
#1594: FILE: hw/pci-host/mv643xx.h:567:
+#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_PCI_0_SIDE ^I^I 0x01C$
ERROR: code indent should never use tabs
#1595: FILE: hw/pci-host/mv643xx.h:568:
+#define MV64340_I2O_INBOUND_DOORBELL_REG_PCI_0_SIDE ^I^I 0x020$
ERROR: code indent should never use tabs
#1597: FILE: hw/pci-host/mv643xx.h:570:
+#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_PCI_0_SIDE^I 0x028$
ERROR: code indent should never use tabs
#1598: FILE: hw/pci-host/mv643xx.h:571:
+#define MV64340_I2O_OUTBOUND_DOORBELL_REG_PCI_0_SIDE ^I^I 0x02C$
ERROR: code indent should never use tabs
#1603: FILE: hw/pci-host/mv643xx.h:576:
+#define MV64340_I2O_QUEUE_CONTROL_REG_PCI_0_SIDE ^I^I 0x050$
ERROR: code indent should never use tabs
#1604: FILE: hw/pci-host/mv643xx.h:577:
+#define MV64340_I2O_QUEUE_BASE_ADDR_REG_PCI_0_SIDE ^I^I 0x054$
ERROR: code indent should never use tabs
#1614: FILE: hw/pci-host/mv643xx.h:587:
+#define MV64340_I2O_INBOUND_MESSAGE_REG0_PCI_1_SIDE^I^I 0x090$
ERROR: code indent should never use tabs
#1615: FILE: hw/pci-host/mv643xx.h:588:
+#define MV64340_I2O_INBOUND_MESSAGE_REG1_PCI_1_SIDE ^I^I 0x094$
ERROR: code indent should never use tabs
#1616: FILE: hw/pci-host/mv643xx.h:589:
+#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_PCI_1_SIDE ^I^I 0x098$
ERROR: code indent should never use tabs
#1617: FILE: hw/pci-host/mv643xx.h:590:
+#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_PCI_1_SIDE ^I^I 0x09C$
ERROR: code indent should never use tabs
#1618: FILE: hw/pci-host/mv643xx.h:591:
+#define MV64340_I2O_INBOUND_DOORBELL_REG_PCI_1_SIDE ^I^I 0x0A0$
ERROR: code indent should never use tabs
#1620: FILE: hw/pci-host/mv643xx.h:593:
+#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_PCI_1_SIDE^I 0x0A8$
ERROR: code indent should never use tabs
#1621: FILE: hw/pci-host/mv643xx.h:594:
+#define MV64340_I2O_OUTBOUND_DOORBELL_REG_PCI_1_SIDE ^I^I 0x0AC$
ERROR: code indent should never use tabs
#1626: FILE: hw/pci-host/mv643xx.h:599:
+#define MV64340_I2O_QUEUE_CONTROL_REG_PCI_1_SIDE ^I^I 0x0D0$
ERROR: code indent should never use tabs
#1627: FILE: hw/pci-host/mv643xx.h:600:
+#define MV64340_I2O_QUEUE_BASE_ADDR_REG_PCI_1_SIDE ^I^I 0x0D4$
ERROR: code indent should never use tabs
#1637: FILE: hw/pci-host/mv643xx.h:610:
+#define MV64340_I2O_INBOUND_MESSAGE_REG0_CPU0_SIDE^I^I 0x1C10$
ERROR: code indent should never use tabs
#1638: FILE: hw/pci-host/mv643xx.h:611:
+#define MV64340_I2O_INBOUND_MESSAGE_REG1_CPU0_SIDE ^I^I 0x1C14$
ERROR: code indent should never use tabs
#1639: FILE: hw/pci-host/mv643xx.h:612:
+#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_CPU0_SIDE ^I^I 0x1C18$
ERROR: code indent should never use tabs
#1640: FILE: hw/pci-host/mv643xx.h:613:
+#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_CPU0_SIDE ^I^I 0x1C1C$
ERROR: code indent should never use tabs
#1641: FILE: hw/pci-host/mv643xx.h:614:
+#define MV64340_I2O_INBOUND_DOORBELL_REG_CPU0_SIDE ^I^I 0x1C20$
ERROR: code indent should never use tabs
#1642: FILE: hw/pci-host/mv643xx.h:615:
+#define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_CPU0_SIDE ^I 0x1C24$
ERROR: code indent should never use tabs
#1643: FILE: hw/pci-host/mv643xx.h:616:
+#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_CPU0_SIDE^I 0x1C28$
ERROR: code indent should never use tabs
#1644: FILE: hw/pci-host/mv643xx.h:617:
+#define MV64340_I2O_OUTBOUND_DOORBELL_REG_CPU0_SIDE ^I^I 0x1C2C$
ERROR: code indent should never use tabs
#1649: FILE: hw/pci-host/mv643xx.h:622:
+#define MV64340_I2O_QUEUE_CONTROL_REG_CPU0_SIDE ^I^I 0x1C50$
ERROR: code indent should never use tabs
#1650: FILE: hw/pci-host/mv643xx.h:623:
+#define MV64340_I2O_QUEUE_BASE_ADDR_REG_CPU0_SIDE ^I^I 0x1C54$
ERROR: code indent should never use tabs
#1659: FILE: hw/pci-host/mv643xx.h:632:
+#define MV64340_I2O_INBOUND_MESSAGE_REG0_CPU1_SIDE^I^I 0x1C90$
ERROR: code indent should never use tabs
#1660: FILE: hw/pci-host/mv643xx.h:633:
+#define MV64340_I2O_INBOUND_MESSAGE_REG1_CPU1_SIDE ^I^I 0x1C94$
ERROR: code indent should never use tabs
#1661: FILE: hw/pci-host/mv643xx.h:634:
+#define MV64340_I2O_OUTBOUND_MESSAGE_REG0_CPU1_SIDE ^I^I 0x1C98$
ERROR: code indent should never use tabs
#1662: FILE: hw/pci-host/mv643xx.h:635:
+#define MV64340_I2O_OUTBOUND_MESSAGE_REG1_CPU1_SIDE ^I^I 0x1C9C$
ERROR: code indent should never use tabs
#1663: FILE: hw/pci-host/mv643xx.h:636:
+#define MV64340_I2O_INBOUND_DOORBELL_REG_CPU1_SIDE ^I^I 0x1CA0$
ERROR: code indent should never use tabs
#1664: FILE: hw/pci-host/mv643xx.h:637:
+#define MV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_CPU1_SIDE ^I 0x1CA4$
ERROR: code indent should never use tabs
#1665: FILE: hw/pci-host/mv643xx.h:638:
+#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_CPU1_SIDE^I 0x1CA8$
ERROR: code indent should never use tabs
#1666: FILE: hw/pci-host/mv643xx.h:639:
+#define MV64340_I2O_OUTBOUND_DOORBELL_REG_CPU1_SIDE ^I^I 0x1CAC$
ERROR: code indent should never use tabs
#1671: FILE: hw/pci-host/mv643xx.h:644:
+#define MV64340_I2O_QUEUE_CONTROL_REG_CPU1_SIDE ^I^I 0x1CD0$
ERROR: code indent should never use tabs
#1672: FILE: hw/pci-host/mv643xx.h:645:
+#define MV64340_I2O_QUEUE_BASE_ADDR_REG_CPU1_SIDE ^I^I 0x1CD4$
ERROR: code indent should never use tabs
#1683: FILE: hw/pci-host/mv643xx.h:656:
+/* Ethernet Unit Registers ^I^I*/$
WARNING: line over 80 characters
#1733: FILE: hw/pci-host/mv643xx.h:706:
+#define MV64340_MPSC_CAUSE_REG(port) (0xb804 + (port<<3))
ERROR: spaces required around that '<<' (ctx:VxV)
#1733: FILE: hw/pci-host/mv643xx.h:706:
+#define MV64340_MPSC_CAUSE_REG(port) (0xb804 + (port<<3))
^
WARNING: line over 80 characters
#1734: FILE: hw/pci-host/mv643xx.h:707:
+#define MV64340_MPSC_MASK_REG(port) (0xb884 + (port<<3))
ERROR: spaces required around that '<<' (ctx:VxV)
#1734: FILE: hw/pci-host/mv643xx.h:707:
+#define MV64340_MPSC_MASK_REG(port) (0xb884 + (port<<3))
^
WARNING: line over 80 characters
#1736: FILE: hw/pci-host/mv643xx.h:709:
+#define MV64340_MPSC_MAIN_CONFIG_LOW(port) (0x8000 + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1736: FILE: hw/pci-host/mv643xx.h:709:
+#define MV64340_MPSC_MAIN_CONFIG_LOW(port) (0x8000 + (port<<12))
^
WARNING: line over 80 characters
#1737: FILE: hw/pci-host/mv643xx.h:710:
+#define MV64340_MPSC_MAIN_CONFIG_HIGH(port) (0x8004 + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1737: FILE: hw/pci-host/mv643xx.h:710:
+#define MV64340_MPSC_MAIN_CONFIG_HIGH(port) (0x8004 + (port<<12))
^
WARNING: line over 80 characters
#1738: FILE: hw/pci-host/mv643xx.h:711:
+#define MV64340_MPSC_PROTOCOL_CONFIG(port) (0x8008 + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1738: FILE: hw/pci-host/mv643xx.h:711:
+#define MV64340_MPSC_PROTOCOL_CONFIG(port) (0x8008 + (port<<12))
^
WARNING: line over 80 characters
#1739: FILE: hw/pci-host/mv643xx.h:712:
+#define MV64340_MPSC_CHANNEL_REG1(port) (0x800c + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1739: FILE: hw/pci-host/mv643xx.h:712:
+#define MV64340_MPSC_CHANNEL_REG1(port) (0x800c + (port<<12))
^
WARNING: line over 80 characters
#1740: FILE: hw/pci-host/mv643xx.h:713:
+#define MV64340_MPSC_CHANNEL_REG2(port) (0x8010 + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1740: FILE: hw/pci-host/mv643xx.h:713:
+#define MV64340_MPSC_CHANNEL_REG2(port) (0x8010 + (port<<12))
^
WARNING: line over 80 characters
#1741: FILE: hw/pci-host/mv643xx.h:714:
+#define MV64340_MPSC_CHANNEL_REG3(port) (0x8014 + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1741: FILE: hw/pci-host/mv643xx.h:714:
+#define MV64340_MPSC_CHANNEL_REG3(port) (0x8014 + (port<<12))
^
WARNING: line over 80 characters
#1742: FILE: hw/pci-host/mv643xx.h:715:
+#define MV64340_MPSC_CHANNEL_REG4(port) (0x8018 + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1742: FILE: hw/pci-host/mv643xx.h:715:
+#define MV64340_MPSC_CHANNEL_REG4(port) (0x8018 + (port<<12))
^
WARNING: line over 80 characters
#1743: FILE: hw/pci-host/mv643xx.h:716:
+#define MV64340_MPSC_CHANNEL_REG5(port) (0x801c + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1743: FILE: hw/pci-host/mv643xx.h:716:
+#define MV64340_MPSC_CHANNEL_REG5(port) (0x801c + (port<<12))
^
WARNING: line over 80 characters
#1744: FILE: hw/pci-host/mv643xx.h:717:
+#define MV64340_MPSC_CHANNEL_REG6(port) (0x8020 + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1744: FILE: hw/pci-host/mv643xx.h:717:
+#define MV64340_MPSC_CHANNEL_REG6(port) (0x8020 + (port<<12))
^
WARNING: line over 80 characters
#1745: FILE: hw/pci-host/mv643xx.h:718:
+#define MV64340_MPSC_CHANNEL_REG7(port) (0x8024 + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1745: FILE: hw/pci-host/mv643xx.h:718:
+#define MV64340_MPSC_CHANNEL_REG7(port) (0x8024 + (port<<12))
^
WARNING: line over 80 characters
#1746: FILE: hw/pci-host/mv643xx.h:719:
+#define MV64340_MPSC_CHANNEL_REG8(port) (0x8028 + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1746: FILE: hw/pci-host/mv643xx.h:719:
+#define MV64340_MPSC_CHANNEL_REG8(port) (0x8028 + (port<<12))
^
WARNING: line over 80 characters
#1747: FILE: hw/pci-host/mv643xx.h:720:
+#define MV64340_MPSC_CHANNEL_REG9(port) (0x802c + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1747: FILE: hw/pci-host/mv643xx.h:720:
+#define MV64340_MPSC_CHANNEL_REG9(port) (0x802c + (port<<12))
^
WARNING: line over 80 characters
#1748: FILE: hw/pci-host/mv643xx.h:721:
+#define MV64340_MPSC_CHANNEL_REG10(port) (0x8030 + (port<<12))
ERROR: spaces required around that '<<' (ctx:VxV)
#1748: FILE: hw/pci-host/mv643xx.h:721:
+#define MV64340_MPSC_CHANNEL_REG10(port) (0x8030 + (port<<12))
^
WARNING: line over 80 characters
#1757: FILE: hw/pci-host/mv643xx.h:730:
+#define MV64340_SDMA_CONFIG_REG(channel) (0x4000 + (channel<<13))
ERROR: spaces required around that '<<' (ctx:VxV)
#1757: FILE: hw/pci-host/mv643xx.h:730:
+#define MV64340_SDMA_CONFIG_REG(channel) (0x4000 + (channel<<13))
^
WARNING: line over 80 characters
#1758: FILE: hw/pci-host/mv643xx.h:731:
+#define MV64340_SDMA_COMMAND_REG(channel) (0x4008 + (channel<<13))
ERROR: spaces required around that '<<' (ctx:VxV)
#1758: FILE: hw/pci-host/mv643xx.h:731:
+#define MV64340_SDMA_COMMAND_REG(channel) (0x4008 + (channel<<13))
^
WARNING: line over 80 characters
#1759: FILE: hw/pci-host/mv643xx.h:732:
+#define MV64340_SDMA_CURRENT_RX_DESCRIPTOR_POINTER(channel) (0x4810 + (channel<<13))
ERROR: spaces required around that '<<' (ctx:VxV)
#1759: FILE: hw/pci-host/mv643xx.h:732:
+#define MV64340_SDMA_CURRENT_RX_DESCRIPTOR_POINTER(channel) (0x4810 + (channel<<13))
^
WARNING: line over 80 characters
#1760: FILE: hw/pci-host/mv643xx.h:733:
+#define MV64340_SDMA_CURRENT_TX_DESCRIPTOR_POINTER(channel) (0x4c10 + (channel<<13))
ERROR: spaces required around that '<<' (ctx:VxV)
#1760: FILE: hw/pci-host/mv643xx.h:733:
+#define MV64340_SDMA_CURRENT_TX_DESCRIPTOR_POINTER(channel) (0x4c10 + (channel<<13))
^
WARNING: line over 80 characters
#1761: FILE: hw/pci-host/mv643xx.h:734:
+#define MV64340_SDMA_FIRST_TX_DESCRIPTOR_POINTER(channel) (0x4c14 + (channel<<13))
ERROR: spaces required around that '<<' (ctx:VxV)
#1761: FILE: hw/pci-host/mv643xx.h:734:
+#define MV64340_SDMA_FIRST_TX_DESCRIPTOR_POINTER(channel) (0x4c14 + (channel<<13))
^
WARNING: line over 80 characters
#1768: FILE: hw/pci-host/mv643xx.h:741:
+#define MV64340_BRG_CONFIG_REG(brg) (0xb200 + (brg<<3))
ERROR: spaces required around that '<<' (ctx:VxV)
#1768: FILE: hw/pci-host/mv643xx.h:741:
+#define MV64340_BRG_CONFIG_REG(brg) (0xb200 + (brg<<3))
^
WARNING: line over 80 characters
#1769: FILE: hw/pci-host/mv643xx.h:742:
+#define MV64340_BRG_BAUDE_TUNING_REG(brg) (0xb208 + (brg<<3))
ERROR: spaces required around that '<<' (ctx:VxV)
#1769: FILE: hw/pci-host/mv643xx.h:742:
+#define MV64340_BRG_BAUDE_TUNING_REG(brg) (0xb208 + (brg<<3))
^
ERROR: code indent should never use tabs
#1774: FILE: hw/pci-host/mv643xx.h:747:
+/* DMA Channel Control^I^I^I*/$
ERROR: code indent should never use tabs
#1777: FILE: hw/pci-host/mv643xx.h:750:
+#define MV64340_DMA_CHANNEL0_CONTROL ^I^I^I^I 0x840$
ERROR: code indent should never use tabs
#1778: FILE: hw/pci-host/mv643xx.h:751:
+#define MV64340_DMA_CHANNEL0_CONTROL_HIGH^I^I^I 0x880$
ERROR: code indent should never use tabs
#1779: FILE: hw/pci-host/mv643xx.h:752:
+#define MV64340_DMA_CHANNEL1_CONTROL ^I^I^I^I 0x844$
ERROR: code indent should never use tabs
#1780: FILE: hw/pci-host/mv643xx.h:753:
+#define MV64340_DMA_CHANNEL1_CONTROL_HIGH^I^I^I 0x884$
ERROR: code indent should never use tabs
#1781: FILE: hw/pci-host/mv643xx.h:754:
+#define MV64340_DMA_CHANNEL2_CONTROL ^I^I^I^I 0x848$
ERROR: code indent should never use tabs
#1782: FILE: hw/pci-host/mv643xx.h:755:
+#define MV64340_DMA_CHANNEL2_CONTROL_HIGH^I^I^I 0x888$
ERROR: code indent should never use tabs
#1783: FILE: hw/pci-host/mv643xx.h:756:
+#define MV64340_DMA_CHANNEL3_CONTROL ^I^I^I^I 0x84C$
ERROR: code indent should never use tabs
#1784: FILE: hw/pci-host/mv643xx.h:757:
+#define MV64340_DMA_CHANNEL3_CONTROL_HIGH^I^I^I 0x88C$
WARNING: Block comments use a leading /* on a separate line #1834: FILE: hw/pci-host/mv643xx.h:807:
+ /* IDMA Address Decoding High Address Remap and Access
WARNING: Block comments use * on subsequent lines #1835: FILE: hw/pci-host/mv643xx.h:808:
+ /* IDMA Address Decoding High Address Remap and Access
+ Protection Registers */
WARNING: Block comments use a trailing */ on a separate line #1835: FILE: hw/pci-host/mv643xx.h:808:
+ Protection Registers */
ERROR: code indent should never use tabs
#1868: FILE: hw/pci-host/mv643xx.h:841:
+/* Timer_Counter ^I^I^I*/$
ERROR: code indent should never use tabs
#1871: FILE: hw/pci-host/mv643xx.h:844:
+#define MV64340_TIMER_COUNTER0^I^I^I^I^I 0x850$
ERROR: code indent should never use tabs
#1872: FILE: hw/pci-host/mv643xx.h:845:
+#define MV64340_TIMER_COUNTER1^I^I^I^I^I 0x854$
ERROR: code indent should never use tabs
#1873: FILE: hw/pci-host/mv643xx.h:846:
+#define MV64340_TIMER_COUNTER2^I^I^I^I^I 0x858$
ERROR: code indent should never use tabs
#1874: FILE: hw/pci-host/mv643xx.h:847:
+#define MV64340_TIMER_COUNTER3^I^I^I^I^I 0x85C$
ERROR: code indent should never use tabs
#1875: FILE: hw/pci-host/mv643xx.h:848:
+#define MV64340_TIMER_COUNTER_0_3_CONTROL^I^I^I 0x864$
ERROR: code indent should never use tabs
#1876: FILE: hw/pci-host/mv643xx.h:849:
+#define MV64340_TIMER_COUNTER_0_3_INTERRUPT_CAUSE^I^I 0x868$
ERROR: code indent should never use tabs
#1877: FILE: hw/pci-host/mv643xx.h:850:
+#define MV64340_TIMER_COUNTER_0_3_INTERRUPT_MASK ^I^I 0x86c$
ERROR: code indent should never use tabs
#1880: FILE: hw/pci-host/mv643xx.h:853:
+/* Watchdog registers ^I */$
ERROR: code indent should never use tabs
#1911: FILE: hw/pci-host/mv643xx.h:884:
+/* Interrupts^I ^I^I^I*/$
total: 170 errors, 31 warnings, 1926 lines checked
Patch 5/6 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
6/6 Checking commit 42b2a155d898 (hw/ppc: Add emulation of Genesi/bPlan Pegasos II) === OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Quoted 46 lines · On Thu, Feb 25, 2021 at 12:10:55PM -0800, [email protected] wrote:
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PATCH v4 0/6] Pegasos2 emulation=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base >/dev/null|| exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl--mailback base..
=== TEST SCRIPT END ===Updating
3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu7ef8134..51db2d7 master -> master - [tag update] patchew/[email protected] -> patchew/[email protected] * [new tag] patchew/[email protected] -> patchew/[email protected]Switched to a new branch 'test'
42b2a15 hw/ppc: Add emulation of Genesi/bPlan Pegasos II
2b43495 hw/pci-host: Add emulation of Marvell MV64361 PPC system controller 0ba0ef2 vt82c686: Add emulation of VT8231 south bridge
4d547c7 vt82c686: AddVT8231_SUPERIObased onVIA_SUPERIOaf493ab vt82c686: QOM-ify superio related functionality
9041915 vt82c686: Implement control of serial port io ranges via config regs=== OUTPUT BEGIN ===
1/6 Checking commit 904191528152 (vt82c686: Implement control of serial port io ranges via config regs) 2/6 Checking commitaf493ab3ac51(vt82c686: QOM-ify superio related functionality)
3/6 Checking commit4d547c7dc19d(vt82c686: AddVT8231_SUPERIObased onVIA_SUPERIO) 4/6 Checking commit0ba0ef255e0d(vt82c686: Add emulation of VT8231 south bridge)
5/6 Checking commit2b43495ccd8f(hw/pci-host: Add emulation of Marvell MV64361 PPC system controller) Use of uninitialized value $acpi_testexpected in string eq at./scripts/checkpatch.plline 1529.
WARNING: added, moved or deleted file(s), doesMAINTAINERSneed updating?
#51:
new file mode 100644
Quoted 3 lines
WARNING: line over 80 characters
#307: FILE:hw/pci-host/mv64361.c:252:
+trace_mv64361_region_enable(!(val & mask) ? "enable" : "disable", i);
You will need to fix these style errors before merge.
Quoted 837 lines
ERROR: code indent should never use tabs
#1032: FILE:hw/pci-host/mv643xx.h:5:
+ * ^IAuthor: Matthew Dharm <[email protected]>$WARNING: architecture specific defines should be avoided #1040: FILE:
hw/pci-host/mv643xx.h:13:
+#ifndef__ASM_MV643XX_HWARNING: Block comments use a leading /* on a separate line #1102: FILE:
hw/pci-host/mv643xx.h:75:
+/* Enables the CS ,DEV_CS, PCI 0 and PCI 1WARNING: Block comments use * on subsequent lines
#1103: FILE:hw/pci-host/mv643xx.h:76:(quoted diff) +2
-0+/* Enables the CS , DEV_CS , PCI 0 and PCI 1 + windows above */WARNING: Block comments use a trailing */ on a separate line #1103: FILE:
hw/pci-host/mv643xx.h:76:
+ windows above */ERROR: code indent should never use tabs
#1206: FILE:hw/pci-host/mv643xx.h:179:
+/* CPU Interface Debug Registers ^I*/$ERROR: code indent should never use tabs
#1283: FILE:hw/pci-host/mv643xx.h:256:
+/* Device Parameters^I^I^I*/$ERROR: code indent should never use tabs
#1286: FILE:hw/pci-host/mv643xx.h:259:
+#define MV64340_DEVICE_BANK0_PARAMETERS^I^I^I^I 0x45c$ERROR: code indent should never use tabs
#1287: FILE:hw/pci-host/mv643xx.h:260:
+#define MV64340_DEVICE_BANK1_PARAMETERS^I^I^I^I 0x460$ERROR: code indent should never use tabs
#1288: FILE:hw/pci-host/mv643xx.h:261:
+#define MV64340_DEVICE_BANK2_PARAMETERS^I^I^I^I 0x464$ERROR: code indent should never use tabs
#1289: FILE:hw/pci-host/mv643xx.h:262:
+#define MV64340_DEVICE_BANK3_PARAMETERS^I^I^I^I 0x468$ERROR: code indent should never use tabs
#1290: FILE:hw/pci-host/mv643xx.h:263:
+#define MV64340_DEVICE_BOOT_BANK_PARAMETERS^I^I^I 0x46c$ERROR: code indent should never use tabs
#1297: FILE:hw/pci-host/mv643xx.h:270:
+/* Device interrupt registers^I^I*/$ERROR: code indent should never use tabs
#1300: FILE:hw/pci-host/mv643xx.h:273:
+#define MV64340_DEVICE_INTERRUPT_CAUSE^I^I^I^I 0x4d0$ERROR: code indent should never use tabs
#1301: FILE:hw/pci-host/mv643xx.h:274:
+#define MV64340_DEVICE_INTERRUPT_MASK^I^I^I^I 0x4d4$ERROR: code indent should never use tabs
#1302: FILE:hw/pci-host/mv643xx.h:275:
+#define MV64340_DEVICE_ERROR_ADDR^I^I^I^I 0x4d8$ERROR: code indent should never use tabs
#1303: FILE:hw/pci-host/mv643xx.h:276:
+#defineMV64340_DEVICE_ERROR_DATA^I^I^I^I 0x4dc$ERROR: code indent should never use tabs
#1304: FILE:hw/pci-host/mv643xx.h:277:
+#defineMV64340_DEVICE_ERROR_PARITY^I^I^I 0x4e0$ERROR: code indent should never use tabs
#1307: FILE:hw/pci-host/mv643xx.h:280:
+/* Device debug registers ^I^I*/$ERROR: code indent should never use tabs
#1310: FILE:hw/pci-host/mv643xx.h:283:
+#defineMV64340_DEVICE_DEBUG_LOW^I^I^I^I 0x4e4$ERROR: code indent should never use tabs
#1311: FILE:hw/pci-host/mv643xx.h:284:
+#defineMV64340_DEVICE_DEBUG_HIGH^I^I^I^I 0x4e8$ERROR: code indent should never use tabs
#1350: FILE:hw/pci-host/mv643xx.h:323:
+#define MV64340_PCI_0_CS_0_BASE_ADDR_REMAP^I^I^I 0xc48$ERROR: code indent should never use tabs
#1351: FILE:hw/pci-host/mv643xx.h:324:
+#define MV64340_PCI_1_CS_0_BASE_ADDR_REMAP^I^I^I 0xcc8$ERROR: code indent should never use tabs
#1352: FILE:hw/pci-host/mv643xx.h:325:
+#define MV64340_PCI_0_CS_1_BASE_ADDR_REMAP^I^I^I 0xd48$ERROR: code indent should never use tabs
#1353: FILE:hw/pci-host/mv643xx.h:326:
+#define MV64340_PCI_1_CS_1_BASE_ADDR_REMAP^I^I^I 0xdc8$ERROR: code indent should never use tabs
#1354: FILE:hw/pci-host/mv643xx.h:327:
+#define MV64340_PCI_0_CS_2_BASE_ADDR_REMAP^I^I^I 0xc4c$ERROR: code indent should never use tabs
#1355: FILE:hw/pci-host/mv643xx.h:328:
+#define MV64340_PCI_1_CS_2_BASE_ADDR_REMAP^I^I^I 0xccc$ERROR: code indent should never use tabs
#1356: FILE:hw/pci-host/mv643xx.h:329:
+#define MV64340_PCI_0_CS_3_BASE_ADDR_REMAP^I^I^I 0xd4c$ERROR: code indent should never use tabs
#1357: FILE:hw/pci-host/mv643xx.h:330:
+#define MV64340_PCI_1_CS_3_BASE_ADDR_REMAP^I^I^I 0xdcc$ERROR: code indent should never use tabs
#1358: FILE:hw/pci-host/mv643xx.h:331:
+#define MV64340_PCI_0_CS_0_BASE_HIGH_ADDR_REMAP^I^I^I 0xF04$ERROR: code indent should never use tabs
#1359: FILE:hw/pci-host/mv643xx.h:332:
+#define MV64340_PCI_1_CS_0_BASE_HIGH_ADDR_REMAP^I^I^I 0xF84$ERROR: code indent should never use tabs
#1360: FILE:hw/pci-host/mv643xx.h:333:
+#define MV64340_PCI_0_CS_1_BASE_HIGH_ADDR_REMAP^I^I^I 0xF08$ERROR: code indent should never use tabs
#1361: FILE:hw/pci-host/mv643xx.h:334:
+#define MV64340_PCI_1_CS_1_BASE_HIGH_ADDR_REMAP^I^I^I 0xF88$ERROR: code indent should never use tabs
#1362: FILE:hw/pci-host/mv643xx.h:335:
+#define MV64340_PCI_0_CS_2_BASE_HIGH_ADDR_REMAP^I^I^I 0xF0C$ERROR: code indent should never use tabs
#1363: FILE:hw/pci-host/mv643xx.h:336:
+#define MV64340_PCI_1_CS_2_BASE_HIGH_ADDR_REMAP^I^I^I 0xF8C$ERROR: code indent should never use tabs
#1364: FILE:hw/pci-host/mv643xx.h:337:
+#define MV64340_PCI_0_CS_3_BASE_HIGH_ADDR_REMAP^I^I^I 0xF10$ERROR: code indent should never use tabs
#1365: FILE:hw/pci-host/mv643xx.h:338:
+#define MV64340_PCI_1_CS_3_BASE_HIGH_ADDR_REMAP^I^I^I 0xF90$ERROR: code indent should never use tabs
#1366: FILE:hw/pci-host/mv643xx.h:339:
+#define MV64340_PCI_0_DEVCS_0_BASE_ADDR_REMAP^I^I^I 0xc50$ERROR: code indent should never use tabs
#1367: FILE:hw/pci-host/mv643xx.h:340:
+#define MV64340_PCI_1_DEVCS_0_BASE_ADDR_REMAP^I^I^I 0xcd0$ERROR: code indent should never use tabs
#1368: FILE:hw/pci-host/mv643xx.h:341:
+#define MV64340_PCI_0_DEVCS_1_BASE_ADDR_REMAP^I^I^I 0xd50$ERROR: code indent should never use tabs
#1369: FILE:hw/pci-host/mv643xx.h:342:
+#define MV64340_PCI_1_DEVCS_1_BASE_ADDR_REMAP^I^I^I 0xdd0$ERROR: code indent should never use tabs
#1370: FILE:hw/pci-host/mv643xx.h:343:
+#define MV64340_PCI_0_DEVCS_2_BASE_ADDR_REMAP^I^I^I 0xd58$ERROR: code indent should never use tabs
#1371: FILE:hw/pci-host/mv643xx.h:344:
+#define MV64340_PCI_1_DEVCS_2_BASE_ADDR_REMAP^I^I^I 0xdd8$ERROR: code indent should never use tabs
#1372: FILE:hw/pci-host/mv643xx.h:345:
+#defineMV64340_PCI_0_DEVCS_3_BASE_ADDR_REMAP^I 0xc54$ERROR: code indent should never use tabs
#1373: FILE:hw/pci-host/mv643xx.h:346:
+#defineMV64340_PCI_1_DEVCS_3_BASE_ADDR_REMAP^I 0xcd4$ERROR: code indent should never use tabs
#1374: FILE:hw/pci-host/mv643xx.h:347:
+#defineMV64340_PCI_0_DEVCS_BOOTCS_BASE_ADDR_REMAP^I 0xd54$ERROR: code indent should never use tabs
#1375: FILE:hw/pci-host/mv643xx.h:348:
+#defineMV64340_PCI_1_DEVCS_BOOTCS_BASE_ADDR_REMAP^I 0xdd4$ERROR: code indent should never use tabs
#1411: FILE:hw/pci-host/mv643xx.h:384:
+#define MV64340_PCI_0_COMMAND^I^I^I ^I 0xc00$ERROR: code indent should never use tabs
#1412: FILE:hw/pci-host/mv643xx.h:385:
+#define MV64340_PCI_1_COMMAND^I^I^I^I^I 0xc80$ERROR: code indent should never use tabs
#1415: FILE:hw/pci-host/mv643xx.h:388:
+#define MV64340_PCI_0_RETRY^I ^I ^I^I 0xc04$ERROR: code indent should never use tabs
#1416: FILE:hw/pci-host/mv643xx.h:389:
+#define MV64340_PCI_1_RETRY^I^I^I^I 0xc84$ERROR: code indent should never use tabs
#1478: FILE:hw/pci-host/mv643xx.h:451:
+#defineMV64340_PCI_0_CONFIG_ADDR^I^I^I^I 0xcf8$ERROR: code indent should never use tabs
#1480: FILE:hw/pci-host/mv643xx.h:453:
+#defineMV64340_PCI_1_CONFIG_ADDR^I^I^I^I 0xc78$ERROR: code indent should never use tabs
#1482: FILE:hw/pci-host/mv643xx.h:455:
+#define MV64340_PCI_0_INTERRUPT_ACKNOWLEDGE_VIRTUAL_REG^I 0xc34$ERROR: code indent should never use tabs
#1483: FILE:hw/pci-host/mv643xx.h:456:
+#define MV64340_PCI_1_INTERRUPT_ACKNOWLEDGE_VIRTUAL_REG^I 0xcb4$ERROR: code indent should never use tabs
#1489: FILE:hw/pci-host/mv643xx.h:462:
+#define MV64340_PCI_0_SERR_MASK^I^I^I^I^I 0xc28$ERROR: code indent should never use tabs
#1490: FILE:hw/pci-host/mv643xx.h:463:
+#define MV64340_PCI_1_SERR_MASK^I^I^I^I^I 0xca8$ERROR: code indent should never use tabs
#1515: FILE:hw/pci-host/mv643xx.h:488:
+#defineMV64340_PCI_DEVICE_AND_VENDOR_ID^I^I^I 0x000$ERROR: code indent should never use tabs
#1516: FILE:hw/pci-host/mv643xx.h:489:
+#define MV64340_PCI_STATUS_AND_COMMAND^I^I^I^I 0x004$ERROR: code indent should never use tabs
#1517: FILE:hw/pci-host/mv643xx.h:490:
+#define MV64340_PCI_CLASS_CODE_AND_REVISION_ID^I^I^I 0x008$ERROR: code indent should never use tabs
#1518: FILE:hw/pci-host/mv643xx.h:491:
+#defineMV64340_PCI_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE^I 0x00C$ERROR: code indent should never use tabs
#1520: FILE:hw/pci-host/mv643xx.h:493:
+#defineMV64340_PCI_SCS_0_BASE_ADDR_LOW^I ^I^I 0x010$ERROR: code indent should never use tabs
#1521: FILE:hw/pci-host/mv643xx.h:494:
+#defineMV64340_PCI_SCS_0_BASE_ADDR_HIGH^I^I 0x014$ERROR: code indent should never use tabs
#1522: FILE:hw/pci-host/mv643xx.h:495:
+#defineMV64340_PCI_SCS_1_BASE_ADDR_LOW^I ^I 0x018$ERROR: code indent should never use tabs
#1523: FILE:hw/pci-host/mv643xx.h:496:
+#defineMV64340_PCI_SCS_1_BASE_ADDR_HIGH^I^I 0x01C$ERROR: code indent should never use tabs
#1524: FILE:hw/pci-host/mv643xx.h:497:
+#defineMV64340_PCI_INTERNAL_REG_MEM_MAPPED_BASE_ADDR_LOW^I 0x020$ERROR: code indent should never use tabs
#1525: FILE:hw/pci-host/mv643xx.h:498:
+#defineMV64340_PCI_INTERNAL_REG_MEM_MAPPED_BASE_ADDR_HIGH^I 0x024$ERROR: code indent should never use tabs
#1526: FILE:hw/pci-host/mv643xx.h:499:
+#define MV64340_PCI_SUBSYSTEM_ID_AND_SUBSYSTEM_VENDOR_ID^I 0x02c$ERROR: code indent should never use tabs
#1527: FILE:hw/pci-host/mv643xx.h:500:
+#define MV64340_PCI_EXPANSION_ROM_BASE_ADDR_REG^I 0x030$ERROR: code indent should never use tabs
#1529: FILE:hw/pci-host/mv643xx.h:502:
+#defineMV64340_PCI_INTERRUPT_PIN_AND_LINE^I^I^I 0x03C$ERROR: code indent should never use tabs
#1547: FILE:hw/pci-host/mv643xx.h:520:
+#defineMV64340_PCI_SCS_2_BASE_ADDR_LOW^I^I^I 0x110$ERROR: code indent should never use tabs
#1548: FILE:hw/pci-host/mv643xx.h:521:
+#define MV64340_PCI_SCS_2_BASE_ADDR_HIGH^I^I^I 0x114$ERROR: code indent should never use tabs
#1549: FILE:hw/pci-host/mv643xx.h:522:
+#defineMV64340_PCI_SCS_3_BASE_ADDR_LOW^I^I^I 0x118$ERROR: code indent should never use tabs
#1550: FILE:hw/pci-host/mv643xx.h:523:
+#define MV64340_PCI_SCS_3_BASE_ADDR_HIGH^I^I^I 0x11c$ERROR: code indent should never use tabs
#1551: FILE:hw/pci-host/mv643xx.h:524:
+#defineMV64340_PCI_INTERNAL_SRAM_BASE_ADDR_LOW^I 0x120$ERROR: code indent should never use tabs
#1552: FILE:hw/pci-host/mv643xx.h:525:
+#defineMV64340_PCI_INTERNAL_SRAM_BASE_ADDR_HIGH^I 0x124$ERROR: code indent should never use tabs
#1558: FILE:hw/pci-host/mv643xx.h:531:
+#define MV64340_PCI_DEVCS_0_BASE_ADDR_LOW^I ^I^I 0x210$ERROR: code indent should never use tabs
#1559: FILE:hw/pci-host/mv643xx.h:532:
+#defineMV64340_PCI_DEVCS_0_BASE_ADDR_HIGH^I^I^I 0x214$ERROR: code indent should never use tabs
#1560: FILE:hw/pci-host/mv643xx.h:533:
+#defineMV64340_PCI_DEVCS_1_BASE_ADDR_LOW^I^I^I 0x218$ERROR: code indent should never use tabs
#1561: FILE:hw/pci-host/mv643xx.h:534:
+#defineMV64340_PCI_DEVCS_1_BASE_ADDR_HIGH^I^I 0x21c$ERROR: code indent should never use tabs
#1562: FILE:hw/pci-host/mv643xx.h:535:
+#defineMV64340_PCI_DEVCS_2_BASE_ADDR_LOW^I^I^I 0x220$ERROR: code indent should never use tabs
#1563: FILE:hw/pci-host/mv643xx.h:536:
+#defineMV64340_PCI_DEVCS_2_BASE_ADDR_HIGH^I^I 0x224$ERROR: code indent should never use tabs
#1569: FILE:hw/pci-host/mv643xx.h:542:
+#define MV64340_PCI_DEVCS_3_BASE_ADDR_LOW^I ^I^I 0x310$ERROR: code indent should never use tabs
#1570: FILE:hw/pci-host/mv643xx.h:543:
+#defineMV64340_PCI_DEVCS_3_BASE_ADDR_HIGH^I^I^I 0x314$ERROR: code indent should never use tabs
#1571: FILE:hw/pci-host/mv643xx.h:544:
+#define MV64340_PCI_BOOT_CS_BASE_ADDR_LOW^I^I^I 0x318$ERROR: code indent should never use tabs
#1572: FILE:hw/pci-host/mv643xx.h:545:
+#defineMV64340_PCI_BOOT_CS_BASE_ADDR_HIGH^I^I 0x31c$ERROR: code indent should never use tabs
#1573: FILE:hw/pci-host/mv643xx.h:546:
+#defineMV64340_PCI_CPU_BASE_ADDR_LOW^I^I^I^I 0x220$ERROR: code indent should never use tabs
#1574: FILE:hw/pci-host/mv643xx.h:547:
+#defineMV64340_PCI_CPU_BASE_ADDR_HIGH^I^I^I 0x224$ERROR: code indent should never use tabs
#1580: FILE:hw/pci-host/mv643xx.h:553:
+#defineMV64340_PCI_P2P_MEM0_BASE_ADDR_LOW^I^I^I 0x410$ERROR: code indent should never use tabs
#1581: FILE:hw/pci-host/mv643xx.h:554:
+#defineMV64340_PCI_P2P_MEM0_BASE_ADDR_HIGH^I^I^I 0x414$ERROR: code indent should never use tabs
#1582: FILE:hw/pci-host/mv643xx.h:555:
+#defineMV64340_PCI_P2P_MEM1_BASE_ADDR_LOW^I^I^I 0x418$ERROR: code indent should never use tabs
#1583: FILE:hw/pci-host/mv643xx.h:556:
+#defineMV64340_PCI_P2P_MEM1_BASE_ADDR_HIGH^I^I^I 0x41c$ERROR: code indent should never use tabs
#1584: FILE:hw/pci-host/mv643xx.h:557:
+#defineMV64340_PCI_P2P_I_O_BASE_ADDR^I 0x420$ERROR: code indent should never use tabs
#1588: FILE:hw/pci-host/mv643xx.h:561:
+/* Messaging Unit Registers (I20) ^I*/$ERROR: code indent should never use tabs
#1591: FILE:hw/pci-host/mv643xx.h:564:
+#define MV64340_I2O_INBOUND_MESSAGE_REG0_PCI_0_SIDE^I^I 0x010$ERROR: code indent should never use tabs
#1592: FILE:hw/pci-host/mv643xx.h:565:
+#defineMV64340_I2O_INBOUND_MESSAGE_REG1_PCI_0_SIDE^I^I 0x014$ERROR: code indent should never use tabs
#1593: FILE:hw/pci-host/mv643xx.h:566:
+#defineMV64340_I2O_OUTBOUND_MESSAGE_REG0_PCI_0_SIDE^I^I 0x018$ERROR: code indent should never use tabs
#1594: FILE:hw/pci-host/mv643xx.h:567:
+#defineMV64340_I2O_OUTBOUND_MESSAGE_REG1_PCI_0_SIDE^I^I 0x01C$ERROR: code indent should never use tabs
#1595: FILE:hw/pci-host/mv643xx.h:568:
+#defineMV64340_I2O_INBOUND_DOORBELL_REG_PCI_0_SIDE^I^I 0x020$ERROR: code indent should never use tabs
#1597: FILE:hw/pci-host/mv643xx.h:570:
+#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_PCI_0_SIDE^I 0x028$ERROR: code indent should never use tabs
#1598: FILE:hw/pci-host/mv643xx.h:571:
+#defineMV64340_I2O_OUTBOUND_DOORBELL_REG_PCI_0_SIDE^I^I 0x02C$ERROR: code indent should never use tabs
#1603: FILE:hw/pci-host/mv643xx.h:576:
+#defineMV64340_I2O_QUEUE_CONTROL_REG_PCI_0_SIDE^I^I 0x050$ERROR: code indent should never use tabs
#1604: FILE:hw/pci-host/mv643xx.h:577:
+#defineMV64340_I2O_QUEUE_BASE_ADDR_REG_PCI_0_SIDE^I^I 0x054$ERROR: code indent should never use tabs
#1614: FILE:hw/pci-host/mv643xx.h:587:
+#define MV64340_I2O_INBOUND_MESSAGE_REG0_PCI_1_SIDE^I^I 0x090$ERROR: code indent should never use tabs
#1615: FILE:hw/pci-host/mv643xx.h:588:
+#defineMV64340_I2O_INBOUND_MESSAGE_REG1_PCI_1_SIDE^I^I 0x094$ERROR: code indent should never use tabs
#1616: FILE:hw/pci-host/mv643xx.h:589:
+#defineMV64340_I2O_OUTBOUND_MESSAGE_REG0_PCI_1_SIDE^I^I 0x098$ERROR: code indent should never use tabs
#1617: FILE:hw/pci-host/mv643xx.h:590:
+#defineMV64340_I2O_OUTBOUND_MESSAGE_REG1_PCI_1_SIDE^I^I 0x09C$ERROR: code indent should never use tabs
#1618: FILE:hw/pci-host/mv643xx.h:591:
+#defineMV64340_I2O_INBOUND_DOORBELL_REG_PCI_1_SIDE^I^I 0x0A0$ERROR: code indent should never use tabs
#1620: FILE:hw/pci-host/mv643xx.h:593:
+#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_PCI_1_SIDE^I 0x0A8$ERROR: code indent should never use tabs
#1621: FILE:hw/pci-host/mv643xx.h:594:
+#defineMV64340_I2O_OUTBOUND_DOORBELL_REG_PCI_1_SIDE^I^I 0x0AC$ERROR: code indent should never use tabs
#1626: FILE:hw/pci-host/mv643xx.h:599:
+#defineMV64340_I2O_QUEUE_CONTROL_REG_PCI_1_SIDE^I^I 0x0D0$ERROR: code indent should never use tabs
#1627: FILE:hw/pci-host/mv643xx.h:600:
+#defineMV64340_I2O_QUEUE_BASE_ADDR_REG_PCI_1_SIDE^I^I 0x0D4$ERROR: code indent should never use tabs
#1637: FILE:hw/pci-host/mv643xx.h:610:
+#define MV64340_I2O_INBOUND_MESSAGE_REG0_CPU0_SIDE^I^I 0x1C10$ERROR: code indent should never use tabs
#1638: FILE:hw/pci-host/mv643xx.h:611:
+#defineMV64340_I2O_INBOUND_MESSAGE_REG1_CPU0_SIDE^I^I 0x1C14$ERROR: code indent should never use tabs
#1639: FILE:hw/pci-host/mv643xx.h:612:
+#defineMV64340_I2O_OUTBOUND_MESSAGE_REG0_CPU0_SIDE^I^I 0x1C18$ERROR: code indent should never use tabs
#1640: FILE:hw/pci-host/mv643xx.h:613:
+#defineMV64340_I2O_OUTBOUND_MESSAGE_REG1_CPU0_SIDE^I^I 0x1C1C$ERROR: code indent should never use tabs
#1641: FILE:hw/pci-host/mv643xx.h:614:
+#defineMV64340_I2O_INBOUND_DOORBELL_REG_CPU0_SIDE^I^I 0x1C20$ERROR: code indent should never use tabs
#1642: FILE:hw/pci-host/mv643xx.h:615:
+#defineMV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_CPU0_SIDE^I 0x1C24$ERROR: code indent should never use tabs
#1643: FILE:hw/pci-host/mv643xx.h:616:
+#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_CPU0_SIDE^I 0x1C28$ERROR: code indent should never use tabs
#1644: FILE:hw/pci-host/mv643xx.h:617:
+#defineMV64340_I2O_OUTBOUND_DOORBELL_REG_CPU0_SIDE^I^I 0x1C2C$ERROR: code indent should never use tabs
#1649: FILE:hw/pci-host/mv643xx.h:622:
+#defineMV64340_I2O_QUEUE_CONTROL_REG_CPU0_SIDE^I^I 0x1C50$ERROR: code indent should never use tabs
#1650: FILE:hw/pci-host/mv643xx.h:623:
+#defineMV64340_I2O_QUEUE_BASE_ADDR_REG_CPU0_SIDE^I^I 0x1C54$ERROR: code indent should never use tabs
#1659: FILE:hw/pci-host/mv643xx.h:632:
+#define MV64340_I2O_INBOUND_MESSAGE_REG0_CPU1_SIDE^I^I 0x1C90$ERROR: code indent should never use tabs
#1660: FILE:hw/pci-host/mv643xx.h:633:
+#defineMV64340_I2O_INBOUND_MESSAGE_REG1_CPU1_SIDE^I^I 0x1C94$ERROR: code indent should never use tabs
#1661: FILE:hw/pci-host/mv643xx.h:634:
+#defineMV64340_I2O_OUTBOUND_MESSAGE_REG0_CPU1_SIDE^I^I 0x1C98$ERROR: code indent should never use tabs
#1662: FILE:hw/pci-host/mv643xx.h:635:
+#defineMV64340_I2O_OUTBOUND_MESSAGE_REG1_CPU1_SIDE^I^I 0x1C9C$ERROR: code indent should never use tabs
#1663: FILE:hw/pci-host/mv643xx.h:636:
+#defineMV64340_I2O_INBOUND_DOORBELL_REG_CPU1_SIDE^I^I 0x1CA0$ERROR: code indent should never use tabs
#1664: FILE:hw/pci-host/mv643xx.h:637:
+#defineMV64340_I2O_INBOUND_INTERRUPT_CAUSE_REG_CPU1_SIDE^I 0x1CA4$ERROR: code indent should never use tabs
#1665: FILE:hw/pci-host/mv643xx.h:638:
+#define MV64340_I2O_INBOUND_INTERRUPT_MASK_REG_CPU1_SIDE^I 0x1CA8$ERROR: code indent should never use tabs
#1666: FILE:hw/pci-host/mv643xx.h:639:
+#defineMV64340_I2O_OUTBOUND_DOORBELL_REG_CPU1_SIDE^I^I 0x1CAC$ERROR: code indent should never use tabs
#1671: FILE:hw/pci-host/mv643xx.h:644:
+#defineMV64340_I2O_QUEUE_CONTROL_REG_CPU1_SIDE^I^I 0x1CD0$ERROR: code indent should never use tabs
#1672: FILE:hw/pci-host/mv643xx.h:645:
+#defineMV64340_I2O_QUEUE_BASE_ADDR_REG_CPU1_SIDE^I^I 0x1CD4$ERROR: code indent should never use tabs
#1683: FILE:hw/pci-host/mv643xx.h:656:
+/* Ethernet Unit Registers ^I^I*/$WARNING: line over 80 characters
#1733: FILE:hw/pci-host/mv643xx.h:706:
+#defineMV64340_MPSC_CAUSE_REG(port)(0xb804+ (port<<3))ERROR: spaces required around that '<<' (ctx:VxV)
#1733: FILE:hw/pci-host/mv643xx.h:706:
+#defineMV64340_MPSC_CAUSE_REG(port)(0xb804+ (port<<3))^WARNING: line over 80 characters
#1734: FILE:hw/pci-host/mv643xx.h:707:
+#defineMV64340_MPSC_MASK_REG(port)(0xb884+ (port<<3))ERROR: spaces required around that '<<' (ctx:VxV)
#1734: FILE:hw/pci-host/mv643xx.h:707:
+#defineMV64340_MPSC_MASK_REG(port)(0xb884+ (port<<3))^WARNING: line over 80 characters
#1736: FILE:hw/pci-host/mv643xx.h:709:
+#defineMV64340_MPSC_MAIN_CONFIG_LOW(port)(0x8000+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1736: FILE:hw/pci-host/mv643xx.h:709:
+#defineMV64340_MPSC_MAIN_CONFIG_LOW(port)(0x8000+ (port<<12))^WARNING: line over 80 characters
#1737: FILE:hw/pci-host/mv643xx.h:710:
+#defineMV64340_MPSC_MAIN_CONFIG_HIGH(port)(0x8004+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1737: FILE:hw/pci-host/mv643xx.h:710:
+#defineMV64340_MPSC_MAIN_CONFIG_HIGH(port)(0x8004+ (port<<12))^WARNING: line over 80 characters
#1738: FILE:hw/pci-host/mv643xx.h:711:
+#defineMV64340_MPSC_PROTOCOL_CONFIG(port)(0x8008+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1738: FILE:hw/pci-host/mv643xx.h:711:
+#defineMV64340_MPSC_PROTOCOL_CONFIG(port)(0x8008+ (port<<12))^WARNING: line over 80 characters
#1739: FILE:hw/pci-host/mv643xx.h:712:
+#defineMV64340_MPSC_CHANNEL_REG1(port)(0x800c+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1739: FILE:hw/pci-host/mv643xx.h:712:
+#defineMV64340_MPSC_CHANNEL_REG1(port)(0x800c+ (port<<12))^WARNING: line over 80 characters
#1740: FILE:hw/pci-host/mv643xx.h:713:
+#defineMV64340_MPSC_CHANNEL_REG2(port)(0x8010+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1740: FILE:hw/pci-host/mv643xx.h:713:
+#defineMV64340_MPSC_CHANNEL_REG2(port)(0x8010+ (port<<12))^WARNING: line over 80 characters
#1741: FILE:hw/pci-host/mv643xx.h:714:
+#defineMV64340_MPSC_CHANNEL_REG3(port)(0x8014+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1741: FILE:hw/pci-host/mv643xx.h:714:
+#defineMV64340_MPSC_CHANNEL_REG3(port)(0x8014+ (port<<12))^WARNING: line over 80 characters
#1742: FILE:hw/pci-host/mv643xx.h:715:
+#defineMV64340_MPSC_CHANNEL_REG4(port)(0x8018+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1742: FILE:hw/pci-host/mv643xx.h:715:
+#defineMV64340_MPSC_CHANNEL_REG4(port)(0x8018+ (port<<12))^WARNING: line over 80 characters
#1743: FILE:hw/pci-host/mv643xx.h:716:
+#defineMV64340_MPSC_CHANNEL_REG5(port)(0x801c+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1743: FILE:hw/pci-host/mv643xx.h:716:
+#defineMV64340_MPSC_CHANNEL_REG5(port)(0x801c+ (port<<12))^WARNING: line over 80 characters
#1744: FILE:hw/pci-host/mv643xx.h:717:
+#defineMV64340_MPSC_CHANNEL_REG6(port)(0x8020+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1744: FILE:hw/pci-host/mv643xx.h:717:
+#defineMV64340_MPSC_CHANNEL_REG6(port)(0x8020+ (port<<12))^WARNING: line over 80 characters
#1745: FILE:hw/pci-host/mv643xx.h:718:
+#defineMV64340_MPSC_CHANNEL_REG7(port)(0x8024+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1745: FILE:hw/pci-host/mv643xx.h:718:
+#defineMV64340_MPSC_CHANNEL_REG7(port)(0x8024+ (port<<12))^WARNING: line over 80 characters
#1746: FILE:hw/pci-host/mv643xx.h:719:
+#defineMV64340_MPSC_CHANNEL_REG8(port)(0x8028+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1746: FILE:hw/pci-host/mv643xx.h:719:
+#defineMV64340_MPSC_CHANNEL_REG8(port)(0x8028+ (port<<12))^WARNING: line over 80 characters
#1747: FILE:hw/pci-host/mv643xx.h:720:
+#defineMV64340_MPSC_CHANNEL_REG9(port)(0x802c+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1747: FILE:hw/pci-host/mv643xx.h:720:
+#defineMV64340_MPSC_CHANNEL_REG9(port)(0x802c+ (port<<12))^WARNING: line over 80 characters
#1748: FILE:hw/pci-host/mv643xx.h:721:
+#defineMV64340_MPSC_CHANNEL_REG10(port)(0x8030+ (port<<12))ERROR: spaces required around that '<<' (ctx:VxV)
#1748: FILE:hw/pci-host/mv643xx.h:721:
+#defineMV64340_MPSC_CHANNEL_REG10(port)(0x8030+ (port<<12))^WARNING: line over 80 characters
#1757: FILE:hw/pci-host/mv643xx.h:730:
+#defineMV64340_SDMA_CONFIG_REG(channel)(0x4000+ (channel<<13))ERROR: spaces required around that '<<' (ctx:VxV)
#1757: FILE:hw/pci-host/mv643xx.h:730:
+#defineMV64340_SDMA_CONFIG_REG(channel)(0x4000+ (channel<<13))^WARNING: line over 80 characters
#1758: FILE:hw/pci-host/mv643xx.h:731:
+#defineMV64340_SDMA_COMMAND_REG(channel)(0x4008+ (channel<<13))ERROR: spaces required around that '<<' (ctx:VxV)
#1758: FILE:hw/pci-host/mv643xx.h:731:
+#defineMV64340_SDMA_COMMAND_REG(channel)(0x4008+ (channel<<13))^WARNING: line over 80 characters
#1759: FILE:hw/pci-host/mv643xx.h:732:
+#defineMV64340_SDMA_CURRENT_RX_DESCRIPTOR_POINTER(channel)(0x4810+ (channel<<13))ERROR: spaces required around that '<<' (ctx:VxV)
#1759: FILE:hw/pci-host/mv643xx.h:732:
+#defineMV64340_SDMA_CURRENT_RX_DESCRIPTOR_POINTER(channel)(0x4810+ (channel<<13))^WARNING: line over 80 characters
#1760: FILE:hw/pci-host/mv643xx.h:733:
+#defineMV64340_SDMA_CURRENT_TX_DESCRIPTOR_POINTER(channel)(0x4c10+ (channel<<13))ERROR: spaces required around that '<<' (ctx:VxV)
#1760: FILE:hw/pci-host/mv643xx.h:733:
+#defineMV64340_SDMA_CURRENT_TX_DESCRIPTOR_POINTER(channel)(0x4c10+ (channel<<13))^WARNING: line over 80 characters
#1761: FILE:hw/pci-host/mv643xx.h:734:
+#defineMV64340_SDMA_FIRST_TX_DESCRIPTOR_POINTER(channel)(0x4c14+ (channel<<13))ERROR: spaces required around that '<<' (ctx:VxV)
#1761: FILE:hw/pci-host/mv643xx.h:734:
+#defineMV64340_SDMA_FIRST_TX_DESCRIPTOR_POINTER(channel)(0x4c14+ (channel<<13))^WARNING: line over 80 characters
#1768: FILE:hw/pci-host/mv643xx.h:741:
+#defineMV64340_BRG_CONFIG_REG(brg)(0xb200+ (brg<<3))ERROR: spaces required around that '<<' (ctx:VxV)
#1768: FILE:hw/pci-host/mv643xx.h:741:
+#defineMV64340_BRG_CONFIG_REG(brg)(0xb200+ (brg<<3))^WARNING: line over 80 characters
#1769: FILE:hw/pci-host/mv643xx.h:742:
+#defineMV64340_BRG_BAUDE_TUNING_REG(brg)(0xb208+ (brg<<3))ERROR: spaces required around that '<<' (ctx:VxV)
#1769: FILE:hw/pci-host/mv643xx.h:742:
+#defineMV64340_BRG_BAUDE_TUNING_REG(brg)(0xb208+ (brg<<3))^ERROR: code indent should never use tabs
#1774: FILE:hw/pci-host/mv643xx.h:747:
+/* DMA Channel Control^I^I^I*/$ERROR: code indent should never use tabs
#1777: FILE:hw/pci-host/mv643xx.h:750:
+#defineMV64340_DMA_CHANNEL0_CONTROL^I^I^I^I 0x840$ERROR: code indent should never use tabs
#1778: FILE:hw/pci-host/mv643xx.h:751:
+#define MV64340_DMA_CHANNEL0_CONTROL_HIGH^I^I^I 0x880$ERROR: code indent should never use tabs
#1779: FILE:hw/pci-host/mv643xx.h:752:
+#defineMV64340_DMA_CHANNEL1_CONTROL^I^I^I^I 0x844$ERROR: code indent should never use tabs
#1780: FILE:hw/pci-host/mv643xx.h:753:
+#define MV64340_DMA_CHANNEL1_CONTROL_HIGH^I^I^I 0x884$ERROR: code indent should never use tabs
#1781: FILE:hw/pci-host/mv643xx.h:754:
+#defineMV64340_DMA_CHANNEL2_CONTROL^I^I^I^I 0x848$ERROR: code indent should never use tabs
#1782: FILE:hw/pci-host/mv643xx.h:755:
+#define MV64340_DMA_CHANNEL2_CONTROL_HIGH^I^I^I 0x888$ERROR: code indent should never use tabs
#1783: FILE:hw/pci-host/mv643xx.h:756:
+#defineMV64340_DMA_CHANNEL3_CONTROL^I^I^I^I 0x84C$ERROR: code indent should never use tabs
#1784: FILE:hw/pci-host/mv643xx.h:757:
+#define MV64340_DMA_CHANNEL3_CONTROL_HIGH^I^I^I 0x88C$WARNING: Block comments use a leading /* on a separate line #1834: FILE:
hw/pci-host/mv643xx.h:807:
+ /* IDMA Address Decoding High Address Remap and AccessWARNING: Block comments use * on subsequent lines #1835: FILE:
hw/pci-host/mv643xx.h:808:
+ /* IDMA Address Decoding High Address Remap and Access
+ Protection Registers */WARNING: Block comments use a trailing */ on a separate line #1835: FILE:
hw/pci-host/mv643xx.h:808:
+ Protection Registers */ERROR: code indent should never use tabs
#1868: FILE:hw/pci-host/mv643xx.h:841:
+/*Timer_Counter^I^I^I*/$ERROR: code indent should never use tabs
#1871: FILE:hw/pci-host/mv643xx.h:844:
+#define MV64340_TIMER_COUNTER0^I^I^I^I^I 0x850$ERROR: code indent should never use tabs
#1872: FILE:hw/pci-host/mv643xx.h:845:
+#define MV64340_TIMER_COUNTER1^I^I^I^I^I 0x854$ERROR: code indent should never use tabs
#1873: FILE:hw/pci-host/mv643xx.h:846:
+#define MV64340_TIMER_COUNTER2^I^I^I^I^I 0x858$ERROR: code indent should never use tabs
#1874: FILE:hw/pci-host/mv643xx.h:847:
+#define MV64340_TIMER_COUNTER3^I^I^I^I^I 0x85C$ERROR: code indent should never use tabs
#1875: FILE:hw/pci-host/mv643xx.h:848:
+#define MV64340_TIMER_COUNTER_0_3_CONTROL^I^I^I 0x864$ERROR: code indent should never use tabs
#1876: FILE:hw/pci-host/mv643xx.h:849:
+#define MV64340_TIMER_COUNTER_0_3_INTERRUPT_CAUSE^I^I 0x868$ERROR: code indent should never use tabs
#1877: FILE:hw/pci-host/mv643xx.h:850:
+#defineMV64340_TIMER_COUNTER_0_3_INTERRUPT_MASK^I^I 0x86c$ERROR: code indent should never use tabs
#1880: FILE:hw/pci-host/mv643xx.h:853:
+/* Watchdog registers ^I */$ERROR: code indent should never use tabs
#1911: FILE:hw/pci-host/mv643xx.h:884:
+/* Interrupts^I ^I^I^I*/$total: 170 errors, 31 warnings, 1926 lines checked
Patch 5/6 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in
MAINTAINERS.6/6 Checking commit
42b2a155d898(hw/ppc: Add emulation of Genesi/bPlan Pegasos II) === OUTPUT END ===Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 19 lines · BALATON Zoltan
Hello,
This is adding a new PPC board called pegasos2. More info on it can be found at:
https://osdn.net/projects/qmiga/wiki/SubprojectPegasos2
Currently it needs a firmware ROM image that I cannot include due to original copyright holder (bPlan) did not release it under a free licence but I have plans to write a replacement in the future. With the original board firmware it can boot MorphOS now as:
qemu-system-ppc -M pegasos2 -cdrom morphos.iso -device ati-vga,romfile="" -serial stdio
then enter "boot cd boot.img" at the firmware "ok" prompt as described in the MorphOS.readme. To boot Linux use same command line with e.g. -cdrom debian-8.11.0-powerpc-netinst.iso then enter
"boot cd install/pegasos"
Quoted 8 lines
The last patch adds the actual board code after previous patches adding VT8231 and MV64361 system controller chip emulation. The
mv643xx.hheader file is taken from Linux and produces a bunch of checkpatch warnings due to different formatting rules it follows, I'm not sure we want to adopt it and change formatting or keep it as it is.Regards,
BALATON Zoltan
The ppc specific parts (patches 5 & 6) look generally sane to me. I haven't looked in great depth, since the threshold for entirely new devices is pretty low.
I'd be happy to queue this in the ppc tree, but I'll need acks from the relevant maintainers for the changes to the existing VIA bridge devices.
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson