Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-07 Thread Li Guang
Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 10:13 PM, Paolo Bonzini wrote: Il 06/01/2014 08:56, Peter Crosthwaite ha scritto: What are the guidelines for when to use one or the other? "-machine firmware=" if you want to load a firmware blob in a board specific way. Thi

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-06 Thread Peter Crosthwaite
On Mon, Jan 6, 2014 at 10:13 PM, Paolo Bonzini wrote: > Il 06/01/2014 08:56, Peter Crosthwaite ha scritto: >> > What are the guidelines for when to use one or the other? >> >> "-machine firmware=" if you want to load a firmware blob in a board >> specific way. This if you want to place a blob in m

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-06 Thread Paolo Bonzini
Il 06/01/2014 08:56, Peter Crosthwaite ha scritto: > > What are the guidelines for when to use one or the other? > > "-machine firmware=" if you want to load a firmware blob in a board > specific way. This if you want to place a blob in memory at an > arbitrary location on reset. "-machine firmwa

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-06 Thread Paolo Bonzini
Il 06/01/2014 06:36, Li Guang ha scritto: >> dma_memory_write() work? > > what about cpu_physical_memory_write_rom ? Sorry, I missed that load_image_targphys is already doing the right thing on reset. Paolo

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-06 Thread Peter Maydell
On 6 January 2014 07:56, Peter Crosthwaite wrote: > On Mon, Jan 6, 2014 at 5:41 PM, Peter Maydell > wrote: >> That raises some more general design questions: >> * how is this expected to interact with rom blob loading, -machine >> firmware=, >>etc? > > I guess it's not. The behavior of "-m

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Peter Crosthwaite
On Mon, Jan 6, 2014 at 5:41 PM, Peter Maydell wrote: > On 2 January 2014 05:50, Peter Crosthwaite > wrote: >> I'm wondering whether blob loading is actually a reset step not an >> init. > > load_image_targphys() uses the rom blob loader code from hw/core/loader.c, > which already supports reload

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Peter Maydell
On 2 January 2014 05:50, Peter Crosthwaite wrote: > I'm wondering whether blob loading is actually a reset step not an > init. load_image_targphys() uses the rom blob loader code from hw/core/loader.c, which already supports reloading the blob on machine reset if necessary. That raises some more

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Li Guang
Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 3:24 PM, Li Guang wrote: Li Guang wrote: Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 2:22 PM, Li Guang wrote: Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 1:55 PM, Li Guang wrote:

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Peter Crosthwaite
On Mon, Jan 6, 2014 at 3:24 PM, Li Guang wrote: > Li Guang wrote: >> >> Peter Crosthwaite wrote: >>> >>> On Mon, Jan 6, 2014 at 2:22 PM, Li Guang wrote: Peter Crosthwaite wrote: > > On Mon, Jan 6, 2014 at 1:55 PM, Li Guang > wrote: > >> Li Guang wrote: >> >>>

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Li Guang
Li Guang wrote: Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 2:22 PM, Li Guang wrote: Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 1:55 PM, Li Guang wrote: Li Guang wrote: Paolo Bonzini wrote: Il 02/01/2014 11:51, Peter Crosthwaite ha scritto: No, please use "realize" and avoi

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Li Guang
Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 2:22 PM, Li Guang wrote: Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 1:55 PM, Li Guang wrote: Li Guang wrote: Paolo Bonzini wrote: Il 02/01/2014 11:51, Peter Crosthwaite ha scritto:

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Peter Crosthwaite
On Mon, Jan 6, 2014 at 2:22 PM, Li Guang wrote: > Peter Crosthwaite wrote: >> >> On Mon, Jan 6, 2014 at 1:55 PM, Li Guang wrote: >> >>> >>> Li Guang wrote: >>> Paolo Bonzini wrote: > > Il 02/01/2014 11:51, Peter Crosthwaite ha scritto: > No, please use

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Li Guang
Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 1:55 PM, Li Guang wrote: Li Guang wrote: Paolo Bonzini wrote: Il 02/01/2014 11:51, Peter Crosthwaite ha scritto: No, please use "realize" and avoid init. This way you can use an Error* to report the error. Also, th

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Peter Crosthwaite
On Mon, Jan 6, 2014 at 1:55 PM, Li Guang wrote: > Li Guang wrote: >> >> Paolo Bonzini wrote: >>> >>> Il 02/01/2014 11:51, Peter Crosthwaite ha scritto: >> >> No, please use "realize" and avoid init. This way you can use an >> Error* >> to report the error. >> >> Also, the

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Li Guang
Li Guang wrote: Paolo Bonzini wrote: Il 02/01/2014 11:51, Peter Crosthwaite ha scritto: No, please use "realize" and avoid init. This way you can use an Error* to report the error. Also, the actual load_image_targphys call probably should be done in a reset handler, not at realize time.

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-05 Thread Li Guang
Paolo Bonzini wrote: Il 02/01/2014 11:51, Peter Crosthwaite ha scritto: No, please use "realize" and avoid init. This way you can use an Error* to report the error. Also, the actual load_image_targphys call probably should be done in a reset handler, not at realize time. Ok I t

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-02 Thread Paolo Bonzini
Il 02/01/2014 11:51, Peter Crosthwaite ha scritto: >> > No, please use "realize" and avoid init. This way you can use an Error* >> > to report the error. >> > >> > Also, the actual load_image_targphys call probably should be done in a >> > reset handler, not at realize time. >> > > Ok I think that

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-02 Thread Peter Crosthwaite
On Thu, Jan 2, 2014 at 6:21 PM, Paolo Bonzini wrote: > Il 02/01/2014 06:50, Peter Crosthwaite ha scritto: >> On Thu, Jan 2, 2014 at 3:35 PM, Li Guang wrote: >>> this blob loader will be used to load a specified >>> blob into a specified RAM address. >>> >> >> Suggested-by: Peter Crosthwaite >> >

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-02 Thread Paolo Bonzini
Il 02/01/2014 06:50, Peter Crosthwaite ha scritto: > On Thu, Jan 2, 2014 at 3:35 PM, Li Guang wrote: >> this blob loader will be used to load a specified >> blob into a specified RAM address. >> > > Suggested-by: Peter Crosthwaite > >> Signed-off-by: Li Guang >> --- >> it can be used now for a

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-01 Thread Li Guang
Peter Crosthwaite wrote: On Thu, Jan 2, 2014 at 3:35 PM, Li Guang wrote: this blob loader will be used to load a specified blob into a specified RAM address. Suggested-by: Peter Crosthwaite Signed-off-by: Li Guang --- it can be used now for allwinner-a10, like: "-device blob-l

Re: [Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-01 Thread Peter Crosthwaite
On Thu, Jan 2, 2014 at 3:35 PM, Li Guang wrote: > this blob loader will be used to load a specified > blob into a specified RAM address. > Suggested-by: Peter Crosthwaite > Signed-off-by: Li Guang > --- > it can be used now for allwinner-a10, like: > "-device blob-loader,addr=0x4300,file=/

[Qemu-devel] [PATCH] hw/misc/blob-loader: add a generic blob loader

2014-01-01 Thread Li Guang
this blob loader will be used to load a specified blob into a specified RAM address. Signed-off-by: Li Guang --- it can be used now for allwinner-a10, like: "-device blob-loader,addr=0x4300,file=/path/script.bin" reference: http://linux-sunxi.org/Sunxi-tools script file address: http://dl.d