diff mbox

[v3,13/13] ppc: Add SM501 device in config for ppc and ppcemb targets

Message ID cc6a20fc4a2748f24920c03ce64ae34af0f61799.1488504063.git.balaton@eik.bme.hu
State New
Headers show

Commit Message

BALATON Zoltan Dec. 13, 2016, 9 p.m. UTC
This is not used by default on any emulated machine yet but it is
still useful to have it compiled so it can be added from the command
line for clients that can use it (e.g. MorphOS has no driver for any
other emulated video cards but can output via SM501)

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
 default-configs/ppc-softmmu.mak    | 1 +
 default-configs/ppcemb-softmmu.mak | 1 +
 2 files changed, 2 insertions(+)

Comments

Peter Maydell March 3, 2017, 6:34 p.m. UTC | #1
On 13 December 2016 at 21:00, BALATON Zoltan <balaton@eik.bme.hu> wrote:
> This is not used by default on any emulated machine yet but it is
> still useful to have it compiled so it can be added from the command
> line for clients that can use it (e.g. MorphOS has no driver for any
> other emulated video cards but can output via SM501)
>
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>  default-configs/ppc-softmmu.mak    | 1 +
>  default-configs/ppcemb-softmmu.mak | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 09c1d45..1f1cd85 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -45,6 +45,7 @@ CONFIG_OPENPIC_KVM=$(and $(CONFIG_E500),$(CONFIG_KVM))
>  CONFIG_PLATFORM_BUS=y
>  CONFIG_ETSEC=y
>  CONFIG_LIBDECNUMBER=y
> +CONFIG_SM501=y
>  # For PReP
>  CONFIG_SERIAL_ISA=y
>  CONFIG_MC146818RTC=y
> diff --git a/default-configs/ppcemb-softmmu.mak b/default-configs/ppcemb-softmmu.mak
> index 7f56004..94340de 100644
> --- a/default-configs/ppcemb-softmmu.mak
> +++ b/default-configs/ppcemb-softmmu.mak
> @@ -15,3 +15,4 @@ CONFIG_I8259=y
>  CONFIG_XILINX=y
>  CONFIG_XILINX_ETHLITE=y
>  CONFIG_LIBDECNUMBER=y
> +CONFIG_SM501=y
> --
> 2.7.4

This looks fine but I'll leave official review of it to a ppc person.

thanks
-- PMM
Thomas Huth March 6, 2017, 7 a.m. UTC | #2
On 13.12.2016 22:00, BALATON Zoltan wrote:
> This is not used by default on any emulated machine yet but it is
> still useful to have it compiled so it can be added from the command
> line for clients that can use it (e.g. MorphOS has no driver for any
> other emulated video cards but can output via SM501)
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>  default-configs/ppc-softmmu.mak    | 1 +
>  default-configs/ppcemb-softmmu.mak | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
> index 09c1d45..1f1cd85 100644
> --- a/default-configs/ppc-softmmu.mak
> +++ b/default-configs/ppc-softmmu.mak
> @@ -45,6 +45,7 @@ CONFIG_OPENPIC_KVM=$(and $(CONFIG_E500),$(CONFIG_KVM))
>  CONFIG_PLATFORM_BUS=y
>  CONFIG_ETSEC=y
>  CONFIG_LIBDECNUMBER=y
> +CONFIG_SM501=y
>  # For PReP
>  CONFIG_SERIAL_ISA=y
>  CONFIG_MC146818RTC=y
> diff --git a/default-configs/ppcemb-softmmu.mak b/default-configs/ppcemb-softmmu.mak
> index 7f56004..94340de 100644
> --- a/default-configs/ppcemb-softmmu.mak
> +++ b/default-configs/ppcemb-softmmu.mak
> @@ -15,3 +15,4 @@ CONFIG_I8259=y
>  CONFIG_XILINX=y
>  CONFIG_XILINX_ETHLITE=y
>  CONFIG_LIBDECNUMBER=y
> +CONFIG_SM501=y

Looks like there are indeed embedded PPC devices that are shipped with
the SM501 controller (e.g. the TQM5200), so I think this makes sense:

Reviewed-by: Thomas Huth <thuth@redhat.com>

Note: In case you respin the series, you might want to add this
CONFIG_SM501 to ppc64-softmmu.mak, too, since it is a superset of the
32-bit config (i.e. it can also emulate the 32-bit embedded chips).

 Thomas
Peter Maydell March 6, 2017, 9:47 a.m. UTC | #3
On 6 March 2017 at 07:00, Thomas Huth <thuth@redhat.com> wrote:
> Note: In case you respin the series, you might want to add this
> CONFIG_SM501 to ppc64-softmmu.mak, too, since it is a superset of the
> 32-bit config (i.e. it can also emulate the 32-bit embedded chips).

