Re: [PULL 00/22] ppc-for-6.0 queue 20210106

2021-01-06 Thread BALATON Zoltan via
DRC reset problems from Greg Kurz * QOM conversion of the PPC 4xx UIC devices from Peter Maydell * Some other assorted fixes and cleanups BALATON Zoltan via (5): ppc4xx: Move common dependency on serial to common option

[PATCH 1/3] Revert "sam460ex: Remove FDT_PPC dependency from KConfig"

2021-01-06 Thread BALATON Zoltan via
This reverts commit 038da2adf that was mistakenly added, this dependency is still needed to get libfdt dependencies even if fdt.o is not needed by sam460ex. Signed-off-by: BALATON Zoltan --- hw/ppc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index

[PATCH 3/3] sam460ex: Use type cast macro instead of simple cast

2021-01-06 Thread BALATON Zoltan via
Use the PCI_BUS type cast macro to convert result of qdev_get_child_bus(). Also remove the check for NULL afterwards which should not be needed because sysbus_create_simple() uses error_abort and PCI_BUS macro also checks its argument by default so this shouldn't fail here. Signed-off-by: BALATON

[PATCH 2/3] Revert "ppc4xx: Move common dependency on serial to common option"

2021-01-06 Thread BALATON Zoltan via
This reverts commit e6d5106786 which was added mistakenly. While this change works it was suggested during review that keeping dependencies explicit for each board may be better than listing them in a common option so keep the previous version and revert this change. Signed-off-by: BALATON Zoltan

[PATCH 0/3] Fix up sam460ex fixes

2021-01-06 Thread BALATON Zoltan via
Accidentally the wrong version of this series was committed, this series fixes that up to the last version that was meant to be merged. BALATON Zoltan (3): Revert "sam460ex: Remove FDT_PPC dependency from KConfig" Revert "ppc4xx: Move common dependency on serial to common option" sam460ex:

Re: [PULL 00/22] ppc-for-6.0 queue 20210106

2021-01-05 Thread BALATON Zoltan via
of the PPC 4xx UIC devices from Peter Maydell * Some other assorted fixes and cleanups BALATON Zoltan via (5): ppc4xx: Move common dependency on serial to common option sam460ex: Remove FDT_PPC dependency from KConfig I've sent

[PATCH v4 3/4] ppc440_pcix: Fix up pci config access

2021-01-04 Thread BALATON Zoltan via
This fixes a long standing issue with MorphOS booting on sam460ex which turns out to be because of suspicious values written to PCI config address that apparently works on real machine but caused wrong access on this device model. This replaces a previous work around for this with a better fix

[PATCH v4 4/4] sam460ex: Use type cast macro instead of simple cast

2021-01-04 Thread BALATON Zoltan via
Use the PCI_BUS type cast macro to convert result of qdev_get_child_bus(). Also remove the check for NULL afterwards which should not be needed because sysbus_create_simple() uses error_abort and PCI_BUS macro also checks its argument by default so this shouldn't fail here. Signed-off-by: BALATON

[PATCH v4 2/4] ppc440_pcix: Fix register write trace event

2021-01-04 Thread BALATON Zoltan via
The trace event for pci_host_config_write() was also using the trace event for read. Add corresponding trace and correct this. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/ppc/ppc440_pcix.c | 2 +- hw/ppc/trace-events | 1 + 2 files changed, 2 insertions(+), 1

[PATCH v4 0/4] Misc sam460ex fixes (was: Clean up sam460ex irq mapping)

2021-01-04 Thread BALATON Zoltan via
Changes from v3: - removed first two patches changing Kconfig because the FDT one seems to be needed so we should not remove those from KConfig and there was some question about patch 1 - added a new patch to use type cast macro in sam460ex.c - the other 3 patches should be the same as in v3

[PATCH v4 1/4] ppc440_pcix: Improve comment for IRQ mapping

2021-01-04 Thread BALATON Zoltan via
The code mapping all PCI interrupts to a single CPU IRQ works but is not trivial so document it in a comment. Signed-off-by: BALATON Zoltan --- hw/ppc/ppc440_pcix.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c index

Re: [PATCH v2 2/3] sam460ex: Remove FDT_PPC dependency from KConfig

2021-01-03 Thread BALATON Zoltan via
On Thu, 31 Dec 2020, BALATON Zoltan via wrote: Dependency on FDT_PPC was added in commit b0048f76095 ("hw/ppc/Kconfig: Only select FDT helper for machines using it") but it does not seem to be really necessary so remove it again. Signed-off-by: BALATON Zoltan --- v2: Do not rem

