qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ppc: virtex_ml507: QEMU_OPTION_dtb support for


From: Edgar E. Iglesias
Subject: Re: [Qemu-devel] [PATCH] ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine.
Date: Wed, 14 Aug 2013 11:56:44 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Aug 14, 2013 at 11:51:19AM +0200, Alexander Graf wrote:
> 
> On 13.08.2013, at 13:09, Efimov Vasily wrote:
> 
> > 
> > Signed-off-by: Efimov Vasily <address@hidden>
> 
> Please provide a patch description :).
> 
> > ---
> > hw/ppc/virtex_ml507.c |   13 ++++++++++---
> > 1 file changed, 10 insertions(+), 3 deletions(-)
> > 
> > diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
> > index 08e77fb..a00f709 100644
> > --- a/hw/ppc/virtex_ml507.c
> > +++ b/hw/ppc/virtex_ml507.c
> > @@ -141,11 +141,18 @@ static int xilinx_load_device_tree(hwaddr addr,
> > {
> >     char *path;
> >     int fdt_size;
> > -    void *fdt;
> > +    void *fdt = 0;
> 
> This should be NULL. NULL doesn't have to be 0 according to C IIRC.
> 
> >     int r;
> > +    const char *dtb_filename;
> > 
> > -    /* Try the local "ppc.dtb" override.  */
> > -    fdt = load_device_tree("ppc.dtb", &fdt_size);
> > +    dtb_filename = qemu_opt_get(qemu_get_machine_opts(), "dtb");
> > +    if (dtb_filename) {
> > +        fdt = load_device_tree(dtb_filename, &fdt_size);
> > +    }
> > +    if (!fdt) {
> > +        /* Try the local "ppc.dtb" override.  */
> > +        fdt = load_device_tree("ppc.dtb", &fdt_size);
> > +    }
> 
> Could you please just remove the ppc.dtb override option? It's superfluous 
> once we have proper -dtb support.
> 
> Edgar, any objections?

Hi,

No objections from my side, I tested the patch and it works fine.
I'd prefer to keep the ppc.dtb fallback for backwards compatibility,
for example the test image on the wiki relies on it.

Thanks,
Edgar

> 
> Also, you should abort if the user specified a dtb through -dtb and that file 
> could not get loaded.
> 
> 
> Alex
> 
> >     if (!fdt) {
> >         path = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
> >         if (path) {
> > -- 
> > 1.7.10.4
> > 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]