[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel][PATCH 2/2] spapr: Add support for -vga optio
From: |
Alexander Graf |
Subject: |
Re: [Qemu-ppc] [Qemu-devel][PATCH 2/2] spapr: Add support for -vga option |
Date: |
Wed, 27 Jun 2012 14:08:54 +0200 |
On 18.06.2012, at 11:34, Li Zhang wrote:
> Also instanciate the USB keyboard and mouse when that option is used
> (you can still use -device to create individual devices without all
> the defaults)
>
> Signed-off-by: Benjamin Herrenschmidt <address@hidden>
> Signed-off-by: Li Zhang <address@hidden>
> ---
> hw/spapr.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 42 insertions(+), 1 deletions(-)
>
> diff --git a/hw/spapr.c b/hw/spapr.c
> index 8d158d7..c7b6e9d 100644
> --- a/hw/spapr.c
> +++ b/hw/spapr.c
> @@ -45,6 +45,8 @@
> #include "kvm.h"
> #include "kvm_ppc.h"
> #include "pci.h"
> +#include "pc.h"
> +#include "usb.h"
>
> #include "exec-memory.h"
>
> @@ -82,6 +84,7 @@
> #define PHANDLE_XICP 0x00001111
>
> sPAPREnvironment *spapr;
> +static int spapr_has_graphics;
>
> qemu_irq spapr_allocate_irq(uint32_t hint, uint32_t *irq_num,
> enum xics_irq_type type)
> @@ -222,6 +225,9 @@ static void *spapr_create_fdt_skel(const char *cpu_model,
> _FDT((fdt_property(fdt, "qemu,boot-kernel", &kprop, sizeof(kprop))));
> }
> _FDT((fdt_property_string(fdt, "qemu,boot-device", boot_device)));
> + _FDT((fdt_property_cell(fdt, "qemu,graphic-width", graphic_width)));
> + _FDT((fdt_property_cell(fdt, "qemu,graphic-height", graphic_height)));
> + _FDT((fdt_property_cell(fdt, "qemu,graphic-depth", graphic_depth)));
>
> _FDT((fdt_end_node(fdt)));
>
> @@ -457,7 +463,9 @@ static void spapr_finalize_fdt(sPAPREnvironment *spapr,
> }
> }
>
> - spapr_populate_chosen_stdout(fdt, spapr->vio_bus);
> + if (!spapr_has_graphics) {
> + spapr_populate_chosen_stdout(fdt, spapr->vio_bus);
> + }
>
> _FDT((fdt_pack(fdt)));
>
> @@ -510,6 +518,30 @@ static void spapr_cpu_reset(void *opaque)
> cpu_reset(CPU(cpu));
> }
>
> +static int spapr_vga_init(PCIBus *pci_bus)
> +{
> + /* Default is nothing */
> +#if 0 /* Enable this once we merge a SLOF which works with Cirrus */
Ben, mind to push a working SLOF, we we can just enable all of it in one go and
don't have to commit #if 0'ed code?
Rest looks reasonable to me.
Alex
Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/2] spapr: Add support for -vga option, Andreas Färber, 2012/06/27