Re: [PATCH v3 1/5] ppc4xx: Move common dependency on serial to common option

2021-01-03 Thread BALATON Zoltan via
On Sun, 3 Jan 2021, Thomas Huth wrote: On 03/01/2021 02.09, BALATON Zoltan via wrote: All machines that select SERIAL also select PPC4XX so we can just add this common dependency there once. Signed-off-by: BALATON Zoltan --- hw/ppc/Kconfig | 5 + 1 file changed, 1 insertion(+), 4

Re: [PATCH v3 0/5] Misc sam460ex fixes (was: Clean up sam460ex irq mapping)

2021-01-03 Thread BALATON Zoltan via
On Mon, 4 Jan 2021, David Gibson wrote: On Sun, Jan 03, 2021 at 02:09:33AM +0100, BALATON Zoltan via wrote: So this is v3 of a series that started to fix a potential problem with irq mapping in pci440_pcix (used by sam460ex) that got some other fixes along the way as by-products. But it turns

Re: [PATCH v2 1/3] ppc4xx: Move common dependency on serial to common option

2021-01-03 Thread BALATON Zoltan via
On Mon, 4 Jan 2021, David Gibson wrote: On Thu, Dec 31, 2020 at 12:11:55PM +0100, BALATON Zoltan via wrote: All machines that select SERIAL also select PPC4XX so we can just add this common dependency there once. Signed-off-by: BALATON Zoltan Applied to ppc-for-6.0. Not yet please, I'll

Re: [RFC PATCH 2/5] via-ide: Fix fuloong2e support

2021-01-03 Thread BALATON Zoltan via
On Sun, 3 Jan 2021, Mark Cave-Ayland wrote: On 01/01/2021 23:12, Philippe Mathieu-Daudé wrote: From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config)

Re: [PATCH 00/24] vt82c686b clean ups and vt8231 emulation - all in one

2021-01-03 Thread BALATON Zoltan via
On Sun, 3 Jan 2021, Philippe Mathieu-Daudé wrote: On 1/3/21 3:27 PM, BALATON Zoltan via wrote: On Sun, 3 Jan 2021, Philippe Mathieu-Daudé wrote: On 1/2/21 11:43 AM, BALATON Zoltan via wrote: Hello, This is an all in one series containing all the patches from my previous part I and part II

Re: [RFC PATCH 0/5] hw/mips: Fix Fuloong2E to boot Linux guest again

2021-01-03 Thread BALATON Zoltan via
On Sun, 3 Jan 2021, Mark Cave-Ayland wrote: On 01/01/2021 23:56, BALATON Zoltan via wrote: But Mark still considered that a horrible hack but after looking more closely he also found the difficulty of implementing a more faithful emulation so he would accept the flag at the end but still

Re: [PATCH 00/24] vt82c686b clean ups and vt8231 emulation - all in one

2021-01-03 Thread BALATON Zoltan via
On Sun, 3 Jan 2021, Philippe Mathieu-Daudé wrote: On 1/2/21 11:43 AM, BALATON Zoltan via wrote: Hello, This is an all in one series containing all the patches from my previous part I and part II vt82c686b clean up series plus the end of it to finally add vt8231 emulation that will be used

Re: [PATCH v2 3/3] sam460ex: Clean up irq mapping

2021-01-02 Thread BALATON Zoltan via
On Fri, 1 Jan 2021, Peter Maydell wrote: On Thu, 31 Dec 2020 at 20:55, BALATON Zoltan wrote: The SoC is called 460EX (despite having a PPC 440 core not 460 one) but I think you've looked at the right data sheet and it's just a typo. I also don't know how the board is wired so I think in this

[PATCH v3 4/5] ppc440_pcix: Fix register write trace event

2021-01-02 Thread BALATON Zoltan via
The trace event for pci_host_config_write() was also using the trace event for read. Add corresponding trace and correct this. Signed-off-by: BALATON Zoltan --- hw/ppc/ppc440_pcix.c | 2 +- hw/ppc/trace-events | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH v3 2/5] sam460ex: Remove FDT_PPC dependency from KConfig

2021-01-02 Thread BALATON Zoltan via
Dependency on FDT_PPC was added in commit b0048f76095 ("hw/ppc/Kconfig: Only select FDT helper for machines using it") but it does not seem to be really necessary so remove it again. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/ppc/Kconfig | 1 - 1 file changed, 1

[PATCH v3 3/5] ppc440_pcix: Improve comment for IRQ mapping

