[PATCH v5 0/6] HPPA: i82596, PS/2 and graphics emulation

Sven Schnelle posted 6 patches 4 years, 4 months ago
Test asan failed
Test checkpatch failed
Test FreeBSD failed
Test docker-mingw@fedora failed
Test docker-clang@ubuntu failed
Test docker-quick@centos7 failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191220211512.3289-1-svens@stackframe.org
Maintainers: Helge Deller <deller@gmx.de>, Richard Henderson <rth@twiddle.net>, Jason Wang <jasowang@redhat.com>
MAINTAINERS                 |    4 +-
hw/display/Kconfig          |    4 +
hw/display/Makefile.objs    |    1 +
hw/display/artist.c         | 1450 +++++++++++++++++++++++++++++++++++
hw/display/trace-events     |    9 +
hw/hppa/Kconfig             |    3 +
hw/hppa/Makefile.objs       |    2 +-
hw/hppa/dino.c              |   97 ++-
hw/hppa/hppa_hardware.h     |    1 +
hw/hppa/hppa_sys.h          |    2 +
hw/hppa/lasi.c              |  368 +++++++++
hw/hppa/machine.c           |   17 +-
hw/hppa/trace-events        |   10 +
hw/input/Kconfig            |    3 +
hw/input/Makefile.objs      |    1 +
hw/input/lasips2.c          |  289 +++++++
hw/input/ps2.c              |   15 +
hw/input/trace-events       |    5 +
hw/net/Kconfig              |    7 +
hw/net/Makefile.objs        |    2 +
hw/net/i82596.c             |  734 ++++++++++++++++++
hw/net/i82596.h             |   55 ++
hw/net/lasi_i82596.c        |  188 +++++
hw/net/trace-events         |   14 +
include/hw/input/lasips2.h  |   16 +
include/hw/input/ps2.h      |    1 +
include/hw/net/lasi_82596.h |   29 +
pc-bios/hppa-firmware.img   |  Bin 783724 -> 766136 bytes
roms/seabios-hppa           |    2 +-
29 files changed, 3311 insertions(+), 18 deletions(-)
create mode 100644 hw/display/artist.c
create mode 100644 hw/hppa/lasi.c
create mode 100644 hw/input/lasips2.c
create mode 100644 hw/net/i82596.c
create mode 100644 hw/net/i82596.h
create mode 100644 hw/net/lasi_i82596.c
create mode 100644 include/hw/input/lasips2.h
create mode 100644 include/hw/net/lasi_82596.h
[PATCH v5 0/6] HPPA: i82596, PS/2 and graphics emulation
Posted by Sven Schnelle 4 years, 4 months ago
Hi,

these series adds quite a lot to the HPPA emulation in QEMU:
i82596 emulation from Helge, PS/2 and Artist graphics emulation.

See https://parisc.wiki.kernel.org/index.php/Qemu for a few screenshots
of QEMU running a X11/CDE session in HP-UX.

Changes in v5:
 - fix a buffer overrun in vram_bit_write()
 - improve STI line wraparound

Changes in v4:
 - introduce Artist-internal address space
 - rewrite screen update functions to use the generic framebuffer routines
 - use dirty bitmap code to not always redraw the whole screen

Changes in v3:
 - use BIT() macro in gsc_to_pci_forwarding()
 - fix version id in vm state
 - fix an error in the PS/2 KBD_CMD_SET_MAKE_BREAK implementation

Changes in v2:
 - dropped 'hppa: remove ISA region' as that patch requires some more work
 - added shortlog to seabios update
 - use const and MAKE_64BIT_MASK in dino.c

Regards,
Sven

Helge Deller (2):
  hw/hppa/dino.c: Improve emulation of Dino PCI chip
  hppa: Add support for LASI chip with i82596 NIC

Sven Schnelle (4):
  ps2: accept 'Set Key Make and Break' commands
  hppa: add emulation of LASI PS2 controllers
  hppa: Add emulation of Artist graphics
  seabios-hppa: update to latest version

 MAINTAINERS                 |    4 +-
 hw/display/Kconfig          |    4 +
 hw/display/Makefile.objs    |    1 +
 hw/display/artist.c         | 1450 +++++++++++++++++++++++++++++++++++
 hw/display/trace-events     |    9 +
 hw/hppa/Kconfig             |    3 +
 hw/hppa/Makefile.objs       |    2 +-
 hw/hppa/dino.c              |   97 ++-
 hw/hppa/hppa_hardware.h     |    1 +
 hw/hppa/hppa_sys.h          |    2 +
 hw/hppa/lasi.c              |  368 +++++++++
 hw/hppa/machine.c           |   17 +-
 hw/hppa/trace-events        |   10 +
 hw/input/Kconfig            |    3 +
 hw/input/Makefile.objs      |    1 +
 hw/input/lasips2.c          |  289 +++++++
 hw/input/ps2.c              |   15 +
 hw/input/trace-events       |    5 +
 hw/net/Kconfig              |    7 +
 hw/net/Makefile.objs        |    2 +
 hw/net/i82596.c             |  734 ++++++++++++++++++
 hw/net/i82596.h             |   55 ++
 hw/net/lasi_i82596.c        |  188 +++++
 hw/net/trace-events         |   14 +
 include/hw/input/lasips2.h  |   16 +
 include/hw/input/ps2.h      |    1 +
 include/hw/net/lasi_82596.h |   29 +
 pc-bios/hppa-firmware.img   |  Bin 783724 -> 766136 bytes
 roms/seabios-hppa           |    2 +-
 29 files changed, 3311 insertions(+), 18 deletions(-)
 create mode 100644 hw/display/artist.c
 create mode 100644 hw/hppa/lasi.c
 create mode 100644 hw/input/lasips2.c
 create mode 100644 hw/net/i82596.c
 create mode 100644 hw/net/i82596.h
 create mode 100644 hw/net/lasi_i82596.c
 create mode 100644 include/hw/input/lasips2.h
 create mode 100644 include/hw/net/lasi_82596.h

