From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rv4Uz-0000ui-Ea for qemu-devel@nongnu.org; Wed, 08 Feb 2012 05:11:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rv4Uu-0006xK-6i for qemu-devel@nongnu.org; Wed, 08 Feb 2012 05:11:37 -0500 Received: from mail-bk0-f45.google.com ([209.85.214.45]:49417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rv4Ut-0006ws-Rg for qemu-devel@nongnu.org; Wed, 08 Feb 2012 05:11:32 -0500 Received: by bkue19 with SMTP id e19so152981bku.4 for ; Wed, 08 Feb 2012 02:11:30 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <201202080906.39664.paul@codesourcery.com> References: <1328687721-16030-1-git-send-email-peter.crosthwaite@petalogix.com> <201202080906.39664.paul@codesourcery.com> Date: Wed, 8 Feb 2012 20:11:30 +1000 Message-ID: From: Peter Crosthwaite Content-Type: multipart/alternative; boundary=bcaec5196d9f9217c304b8711e4c Subject: Re: [Qemu-devel] [RFC PATCH] arm boot: added QOM device definition List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, qemu-devel@nongnu.org, agraf@suse.de --bcaec5196d9f9217c304b8711e4c Content-Type: text/plain; charset=ISO-8859-1 2012/2/8 Paul Brook > > diff --git a/hw/versatilepb.c b/hw/versatilepb.c > > index 6e28e78..e42d845 100644 > > --- a/hw/versatilepb.c > > +++ b/hw/versatilepb.c > > @@ -313,12 +313,14 @@ static void versatile_init(ram_addr_t ram_size, > > /* 0x101f3000 UART2. */ > > /* 0x101f4000 SSPI. */ > > > > - versatile_binfo.ram_size = ram_size; > > - versatile_binfo.kernel_filename = kernel_filename; > > - versatile_binfo.kernel_cmdline = kernel_cmdline; > > - versatile_binfo.initrd_filename = initrd_filename; > > - versatile_binfo.board_id = board_id; > > - arm_load_kernel(env, &versatile_binfo); > > + if (kernel_filename) { > > + versatile_binfo.ram_size = ram_size; > > + versatile_binfo.kernel_filename = kernel_filename; > > + versatile_binfo.kernel_cmdline = kernel_cmdline; > > + versatile_binfo.initrd_filename = initrd_filename; > > + versatile_binfo.board_id = board_id; > > + arm_load_kernel(env, &versatile_binfo); > > + } > > } > > This should be using the new object you just added. > Yes I agree. There is another question tho that if this approach is to be considered, should this call to arm_load_kernel be removed from the machine model altogether? Only reason to keep it would be backwards compatibility for the original command line format. You also need to fix all the other uses of arm_load_kernel. > > Ok. I wanted to put this idea forward for a single machine model (versatilepb in this case) as a proof of concept, before applying a significant change pattern to all the arm machines. If this approach is to be considered then I can recreate this series with the change pattern applied to all arm platforms. Paul > Peter --bcaec5196d9f9217c304b8711e4c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2012/2/8 Paul Brook &l= t;paul@codesourcery.com>
> diff --git a/hw/versatilepb.c b/hw/versatilepb.c
> index 6e28e78..e42d845 100644
> --- a/hw/versatilepb.c
> +++ b/hw/versatilepb.c
> @@ -313,12 +313,14 @@ static void versatile_init(ram_addr_t ram_size,<= br> > =A0 =A0 =A0/* =A00x101f3000 UART2. =A0*/
> =A0 =A0 =A0/* 0x101f4000 SSPI. =A0*/
>
> - =A0 =A0versatile_binfo.ram_size =3D ram_size;
> - =A0 =A0versatile_binfo.kernel_filename =3D kernel_filename;
> - =A0 =A0versatile_binfo.kernel_cmdline =3D kernel_cmdline;
> - =A0 =A0versatile_binfo.initrd_filename =3D initrd_filename;
> - =A0 =A0versatile_binfo.board_id =3D board_id;
> - =A0 =A0arm_load_kernel(env, &versatile_binfo);
> + =A0 =A0 if (kernel_filename) {
> + =A0 =A0 =A0 =A0 =A0 =A0 versatile_binfo.ram_size =3D ram_size;
> + =A0 =A0 =A0 =A0 =A0 =A0 versatile_binfo.kernel_filename =3D kernel_f= ilename;
> + =A0 =A0 =A0 =A0 =A0 =A0 versatile_binfo.kernel_cmdline =3D kernel_cm= dline;
> + =A0 =A0 =A0 =A0 =A0 =A0 versatile_binfo.initrd_filename =3D initrd_f= ilename;
> + =A0 =A0 =A0 =A0 =A0 =A0 versatile_binfo.board_id =3D board_id;
> + =A0 =A0 =A0 =A0 =A0 =A0 arm_load_kernel(env, &versatile_binfo);<= br> > + =A0 =A0 }
> =A0}

This should be using the new object you just added.
<= div>=A0
Yes I agree. There is another question tho that if this a= pproach is to be considered, should this call to arm_load_kernel be removed= from the machine model altogether? Only reason to keep it would be backwar= ds compatibility for the original command line format.

You also need to fix all the other uses of arm_load_kernel.


Ok. I wanted to put this idea forward for a single m= achine model (versatilepb in this case) as a proof of concept, before apply= ing a significant change pattern to all the arm machines. If this approach = is to be considered then I can recreate this series with the change pattern= applied to all arm platforms.

Paul

Peter
--bcaec5196d9f9217c304b8711e4c--