2021-01-02 Thread BALATON Zoltan via
The code mapping all PCI interrupts to a single CPU IRQ works but is not trivial so document it in a comment. Signed-off-by: BALATON Zoltan --- hw/ppc/ppc440_pcix.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/ppc/ppc440_pcix.c b/hw/ppc/ppc440_pcix.c index

[PATCH v3 5/5] ppc440_pcix: Fix up pci config access

2021-01-02 Thread BALATON Zoltan via
This fixes a long standing issue with MorphOS booting on sam460ex which turns out to be because of suspicious values written to PCI config address that apparently works on real machine but caused wrong access on this device model. This replaces a previous work around for this with a better fix

[PATCH v3 1/5] ppc4xx: Move common dependency on serial to common option

2021-01-02 Thread BALATON Zoltan via
All machines that select SERIAL also select PPC4XX so we can just add this common dependency there once. Signed-off-by: BALATON Zoltan --- hw/ppc/Kconfig | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index dd86e664d2..8548f42b0d 100644

[PATCH v3 0/5] Misc sam460ex fixes (was: Clean up sam460ex irq mapping)

2021-01-02 Thread BALATON Zoltan via
So this is v3 of a series that started to fix a potential problem with irq mapping in pci440_pcix (used by sam460ex) that got some other fixes along the way as by-products. But it turns out the irq issue this was trying to fix is not really a problem so finally we just update the comment for now

Re: [RFC PATCH 3/5] hw/pci-host/bonito: Remap PCI "lo" regions when PCIMAP reg is modified

2021-01-02 Thread BALATON Zoltan via
On Sat, 2 Jan 2021, Peter Maydell wrote: On Sat, 2 Jan 2021 at 11:22, BALATON Zoltan wrote: I have similar code in the series I've just posted where I'm mapping regions of serial devices. I did consider using set_enabled and set_address but ended up with removing and adding regions because I'm

[PATCH 24/24] vt82c686: Add emulation of VT8231 south bridge

2021-01-02 Thread BALATON Zoltan via
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 --- hw/isa/vt82c686.c | 152 ++

[PATCH 14/24] vt82c686: Reorganise code

2021-01-02 Thread BALATON Zoltan via
Move lines around so that object definitions become consecutive and not scattered around. This brings functions belonging to an object together so it's clearer what is defined and what parts belong to which object. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 279

[PATCH 22/24] vt82c686: QOM-ify superio related functionality

2021-01-02 Thread BALATON Zoltan via
Collect 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. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 240

[PATCH 16/24] vt82c686: Fix up power management io base and config

2021-01-02 Thread BALATON Zoltan via
Similar to the SMBus io registers there is a power management io range that is set via similar base address reg and enable bit. Some handling of this was already there but with several problems: using the wrong registers and bits, wrong size range, not acually updating mapping and handling reset

[PATCH 18/24] vt82c686: Simplify vt82c686b_realize()

2021-01-02 Thread BALATON Zoltan via
Remove unneeded variables and setting value to 0 on zero initialised data and replace check for error with error_fatal. Rationalise loop that sets PCI config header fields read only. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 20 ++-- 1 file changed, 6 insertions(+),

[PATCH 19/24] vt82c686: Move creation of ISA devices to the ISA bridge

2021-01-02 Thread BALATON Zoltan via
Currently the ISA devices that are part of the VIA south bridge, superio chip are wired up by board code. Move creation of these ISA devices to the VIA ISA bridge model so that board code does not need to access ISA bus. This also allows vt82c686b-superio to be made internal to vt82c686 which

[PATCH 10/24] vt82c686: Remove unneeded includes and defines

2021-01-02 Thread BALATON Zoltan via
These are not used or not needed. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index d7ce15bf9f..02d6759c00 100644 --- a/hw/isa/vt82c686.c +++

Re: [RFC PATCH 3/5] hw/pci-host/bonito: Remap PCI "lo" regions when PCIMAP reg is modified

2021-01-02 Thread BALATON Zoltan via
On Sat, 2 Jan 2021, Philippe Mathieu-Daudé wrote: On 1/2/21 12:19 AM, Peter Maydell wrote: On Fri, 1 Jan 2021 at 23:12, Philippe Mathieu-Daudé wrote: Per the datasheet (Chapter 5.7.1. "PCI address regions"), the PCIMAP register: Map the 64Mbyte regions marked "PCI_Lo" in the CPU's memory

[PATCH 20/24] vt82c686: Fix superio_cfg_{read,write}() functions

2021-01-02 Thread BALATON Zoltan via
These functions are memory region callbacks so we have to check against relative address not the mapped address. Also reduce indentation by returning early and log unimplemented accesses. Additionally we remove separate index value from SuperIOConfig and store the index at reg 0 which is reserved

