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 Bonzinipbonz...@redhat.com 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

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 peter.crosthwa...@xilinx.com wrote: On Mon, Jan 6, 2014 at 5:41 PM, Peter Maydell peter.mayd...@linaro.org wrote: That raises some more general design questions: * how is this expected to interact with rom blob loading, -machine firmware=,

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 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 firmware= is

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

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 Peter Crosthwaite
On Mon, Jan 6, 2014 at 1:55 PM, Li Guang lig.f...@cn.fujitsu.com 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 actual

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 Guanglig.f...@cn.fujitsu.com 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

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 lig.f...@cn.fujitsu.com wrote: Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 1:55 PM, Li Guanglig.f...@cn.fujitsu.com wrote: Li Guang wrote: Paolo Bonzini wrote: Il 02/01/2014 11:51, Peter Crosthwaite ha scritto: No, please use realize and

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 Guanglig.f...@cn.fujitsu.com wrote: Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 1:55 PM, Li Guanglig.f...@cn.fujitsu.com wrote: Li Guang wrote: Paolo Bonzini wrote: Il 02/01/2014

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 Guanglig.f...@cn.fujitsu.com wrote: Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 1:55 PM, Li Guanglig.f...@cn.fujitsu.com wrote: Li Guang wrote: Paolo Bonzini wrote: Il 02/01/2014 11:51, Peter Crosthwaite

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 lig.f...@cn.fujitsu.com wrote: Li Guang wrote: Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 2:22 PM, Li Guanglig.f...@cn.fujitsu.com wrote: Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 1:55 PM, Li Guanglig.f...@cn.fujitsu.com wrote: Li

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 Guanglig.f...@cn.fujitsu.com wrote: Li Guang wrote: Peter Crosthwaite wrote: On Mon, Jan 6, 2014 at 2:22 PM, Li Guanglig.f...@cn.fujitsu.com wrote: Peter Crosthwaite wrote: On Mon, Jan 6,

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 peter.crosthwa...@xilinx.com 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

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 peter.mayd...@linaro.org wrote: On 2 January 2014 05:50, Peter Crosthwaite peter.crosthwa...@xilinx.com 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

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 lig.f...@cn.fujitsu.com wrote: this blob loader will be used to load a specified blob into a specified RAM address. Suggested-by: Peter Crosthwaite peter.crosthwa...@xilinx.com Signed-off-by: Li

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 pbonz...@redhat.com wrote: Il 02/01/2014 06:50, Peter Crosthwaite ha scritto: On Thu, Jan 2, 2014 at 3:35 PM, Li Guang lig.f...@cn.fujitsu.com wrote: this blob loader will be used to load a specified blob into a specified RAM address.

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 settles it. The

[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 lig.f...@cn.fujitsu.com --- 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

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 lig.f...@cn.fujitsu.com wrote: this blob loader will be used to load a specified blob into a specified RAM address. Suggested-by: Peter Crosthwaite peter.crosthwa...@xilinx.com Signed-off-by: Li Guang lig.f...@cn.fujitsu.com --- it can be used now

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 Guanglig.f...@cn.fujitsu.com wrote: this blob loader will be used to load a specified blob into a specified RAM address. Suggested-by: Peter Crosthwaitepeter.crosthwa...@xilinx.com Signed-off-by: Li