-- 
2.24.0


Re: [PATCH v5 0/6] HPPA: i82596, PS/2 and graphics emulation
Posted by Helge Deller 4 years, 4 months ago
* Sven Schnelle <svens@stackframe.org>:
> these series adds quite a lot to the HPPA emulation in QEMU:
> i82596 emulation from Helge, PS/2 and Artist graphics emulation.
>
> See https://parisc.wiki.kernel.org/index.php/Qemu for a few screenshots
> of QEMU running a X11/CDE session in HP-UX.

Sadly those screenshots were dropped by mistake in the last kernel wiki
migration. It's being worked on to restore them...

Sven or Richard, can you please on top of the patches sent by Sven,
include the next two patches as well? They fix up the serial console
when booting into Linux with the "-nographic" qemu option, and the
second patch switches to tulip network card instead of the e1000.

Helge

[PATCH 1/2] hppa: Do not enable artist graphics with -nographic option
Posted by Helge Deller 4 years, 4 months ago
When qemu was started with the -nographic option, do not enable the
artist graphic card emulation.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 9d0192c4fa..aea365bf46 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -127,7 +127,7 @@ static void machine_hppa_init(MachineState *machine)
     dev = DEVICE(pci_create_simple(pci_bus, -1, "lsi53c895a"));
     lsi53c8xx_handle_legacy_cmdline(dev);