[PATCH 23/24] vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO

2021-01-02 Thread BALATON Zoltan via
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_SUPERIO subclass based on the abstract VIA_SUPERIO class to emulate the superio part of VT8231.

[PATCH 15/24] vt82c686: Fix SMBus IO base and configuration registers

2021-01-02 Thread BALATON Zoltan via
The base address of the SMBus io ports and its enabled status is set by registers in the PCI config space but this was not correctly emulated. Instead the SMBus registers were mapped on realize to the base address set by a property to the address expected by fuloong2e firmware. Fix the base and

[PATCH 09/24] vt82c686: Convert debug printf to trace points

2021-01-02 Thread BALATON Zoltan via
Drop DPRINTF and use trace functions instead. Two debug messages about unimplemented registers could be converted to qemu_log_mask() but in reality all registers are currently unimplemented (we just store and return values of writable regs but do nothing with them). As we already trace register

[PATCH 21/24] vt82c686: Implement control of serial port io ranges via config regs

2021-01-02 Thread BALATON Zoltan via
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

[PATCH 00/24] vt82c686b clean ups and vt8231 emulation - all in one

2021-01-02 Thread BALATON Zoltan via
Hello, This is an all in one series containing all the patches from my previous part I and part II vt82c686b clean up series plus the end of it to finally add vt8231 emulation that will be used by subsequent ppc/pegasos2 emulation. I consider this finished for now and good enough to get in also

[PATCH 17/24] vt82c686: Make vt82c686b-pm an abstract base class and add vt8231-pm based on it

2021-01-02 Thread BALATON Zoltan via
The vt82c686b-pm model can be shared between VT82C686B and VT8231. The only difference between the two is the device id in what we emulate so make an abstract via-pm model by renaming appropriately and add types for vt82c686b-pm and vt8231-pm based on it. Signed-off-by: BALATON Zoltan ---

[PATCH 11/24] vt82c686: Use shorter name for local variable holding object state

2021-01-02 Thread BALATON Zoltan via
Rename local variable holding object state for readability and consistency. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 02d6759c00..2633cfe7dc

[PATCH 02/24] vt82c686: Remove unnecessary _DEVICE suffix from type macros

2021-01-02 Thread BALATON Zoltan via
There's no reason to suffix everything with _DEVICE when the names are already unique without it and shorter names are more readable. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 48 +++ 1 file changed, 23

[PATCH 12/24] vt82c686: Rename superio config related parts

2021-01-02 Thread BALATON Zoltan via
Use less confusing naming for superio config register handling related parts that makes it clearer what belongs to this part. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 48 +++ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git

[PATCH 08/24] vt82c686: Remove legacy vt82c686b_pm_init() function

2021-01-02 Thread BALATON Zoltan via
Remove legacy vt82c686b_pm_init() function and also rename VT82C686B_PM type name to match other device names. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 18 -- hw/mips/fuloong2e.c | 5 -

[PATCH 06/24] audio/via-ac97: Simplify code and set user_creatable to false

2021-01-02 Thread BALATON Zoltan via
Remove some unneded, empty code and set user_creatable to false (besides being not implemented yet, so does nothing anyway) it's also normally part of VIA south bridge chips so no need to confuse users showing them these devices. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé

[PATCH 05/24] vt82c686: Split off via-[am]c97 into separate file in hw/audio

2021-01-02 Thread BALATON Zoltan via
The via-[am]c97 code is supposed to implement the audio part of VIA south bridge chips so it is better placed under hw/audio/. Split it off into a separate file. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/audio/meson.build | 1 + hw/audio/via-ac97.c | 106

[PATCH 13/24] vt82c686: Move superio memory region to SuperIOConfig struct

2021-01-02 Thread BALATON Zoltan via
The superio memory region holds the io space index/data registers used to access the superio config registers that are implemented in struct SuperIOConfig. To keep these related things together move the memory region to SuperIOConfig and rename it accordingly. Also remove the unused "data" member

[PATCH 03/24] vt82c686b: Rename VT82C686B to VT82C686B_ISA

2021-01-02 Thread BALATON Zoltan via
This is really the ISA bridge part so name the type accordingly. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index

[PATCH 04/24] vt82c686: Remove vt82c686b_[am]c97_init() functions

2021-01-02 Thread BALATON Zoltan via
These are legacy init functions that are just equivalent to directly calling pci_create_simple so do that instead. Also rename objects to lower case via-ac97 and via-mc97 matching naming of other devices. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c