Yes, definitely do this please.
(Missed this because ARM's 64-bit default config includes the
32-bit one rather than duplicating its contents.)


thanks
-- PMM
Thomas Huth March 6, 2017, 9:52 a.m. UTC | #4
On 06.03.2017 10:47, Peter Maydell wrote:
> On 6 March 2017 at 07:00, Thomas Huth <thuth@redhat.com> wrote:
>> Note: In case you respin the series, you might want to add this
>> CONFIG_SM501 to ppc64-softmmu.mak, too, since it is a superset of the
>> 32-bit config (i.e. it can also emulate the 32-bit embedded chips).
> 
> Yes, definitely do this please.
> (Missed this because ARM's 64-bit default config includes the
> 32-bit one rather than duplicating its contents.)

I guess we could do something like that on ppc, too (and ppc-softmmu.mak
should likely include ppcemb-softmmu.mak), but
that's something for QEMU 2.10 / 3.0 / whichever version will be next.

 Thomas
Peter Maydell March 6, 2017, 9:55 a.m. UTC | #5
On 6 March 2017 at 09:52, Thomas Huth <thuth@redhat.com> wrote:
> I guess we could do something like that on ppc, too (and ppc-softmmu.mak
> should likely include ppcemb-softmmu.mak), but
> that's something for QEMU 2.10 / 3.0 / whichever version will be next.

Yeah, definitely 2.10 material (so is this whole series, but
let's not tangle it up with an unrelated cleanup).

Minor caution: I forget whether we successfully fixed all
the annoying makefile bugs that meant that changing something
inside foo.mak didn't cause binaries that used bar.mak
that includes foo.mak to update. I *think* we caught all
those, though...

thanks
-- PMM
BALATON Zoltan March 6, 2017, 6:34 p.m. UTC | #6
On Mon, 6 Mar 2017, Peter Maydell wrote:
> On 6 March 2017 at 09:52, Thomas Huth <thuth@redhat.com> wrote:
>> I guess we could do something like that on ppc, too (and ppc-softmmu.mak
>> should likely include ppcemb-softmmu.mak), but
>> that's something for QEMU 2.10 / 3.0 / whichever version will be next.
>
> Yeah, definitely 2.10 material (so is this whole series, but
> let's not tangle it up with an unrelated cleanup).

Thanks for all the comments investigations and reviews, which were really 
helpful. I'll test your suggestions and send another version if found to 
be needed but I don't have access to real hardware to test on, so I can't 
confirm this other than using images that are known to work on real 
hardware and I only have those for PPC. So I cannot test LE guest more 
than using the Linux images available on the net but can't guarantee those 
are not buggy. The current version (however unlikely) does work for both 
the more or less known good PPC images and the SH images I could find so 
this is the most likely correct combination given the test cases. I'm 
fairly sure the big endian case is correct and the SH LE case works better 
with the images available so unless there's another image that is known to 
work on SH, this is the best I could do.

If there is no chance to get this in for 2.9 (considering it changes a 
relatively unmaintained and unused part, so the risk of breaking something 
important is very low) then let's get back to this about a month from now 
because no point to spend time on it if it just gets forgotten until the 
next chance to get it merged. Unless you can take it during the freeze 
I'll pick this up later when the window opens again. (By the way, the 
planning link on the wiki still points to 2.8.)

Regards,
BALATON Zoltan
diff mbox

Patch

diff --git a/default-configs/ppc-softmmu.mak b/default-configs/ppc-softmmu.mak
index 09c1d45..1f1cd85 100644
--- a/default-configs/ppc-softmmu.mak
+++ b/default-configs/ppc-softmmu.mak
@@ -45,6 +45,7 @@  CONFIG_OPENPIC_KVM=$(and $(CONFIG_E500),$(CONFIG_KVM))
 CONFIG_PLATFORM_BUS=y
 CONFIG_ETSEC=y
 CONFIG_LIBDECNUMBER=y
+CONFIG_SM501=y
 # For PReP
 CONFIG_SERIAL_ISA=y
 CONFIG_MC146818RTC=y
diff --git a/default-configs/ppcemb-softmmu.mak b/default-configs/ppcemb-softmmu.mak
index 7f56004..94340de 100644
--- a/default-configs/ppcemb-softmmu.mak
+++ b/default-configs/ppcemb-softmmu.mak
@@ -15,3 +15,4 @@  CONFIG_I8259=y
 CONFIG_XILINX=y
 CONFIG_XILINX_ETHLITE=y
 CONFIG_LIBDECNUMBER=y
+CONFIG_SM501=y