On 12/20/19 10:15 PM, Sven Schnelle wrote:
> This adds emulation of Artist graphics good enough
> to get a Text console on both Linux and HP-UX. The
> X11 server from HP-UX also works.
>
> Signed-off-by: Sven Schnelle <[email protected]>
> ---
> hw/display/Kconfig | 4 +
> hw/display/Makefile.objs | 1 +
> hw/display/artist.c | 1450 ++++++++++++++++++++++++++++++++++++++
> hw/display/trace-events | 9 +
> hw/hppa/Kconfig | 1 +
> hw/hppa/hppa_hardware.h | 1 +
> hw/hppa/machine.c | 9 +
> 7 files changed, 1475 insertions(+)
> create mode 100644 hw/display/artist.c
>
[...]
> diff --git a/hw/hppa/hppa_hardware.h b/hw/hppa/hppa_hardware.h
> index 507f91e05d..4a2fe2df60 100644
> --- a/hw/hppa/hppa_hardware.h
> +++ b/hw/hppa/hppa_hardware.h
> @@ -22,6 +22,7 @@
> #define LASI_PS2KBD_HPA 0xffd08000
> #define LASI_PS2MOU_HPA 0xffd08100
> #define LASI_GFX_HPA 0xf8000000
> +#define ARTIST_FB_ADDR 0xf9000000
> #define CPU_HPA 0xfffb0000
> #define MEMORY_HPA 0xfffbf000
>
> diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
> index 33e3769d0b..6c67399054 100644
> --- a/hw/hppa/machine.c
> +++ b/hw/hppa/machine.c
> @@ -75,6 +75,7 @@ static void machine_hppa_init(MachineState *machine)
> MemoryRegion *cpu_region;
> long i;
> unsigned int smp_cpus = machine->smp.cpus;
> + SysBusDevice *s;
>
> ram_size = machine->ram_size;
>
> @@ -127,6 +128,14 @@ 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) {
> + dev = qdev_create(NULL, "artist");
> + qdev_init_nofail(dev);
> + s = SYS_BUS_DEVICE(dev);
> + sysbus_mmio_map(s, 0, LASI_GFX_HPA);
> + sysbus_mmio_map(s, 1, ARTIST_FB_ADDR);
How is this chipset connected on the board?
If it is a card you can plug on a bus, you can use a condition.
If it is soldered or part of another chipset, then it has to be mapped
unconditionally.
IOW I think you should drop the 'if (vga_interface_type != VGA_NONE)' check.
> + }
> +
> /* Network setup. e1000 is good enough, failing Tulip support. */
> for (i = 0; i < nb_nics; i++) {
> if (!enable_lasi_lan()) {
>