[PATCH 07/24] vt82c686: Remove legacy vt82c686b_isa_init() function

2021-01-02 Thread BALATON Zoltan via
Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 9 - hw/mips/fuloong2e.c | 4 +++- include/hw/isa/vt82c686.h | 3 +-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index

[PATCH 01/24] vt82c686: Rename AC97/MC97 parts from VT82C686B to VIA

2021-01-02 Thread BALATON Zoltan via
These parts are common between VT82C686B and VT8231 so can be shared in the future. Rename them to VIA prefix accordingly. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 28 ++-- 1 file changed, 14 insertions(+), 14

qemu isa irq gpio question

2021-01-02 Thread BALATON Zoltan via
Hello, While cleaning up my VIA south bridge patches I've found that with the finished version I did not get interrupts. At the end I've found a solution in a similar device (piix4) but I don't understand why that's needed. Could someone please explain? Here's what I had originally in board

Re: [RFC PATCH 0/5] hw/mips: Fix Fuloong2E to boot Linux guest again

2021-01-01 Thread BALATON Zoltan via
On Sat, 2 Jan 2021, Philippe Mathieu-Daudé wrote: We closed 2020 with few discussions about the Fuloong 2E board (see [1] and [2]). This series collect the minimum set of patch to have the machine booting Linux guest again, including integration tests. This is sent as RFC because Mark raised

Re: [PATCH v2 09/10] vt82c686: Convert debug printf to trace points