-    if (vga_interface_type != VGA_NONE) {
+    if (machine->enable_graphics && vga_interface_type != VGA_NONE) {
         dev = qdev_create(NULL, "artist");
         qdev_init_nofail(dev);
         s = SYS_BUS_DEVICE(dev);

Re: [PATCH 1/2] hppa: Do not enable artist graphics with -nographic option
Posted by Richard Henderson 4 years, 3 months ago
On 12/22/19 9:24 AM, Helge Deller wrote:
> When qemu was started with the -nographic option, do not enable the
> artist graphic card emulation.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>

Squashed into Sven's patch.


r~

Re: [PATCH 1/2] hppa: Do not enable artist graphics with -nographic option
Posted by Sven Schnelle 4 years, 4 months ago
Hi Helge,

On Sat, Dec 21, 2019 at 11:24:02PM +0100, Helge Deller wrote:
> When qemu was started with the -nographic option, do not enable the
> artist graphic card emulation.

Hmm, isn't '-nographic -vnc' a valid option that wouldn't work anymore in that
case? I used '-nographic -vga none' to disable Artist.

Regards
Sven

Re: [PATCH 1/2] hppa: Do not enable artist graphics with -nographic option
Posted by Helge Deller 4 years, 4 months ago
Hi Sven,

On 22.12.19 09:39, Sven Schnelle wrote:
> On Sat, Dec 21, 2019 at 11:24:02PM +0100, Helge Deller wrote:
>> When qemu was started with the -nographic option, do not enable the
>> artist graphic card emulation.
>
> Hmm, isn't '-nographic -vnc' a valid option that wouldn't work anymore in that case?

You don't need the "-nographic" then, just use the "-vnc" parameter.

> I used '-nographic -vga none' to disable Artist.

With my patch "-nographic" is sufficient and behaves as the help says:
-nographic    disable graphical output and redirect serial I/Os to console

Helge

[PATCH 2/2] hppa: Switch to tulip NIC by default
Posted by Helge Deller 4 years, 4 months ago
Most HP PA-RISC machines have a Digital DS21142/43 Tulip network card,
only some very latest generation machines have an e1000 NIC.
Since qemu now provides an emulated tulip card, use that one instead.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index aea365bf46..120d4a75fc 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -135,10 +135,10 @@ static void machine_hppa_init(MachineState *machine)
         sysbus_mmio_map(s, 1, ARTIST_FB_ADDR);
     }

-    /* Network setup.  e1000 is good enough, failing Tulip support.  */
+    /* Network setup. */
     for (i = 0; i < nb_nics; i++) {
         if (!enable_lasi_lan()) {
-            pci_nic_init_nofail(&nd_table[i], pci_bus, "e1000", NULL);
+            pci_nic_init_nofail(&nd_table[i], pci_bus, "tulip", NULL);
         }
     }


Re: [PATCH 2/2] hppa: Switch to tulip NIC by default
Posted by Richard Henderson 4 years, 3 months ago
On 12/22/19 9:25 AM, Helge Deller wrote:
> Most HP PA-RISC machines have a Digital DS21142/43 Tulip network card,
> only some very latest generation machines have an e1000 NIC.
> Since qemu now provides an emulated tulip card, use that one instead.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>

Queued, thanks.


r~

Re: [PATCH v5 0/6] HPPA: i82596, PS/2 and graphics emulation
Posted by Richard Henderson 4 years, 3 months ago
On 12/21/19 8:15 AM, Sven Schnelle wrote:
> these series adds quite a lot to the HPPA emulation in QEMU:
> i82596 emulation from Helge, PS/2 and Artist graphics emulation.
> 
> See https://parisc.wiki.kernel.org/index.php/Qemu for a few screenshots
> of QEMU running a X11/CDE session in HP-UX.
> 
> Changes in v5:
>  - fix a buffer overrun in vram_bit_write()
>  - improve STI line wraparound
> 
> Changes in v4:
>  - introduce Artist-internal address space
>  - rewrite screen update functions to use the generic framebuffer routines
>  - use dirty bitmap code to not always redraw the whole screen
> 
> Changes in v3:
>  - use BIT() macro in gsc_to_pci_forwarding()
>  - fix version id in vm state
>  - fix an error in the PS/2 KBD_CMD_SET_MAKE_BREAK implementation
> 
> Changes in v2:
>  - dropped 'hppa: remove ISA region' as that patch requires some more work
>  - added shortlog to seabios update
>  - use const and MAKE_64BIT_MASK in dino.c
> 
> Regards,
> Sven
> 
> Helge Deller (2):
>   hw/hppa/dino.c: Improve emulation of Dino PCI chip
>   hppa: Add support for LASI chip with i82596 NIC
> 
> Sven Schnelle (4):
>   ps2: accept 'Set Key Make and Break' commands
>   hppa: add emulation of LASI PS2 controllers
>   hppa: Add emulation of Artist graphics
>   seabios-hppa: update to latest version

Queued these 6.  I squashed Helge's -nographics fix into patch 5.

I cannot get my debian 8 install to boot to a prompt with the artist graphics
enabled.  I'm not sure if I need a newer kernel or what.  But it doesn't do
nothing either, so I'm a bit confused.

However, I have validated a boot of hpux-11.11, so any refinements that might
be required should be incremental.


r~

Re: [PATCH v5 0/6] HPPA: i82596, PS/2 and graphics emulation
Posted by Helge Deller 4 years, 3 months ago
On 29.12.19 02:25, Richard Henderson wrote:
> On 12/21/19 8:15 AM, Sven Schnelle wrote:
>> these series adds quite a lot to the HPPA emulation in QEMU:
>> i82596 emulation from Helge, PS/2 and Artist graphics emulation.
>>
>> See https://parisc.wiki.kernel.org/index.php/Qemu for a few screenshots
>> of QEMU running a X11/CDE session in HP-UX.
>>
>> Changes in v5:
>>  - fix a buffer overrun in vram_bit_write()
>>  - improve STI line wraparound
>>
>> Changes in v4:
>>  - introduce Artist-internal address space
>>  - rewrite screen update functions to use the generic framebuffer routines
>>  - use dirty bitmap code to not always redraw the whole screen
>>
>> Changes in v3:
>>  - use BIT() macro in gsc_to_pci_forwarding()
>>  - fix version id in vm state
>>  - fix an error in the PS/2 KBD_CMD_SET_MAKE_BREAK implementation
>>
>> Changes in v2:
>>  - dropped 'hppa: remove ISA region' as that patch requires some more work
>>  - added shortlog to seabios update
>>  - use const and MAKE_64BIT_MASK in dino.c
>>
>> Regards,
>> Sven
>>
>> Helge Deller (2):
>>   hw/hppa/dino.c: Improve emulation of Dino PCI chip
>>   hppa: Add support for LASI chip with i82596 NIC
>>
>> Sven Schnelle (4):
>>   ps2: accept 'Set Key Make and Break' commands
>>   hppa: add emulation of LASI PS2 controllers
>>   hppa: Add emulation of Artist graphics
>>   seabios-hppa: update to latest version
>
> Queued these 6.  I squashed Helge's -nographics fix into patch 5.

Thank you Richard!

> I cannot get my debian 8 install to boot to a prompt with the artist graphics
> enabled.  I'm not sure if I need a newer kernel or what.  But it doesn't do
> nothing either, so I'm a bit confused.

I think it should work out of the box and the kernel should be OK,
because stifb has been in there for long time.
Do you maybe have "stifb=off or sticon=off" in the kernel commmand line?
Did you enabled a getty for tty0 in etc/inittab ?
What does dmesg say?
Is "/proc/fb0" device there ?
I'm happy to look into it, if you can provide me your image for download somewhere...

Helge