2021-01-01 Thread BALATON Zoltan via
On Fri, 1 Jan 2021, Philippe Mathieu-Daudé wrote: On 12/28/20 3:08 AM, BALATON Zoltan via wrote: Drop DPRINTF and use trace functions instead. Two debug messages about unimplemented registers could be converted to qemu_log_mask() but in reality all registers are currently unimplemented (we just

Re: [PATCH v2 09/10] vt82c686: Convert debug printf to trace points

2021-01-01 Thread BALATON Zoltan via
On Fri, 1 Jan 2021, Philippe Mathieu-Daudé wrote: On 12/28/20 3:08 AM, BALATON Zoltan via wrote: Drop DPRINTF and use trace functions instead. Two debug messages about unimplemented registers could be converted to qemu_log_mask() but in reality all registers are currently unimplemented (we just

Re: [PATCH v2 3/3] sam460ex: Clean up irq mapping

2020-12-31 Thread BALATON Zoltan via
On Thu, 31 Dec 2020, BALATON Zoltan via wrote: On Thu, 31 Dec 2020, Peter Maydell wrote: On Thu, 31 Dec 2020 at 15:11, Peter Maydell wrote: On Thu, 31 Dec 2020 at 11:20, BALATON Zoltan wrote: Avoid mapping multiple interrupts to the same irq. Instead map them to the 4 PCI interrupts

Re: [PATCH v2 3/3] sam460ex: Clean up irq mapping

2020-12-31 Thread BALATON Zoltan via
On Thu, 31 Dec 2020, Peter Maydell wrote: On Thu, 31 Dec 2020 at 15:11, Peter Maydell wrote: On Thu, 31 Dec 2020 at 11:20, BALATON Zoltan wrote: Avoid mapping multiple interrupts to the same irq. Instead map them to the 4 PCI interrupts and use an or-gate in the board to connect them to the

Re: [PATCH v2 3/3] trace: recommend "log" backend for getting started with tracing

2020-12-31 Thread BALATON Zoltan via
On Thu, 31 Dec 2020, Peter Maydell wrote: On Wed, 16 Dec 2020 at 16:09, Stefan Hajnoczi wrote: The "simple" backend is actually more complicated to use than the "log" backend. Update the quickstart documentation to feature the "log" backend instead of the "simple" backend. Suggested-by:

David Gibson, please read

2020-12-31 Thread BALATON Zoltan via
On Thu, 31 Dec 2020, BALATON Zoltan via wrote: v2 of https://patchew.org/QEMU/cover.1608937677.git.bala...@eik.bme.hu/ with added Tested-by from Guenter and revised patch 2 as suggested by Philippe. Regards, BALATON Zoltan BALATON Zoltan (3): ppc4xx: Move common dependency on serial to common

[PATCH v2 2/3] sam460ex: Remove FDT_PPC dependency from KConfig

2020-12-31 Thread BALATON Zoltan via
Dependency on FDT_PPC was added in commit b0048f76095 ("hw/ppc/Kconfig: Only select FDT helper for machines using it") but it does not seem to be really necessary so remove it again. Signed-off-by: BALATON Zoltan --- v2: Do not remove PPC405, reworded commit message hw/ppc/Kconfig | 1 - 1

[PATCH v2 3/3] sam460ex: Clean up irq mapping

2020-12-31 Thread BALATON Zoltan via
Avoid mapping multiple interrupts to the same irq. Instead map them to the 4 PCI interrupts and use an or-gate in the board to connect them to the interrupt controller. This does not fix any known problem but does not seem to cause a new problem either and may be cleaner at least. Signed-off-by:

[PATCH v2 1/3] ppc4xx: Move common dependency on serial to common option

2020-12-31 Thread BALATON Zoltan via
All machines that select SERIAL also select PPC4XX so we can just add this common dependency there once. Signed-off-by: BALATON Zoltan --- hw/ppc/Kconfig | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index dd86e664d2..8548f42b0d 100644

[PATCH v2 0/3] Clean up sam460ex irq mapping

2020-12-31 Thread BALATON Zoltan via
v2 of https://patchew.org/QEMU/cover.1608937677.git.bala...@eik.bme.hu/ with added Tested-by from Guenter and revised patch 2 as suggested by Philippe. Regards, BALATON Zoltan BALATON Zoltan (3): ppc4xx: Move common dependency on serial to common option sam460ex: Remove FDT_PPC dependency

[PATCH 6/7] vt82c686: Fix up power management io base and config

2020-12-29 Thread BALATON Zoltan via
Similar to the SMBus io registers there is a power management io range that's set via similar base address reg and enable bit. Some handling of this was already there but with several problems: using the wrong registers and bits, wrong size range, not acually updating mapping and handling reset

[PATCH 7/7] vt82c686: Make vt82c686b-pm an abstract base class and add vt8231-pm based on it

2020-12-29 Thread BALATON Zoltan via
The vt82c686b-pm model can be shared between VT82C686B and VT8231. The only difference between the two is the device id in what we model so make an abstract via-pm model by renaming appropriately and add types for vt82c686b-pm and vt8231-pm based on it. Signed-off-by: BALATON Zoltan ---

[PATCH 1/7] vt82c686: Use shorter name for local variable holding object state

2020-12-29 Thread BALATON Zoltan via
Rename local variable holding object state for readability and consistency. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 02d6759c00..2633cfe7dc

[PATCH 3/7] vt82c686: Move superio memory region to SuperIOConfig struct

2020-12-29 Thread BALATON Zoltan via
The superio memory region holds the io space index/data registers used to access the superio config registers that are implemented in struct SuperIOConfig. To keep these related things together move the memory region to SuperIOConfig and rename it accordingly. Also remove the unused data member of

[PATCH 4/7] vt82c686: Reorganise code

2020-12-29 Thread BALATON Zoltan via
Move lines around so that object definitions become consecutive and not scattered around. This brings functions belonging to an object together so it's clearer what's defined and what parts belong to which object. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 279

[PATCH 2/7] vt82c686: Rename superio config related parts

2020-12-29 Thread BALATON Zoltan via
Use less confusing naming for superio config register handling related parts that makes it clearer what belongs to this part. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 48 +++ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git

[PATCH 5/7] vt82c686: Fix SMBus IO base and configuration registers

2020-12-29 Thread BALATON Zoltan via
The base address of the SMBus io ports and its enabled status is set by registers in the PCI config space but this was not correctly emulated. Instead the SMBus registers were mapped on realize to the base address set by a property to the address expected by fuloong2e firmware. Fix the base and

[PATCH 0/7] vt82c686b clean ups - part II

2020-12-29 Thread BALATON Zoltan via
This is continuing cleaning up the vt82c686b model with the aim to add vt8231 emulation without too much duplication, reusing or fixing the existing model where possible. (DISCALIMER: It does not aim to fix all existing bugs or make the model perfectly emulate the real chip.) This series continues

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Mark Cave-Ayland wrote: On 29/12/2020 12:01, BALATON Zoltan via wrote: Fortunately with PCI_CLASS_PROG at 0x8a Linux will keep the VIA IDE in compatible mode and not attempt to switch to native mode: therefore if you keep this as-is and add the legacy IDE ioports back

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Mark Cave-Ayland wrote: On 28/12/2020 20:50, BALATON Zoltan via wrote: I think leaving the legacy ports enabled is a bad idea for at least two reasons: 1) It may clash with other io ports on other machines, e.g. I'm not sure on PPC where firmware or OS does not expect

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Mark Cave-Ayland wrote: On 28/12/2020 20:50, BALATON Zoltan via wrote: diff --git a/hw/ide/via.c b/hw/ide/via.c index be09912b33..7d54d7e829 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -26,6 +26,7 @@     #include "qemu/osdep.h"   #include "hw/pci/pci.h

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Philippe Mathieu-Daudé wrote: I think this casued problems before because if it's not set to 0x8a (legacy) at start then guests may assume it's already switched to native mode by firmware and won't program the BARs and it will not work. This way, even if it looks odd all

Re: Bug in Bonito? (mips/fuloong2e)

2020-12-29 Thread BALATON Zoltan via
On Tue, 29 Dec 2020, Philippe Mathieu-Daudé wrote: On 12/29/20 6:26 AM, Jiaxun Yang wrote: 在 2020/12/29 上午11:26, BALATON Zoltan 写道: Hello, While continuing with part two of my vt82c686b clean ups I've tried to implement SMBus IO base configuration in the vt82c686b-pm part that I've already

Bug in Bonito? (mips/fuloong2e)

2020-12-28 Thread BALATON Zoltan via
Hello, While continuing with part two of my vt82c686b clean ups I've tried to implement SMBus IO base configuration in the vt82c686b-pm part that I've already done for vt8231 for pegasos2 and it should be the same for 686B. (In short, writing address to pm config 0x90 sets base address of

[PATCH v3 1/2] ide: Make room for flags in PCIIDEState and add one for legacy mode

2020-12-28 Thread BALATON Zoltan via
We'll need a flag for implementing some device specific behaviour in via-ide but we already have a currently CMD646 specific field that can be repurposed for this and leave room for further flags if needed in the future. This patch changes the "secondary" field to "flags" and change CMD646 and its

[PATCH v3 2/2] via-ide: Fix fuloong2e support

2020-12-28 Thread BALATON Zoltan via
From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config) require legacy mode on the Fuloong2e so only emulating native mode did not turn out feasible. Add

[PATCH v3 0/2] Fix via-ide for fuloong2e

2020-12-28 Thread BALATON Zoltan via
v3 with review comments from Mark addressed BALATON Zoltan (1): ide: Make room for flags in PCIIDEState and add one for legacy mode Guenter Roeck (1): via-ide: Fix fuloong2e support hw/ide/cmd646.c | 6 +++--- hw/ide/via.c | 19 +-- hw/mips/fuloong2e.c | 4

Re: Problems with irq mapping in qemu v5.2

2020-12-28 Thread BALATON Zoltan via
On Mon, 28 Dec 2020, Mark Cave-Ayland wrote: On 24/12/2020 08:11, BALATON Zoltan via wrote: On Wed, 23 Dec 2020, Guenter Roeck wrote: On Thu, Dec 24, 2020 at 02:34:07AM +0100, BALATON Zoltan wrote: [ ... ] If we need legacy mode then we may be able to emulate that by setting BARs

Re: [PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-28 Thread BALATON Zoltan via
On Mon, 28 Dec 2020, Mark Cave-Ayland wrote: On 27/12/2020 22:13, BALATON Zoltan via wrote: From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including

Re: [PATCH v2 1/2] ide: Make room for flags in PCIIDEState and add one for legacy mode

2020-12-28 Thread BALATON Zoltan via
On Mon, 28 Dec 2020, Mark Cave-Ayland wrote: On 27/12/2020 22:13, BALATON Zoltan wrote: We'll need a flag for implementing some device specific behaviour in via-ide but we already have a currently CMD646 specific field that can be repurposed for this and leave room for further flags if needed

[PATCH v2 09/10] vt82c686: Convert debug printf to trace points

2020-12-27 Thread BALATON Zoltan via
Drop DPRINTF and use trace functions instead. Two debug messages about unimplemented registers could be converted to qemu_log_mask() but in reality all registers are currently unimplemented (we just store and return values of writable regs but do nothing with them). As we already trace register

[PATCH v2 08/10] vt82c686: Remove legacy vt82c686b_pm_init() function

2020-12-27 Thread BALATON Zoltan via
Remove legacy vt82c686b_pm_init() function and also rename VT82C686B_PM type name to match other device names. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- v2: Reworded commit message, delete i2c include here hw/isa/vt82c686.c | 18 --

[PATCH v2 06/10] audio/via-ac97: Simplify code and set user_creatable to false

2020-12-27 Thread BALATON Zoltan via
Remove some unneded, empty code and set user_creatable to false (besides being not implemented yet, so does nothing anyway) it's also normally part of VIA south bridge chips so no need to confuse users showing them these devices. Signed-off-by: BALATON Zoltan --- hw/audio/via-ac97.c | 51

[PATCH v2 07/10] vt82c686: Remove legacy vt82c686b_isa_init() function

2020-12-27 Thread BALATON Zoltan via
Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- v2: Reworded commit message hw/isa/vt82c686.c | 9 - hw/mips/fuloong2e.c | 4 +++- include/hw/isa/vt82c686.h | 3 +-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/isa/vt82c686.c

[PATCH v2 10/10] vt82c686: Remove unneeded includes and defines

2020-12-27 Thread BALATON Zoltan via
These are not used or not needed. Signed-off-by: BALATON Zoltan --- v2: Added back a few that we get indirectly but keep it explicit hw/isa/vt82c686.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index d7ce15bf9f..02d6759c00 100644 ---

[PATCH v2 05/10] vt82c686: Split off via-[am]c97 into separate file in hw/audio

2020-12-27 Thread BALATON Zoltan via
The via-[am]c97 code is supposed to implement the audio part of VIA south bridge chips so it is better placed under hw/audio/. Split it off into a separate file. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- v2: Reworded commit message hw/audio/meson.build | 1 +

[PATCH v2 02/10] vt82c686: Remove unnecessary _DEVICE suffix from type macros

2020-12-27 Thread BALATON Zoltan via
There's no reason to suffix everything with _DEVICE when the names are already unique without it and shorter names are more readable. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 48 +++ 1 file changed, 23

[PATCH v2 01/10] vt82c686: Rename AC97/MC97 parts from VT82C686B to VIA

2020-12-27 Thread BALATON Zoltan via
These parts are common between VT82C686B and VT8231 so can be shared in the future. Rename them to VIA prefix accordingly. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 28 ++-- 1 file changed, 14 insertions(+), 14

[PATCH v2 04/10] vt82c686: Remove vt82c686b_[am]c97_init() functions

2020-12-27 Thread BALATON Zoltan via
These are legacy init functions that are just equivalent to directly calling pci_create_simple so do that instead. Also rename objects to lower case via-ac97 and via-mc97 matching naming of other devices. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 27

[PATCH v2 03/10] vt82c686b: Rename VT82C686B to VT82C686B_ISA

2020-12-27 Thread BALATON Zoltan via
This is really the ISA bridge part so name the type accordingly. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 1be1169f83..d40599c7da 100644 ---

[PATCH v2 00/10] Misc vt82c686b clean ups

2020-12-27 Thread BALATON Zoltan via
I'm sending this v2 with tags added and small edits after Philippe's review for now, maybe these are already good to go. I've taken out a few patches that may need some more work but I've run out of free time for now so will have to come back to them later. I still could not cleanly add the VT8231

Re: [PATCH 01/12] vt82c686: Add APM and ACPI dependencies for VT82C686

2020-12-27 Thread BALATON Zoltan via
Hello, On Mon, 28 Dec 2020, Huacai Chen wrote: Hi, BALATON On Sun, Dec 27, 2020 at 9:21 AM BALATON Zoltan wrote: Compiling vt82c686.c fails without APM and ACPI_PM functions. Add dependency on these in Kconfig to fix this. Signed-off-by: BALATON Zoltan --- hw/isa/Kconfig | 2 ++ 1 file

Re: [PATCH 2/2] via-ide: Fix fuloong2e support

2020-12-27 Thread BALATON Zoltan via
On Sun, 27 Dec 2020, Philippe Mathieu-Daudé wrote: On 12/27/20 5:40 PM, BALATON Zoltan via wrote: On Sun, 27 Dec 2020, Philippe Mathieu-Daudé wrote: On 12/25/20 12:23 AM, BALATON Zoltan wrote: From: Guenter Roeck Fuloong2e needs to use legacy mode for IDE support to work with Linux. Add

[PATCH v2 2/2] via-ide: Fix fuloong2e support

2020-12-27 Thread BALATON Zoltan via
From: Guenter Roeck The IDE legacy mode emulation has been removed in commit 4ea98d317eb ("ide/via: Implement and use native PCI IDE mode") but some Linux kernels (probably including def_config) require legacy mode on the Fuloong2e so only emulating native mode did not turn out feasible. Add

[PATCH v2 1/2] ide: Make room for flags in PCIIDEState and add one for legacy mode

2020-12-27 Thread BALATON Zoltan via
We'll need a flag for implementing some device specific behaviour in via-ide but we already have a currently CMD646 specific field that can be repurposed for this and leave room for further flags if needed in the future. This patch changes the "secondary" field to "flags" and change CMD646 and its

  1   2   3   >