* [Qemu-devel] [PATCH] allwinner-a10: add config script support
@ 2013-12-25 8:35 liguang
2013-12-25 9:29 ` Peter Maydell
0 siblings, 1 reply; 17+ messages in thread
From: liguang @ 2013-12-25 8:35 UTC (permalink / raw)
To: qemu-devel; +Cc: Peter Maydell, Peter Crosthwaite, liguang
sunxi-linux kernel parse config script
to do hardware configurations
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
---
hw/arm/allwinner-a10.c | 18 ++++++++++++++++++
hw/arm/cubieboard.c | 2 ++
include/hw/arm/allwinner-a10.h | 5 +++++
pc-bios/aw-script.bin | Bin 0 -> 50188 bytes
4 files changed, 25 insertions(+), 0 deletions(-)
create mode 100644 pc-bios/aw-script.bin
diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c
index 4658e19..b189897 100644
--- a/hw/arm/allwinner-a10.c
+++ b/hw/arm/allwinner-a10.c
@@ -18,6 +18,7 @@
#include "hw/sysbus.h"
#include "hw/devices.h"
#include "hw/arm/allwinner-a10.h"
+#include "hw/loader.h"
static void aw_a10_init(Object *obj)
{
@@ -33,6 +34,23 @@ static void aw_a10_init(Object *obj)
qdev_set_parent_bus(DEVICE(&s->timer), sysbus_get_default());
}
+ void aw_a10_load_script(const char *s)
+{
+ char *file_name;
+ int file_size;
+
+ file_name = qemu_find_file(QEMU_FILE_TYPE_BIOS, s);
+ file_size = get_image_size(file_name);
+ if (file_size < 0) {
+ error_report("%s size is wrong\n", AW_CONFIG_SCRIPT);
+ return;
+ }
+ if (load_image_targphys(file_name, AW_SCRIPT_ADDR, file_size) < 0) {
+ error_report("can't load %s\n", AW_CONFIG_SCRIPT);
+ return;
+ }
+}
+
static void aw_a10_realize(DeviceState *dev, Error **errp)
{
AwA10State *s = AW_A10(dev);
diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c
index 3fcb6d2..888256e 100644
--- a/hw/arm/cubieboard.c
+++ b/hw/arm/cubieboard.c
@@ -48,6 +48,8 @@ static void cubieboard_init(QEMUMachineInitArgs *args)
memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE,
&s->sdram);
+ aw_a10_load_script(AW_CONFIG_SCRIPT);
+
cubieboard_binfo.ram_size = args->ram_size;
cubieboard_binfo.kernel_filename = args->kernel_filename;
cubieboard_binfo.kernel_cmdline = args->kernel_cmdline;
diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h
index da36647..d395067 100644
--- a/include/hw/arm/allwinner-a10.h
+++ b/include/hw/arm/allwinner-a10.h
@@ -17,6 +17,9 @@
#define AW_A10_SDRAM_BASE 0x40000000
+#define AW_CONFIG_SCRIPT "aw-script.bin"
+#define AW_SCRIPT_ADDR 0x43000000
+
#define TYPE_AW_A10 "allwinner-a10"
#define AW_A10(obj) OBJECT_CHECK(AwA10State, (obj), TYPE_AW_A10)
@@ -31,5 +34,7 @@ typedef struct AwA10State {
AwA10PICState intc;
} AwA10State;
+void aw_a10_load_script(const char *s);
+
#define ALLWINNER_H_
#endif
diff --git a/pc-bios/aw-script.bin b/pc-bios/aw-script.bin
new file mode 100644
index 0000000000000000000000000000000000000000..47bca6ff62695aca99ca4b9f2c6d74e98828b062
GIT binary patch
literal 50188
zcmbuI37BM6b;s`v42&$pHVO<V6Ab$Zy-&{wG7K;Xj-taNi?OV(s_rhPwyCP_=`m5%
zh%vz^Bmqn!2E~}5Y(@~=kSvl#Ocav{ikK)S3dtvaZZTra`QLYM)p_@wb7o9lf7P$*
z)bE{p?m6c!Z>jgTxolZRtL60SblcU1N<T=8D=^c05!Wd9XWQLok;o*_x0SelxjR?W
z)wz9%yOg*}qg~mqDI@s`dc6l+xmzvGwA-3W*!TB=8}VSNQ|^`vnx8|GZv<{^H{9ua
zQ$2RpWko?Vsd6_Gw@~i(EfCy2ks}9IYNcvzW??R<8LYrPLflpT@|>j)etCwtPSc{C
zLp+WpxY{k7<Z9y95!Wm?%nHNLKOnBwELW_O4<l~nKHh&L7Ki#ilyRfG<DSg8vE6aY
zDY*vm7@-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Sg;-ZhXpd!
zAuiFck{q&B4jYk2&>3~mTd!Z5i$Xv0J>~Hkx}YEL5tG>VQWgyQnN$uQZ4ygr3;G!>
zT(0TY^l0UxPUzoKdmxv}CGjA(yR(7o#C!1QU$~q;dO7yPQ#n4vZY*(~eH#7;g9W<L
zhs5>}eFZuCkW@}0Umn(A-~)?+KQLxV3~ZD92pggwdEFqF;sH6S@^y{hW6ih4XV@Ug
z`CJ0Juz*ATQl3PE1>eQvAiS&y;Cs|P?f39Kc<4{t1>{(;#`f42>&&X`fBY``AD`p*
z^w!OFYqi$K&ivTOM*3CbC`1lF%IVS?+aN#FZDtw^HEc49O~$gh5SR&iVOdKr?6*&l
zf_VMVx2f^sJ=XIyaK*ZyAH$2(xG%u?WI;PdKEpTI26?uYUf?&<>pXhBie8t~3wmG&
zmRkVRg0iqYNzT8R6m@9u0`oX2hAo@u{TC>xaXZvGni2hk^>qZ`JlWmkWW2}vb}|av
z(OY*Sz1-ffnR0La^5Mu4_xS45KLq1RhU=@`yRRN!jrGM(os4bW2bPZ6iuD8UK6DM%
z=iIOoYv?<hUeH12`Onb~d<Wa$1H4b=hYE7&N!t^)g&gLjdLV~6k{mKg4x1!7i3@W0
zH|_VaE#xsLc)ifJCHo<l?1x;lKkXM$F6xUhL9!pZBspxA<j|GMVWY%DuJKZR!Atdp
zOsX$zm+Xg3vIla>9_W_zLnh@X<WfFF9jSjH$CAoXFDYJ-OYwqSsxS1X;~vU_T+$D@
zq#trkzvNHwnm?uZf=3-vKR}+&9ishGKLB3p2O!6OfutW@q$HQxBlJk^7jpE`sUGBl
zmJir3NO|bNeuN~){(>aO{(>aOeu^Yd=c8ayZaUUMj+je%0=ZOQ$ff*&T*^cEM$!Yh
OR4(L_e&nE(Z~qHdc_O6%
literal 0
HcmV?d00001
--
1.7.2.5
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-25 8:35 [Qemu-devel] [PATCH] allwinner-a10: add config script support liguang
@ 2013-12-25 9:29 ` Peter Maydell
2013-12-26 0:14 ` Li Guang
0 siblings, 1 reply; 17+ messages in thread
From: Peter Maydell @ 2013-12-25 9:29 UTC (permalink / raw)
To: liguang; +Cc: Peter Crosthwaite, QEMU Developers
On 25 December 2013 08:35, liguang <lig.fnst@cn.fujitsu.com> wrote:
> sunxi-linux kernel parse config script
> to do hardware configurations
>
> Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
> ---
> hw/arm/allwinner-a10.c | 18 ++++++++++++++++++
> hw/arm/cubieboard.c | 2 ++
> include/hw/arm/allwinner-a10.h | 5 +++++
> pc-bios/aw-script.bin | Bin 0 -> 50188 bytes
What is this? You can't just stick a 50K binary into the
tree with no explanation, I'm afraid.
thanks
-- PMM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-25 9:29 ` Peter Maydell
@ 2013-12-26 0:14 ` Li Guang
2013-12-26 0:32 ` Peter Maydell
0 siblings, 1 reply; 17+ messages in thread
From: Li Guang @ 2013-12-26 0:14 UTC (permalink / raw)
To: Peter Maydell; +Cc: Peter Crosthwaite, QEMU Developers
Peter Maydell wrote:
> On 25 December 2013 08:35, liguang<lig.fnst@cn.fujitsu.com> wrote:
>
>> sunxi-linux kernel parse config script
>> to do hardware configurations
>>
>> Signed-off-by: liguang<lig.fnst@cn.fujitsu.com>
>> ---
>> hw/arm/allwinner-a10.c | 18 ++++++++++++++++++
>> hw/arm/cubieboard.c | 2 ++
>> include/hw/arm/allwinner-a10.h | 5 +++++
>> pc-bios/aw-script.bin | Bin 0 -> 50188 bytes
>>
> What is this? You can't just stick a 50K binary into the
> tree with no explanation, I'm afraid.
>
>
it's the approach sunxi-linux kernel config hardware,
the binary is actually a transformed text script,
and context of script is like:
[card0_boot_para]
card_ctrl = 0
card_high_speed = 1
card_line = 4
sdc_d1 = port:PF00<2><1><default><default>
sdc_d0 = port:PF01<2><1><default><default>
sdc_clk = port:PF02<2><1><default><default>
sdc_cmd = port:PF03<2><1><default><default>
sdc_d3 = port:PF04<2><1><default><default>
sdc_d2 = port:PF05<2><1><default><default>
[card2_boot_para]
card_ctrl = 2
card_high_speed = 1
card_line = 4
sdc_cmd = port:PC06<3><1><default><default>
sdc_clk = port:PC07<3><1><default><default>
sdc_d0 = port:PC08<3><1><default><default>
sdc_d1 = port:PC09<3><1><default><default>
sdc_d2 = port:PC10<3><1><default><default>
sdc_d3 = port:PC11<3><1><default><default>
[twi_para]
twi_port = 0
twi_scl = port:PB00<2><default><default><default>
twi_sda = port:PB01<2><default><default><default>
[uart_para]
uart_debug_port = 0
uart_debug_tx = port:PB22<2><1><default><default>
uart_debug_rx = port:PB23<2><1><default><default>
....
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-26 0:14 ` Li Guang
@ 2013-12-26 0:32 ` Peter Maydell
2013-12-26 0:39 ` Li Guang
0 siblings, 1 reply; 17+ messages in thread
From: Peter Maydell @ 2013-12-26 0:32 UTC (permalink / raw)
To: Li Guang; +Cc: Peter Crosthwaite, QEMU Developers
On 26 December 2013 00:14, Li Guang <lig.fnst@cn.fujitsu.com> wrote:
> Peter Maydell wrote:
>>
>> On 25 December 2013 08:35, liguang<lig.fnst@cn.fujitsu.com> wrote:
>>
>>>
>>> sunxi-linux kernel parse config script
>>> to do hardware configurations
>>>
>>> Signed-off-by: liguang<lig.fnst@cn.fujitsu.com>
>>> ---
>>> hw/arm/allwinner-a10.c | 18 ++++++++++++++++++
>>> hw/arm/cubieboard.c | 2 ++
>>> include/hw/arm/allwinner-a10.h | 5 +++++
>>> pc-bios/aw-script.bin | Bin 0 -> 50188 bytes
>>>
>>
>> What is this? You can't just stick a 50K binary into the
>> tree with no explanation, I'm afraid.
>>
>>
>
>
> it's the approach sunxi-linux kernel config hardware,
> the binary is actually a transformed text script,
> and context of script is like:
>
> [card0_boot_para]
> card_ctrl = 0
> card_high_speed = 1
> card_line = 4
> sdc_d1 = port:PF00<2><1><default><default>
> sdc_d0 = port:PF01<2><1><default><default>
> sdc_clk = port:PF02<2><1><default><default>
> sdc_cmd = port:PF03<2><1><default><default>
> sdc_d3 = port:PF04<2><1><default><default>
> sdc_d2 = port:PF05<2><1><default><default>
So what sets this up on real hardware? Is this part of
a firmware blob? Is it in ROM or flash?
thanks
-- PMM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-26 0:32 ` Peter Maydell
@ 2013-12-26 0:39 ` Li Guang
2013-12-26 0:47 ` Peter Maydell
0 siblings, 1 reply; 17+ messages in thread
From: Li Guang @ 2013-12-26 0:39 UTC (permalink / raw)
To: Peter Maydell; +Cc: Peter Crosthwaite, QEMU Developers
Peter Maydell wrote:
> On 26 December 2013 00:14, Li Guang<lig.fnst@cn.fujitsu.com> wrote:
>
>> Peter Maydell wrote:
>>
>>> On 25 December 2013 08:35, liguang<lig.fnst@cn.fujitsu.com> wrote:
>>>
>>>
>>>> sunxi-linux kernel parse config script
>>>> to do hardware configurations
>>>>
>>>> Signed-off-by: liguang<lig.fnst@cn.fujitsu.com>
>>>> ---
>>>> hw/arm/allwinner-a10.c | 18 ++++++++++++++++++
>>>> hw/arm/cubieboard.c | 2 ++
>>>> include/hw/arm/allwinner-a10.h | 5 +++++
>>>> pc-bios/aw-script.bin | Bin 0 -> 50188 bytes
>>>>
>>>>
>>> What is this? You can't just stick a 50K binary into the
>>> tree with no explanation, I'm afraid.
>>>
>>>
>>>
>>
>> it's the approach sunxi-linux kernel config hardware,
>> the binary is actually a transformed text script,
>> and context of script is like:
>>
>> [card0_boot_para]
>> card_ctrl = 0
>> card_high_speed = 1
>> card_line = 4
>> sdc_d1 = port:PF00<2><1><default><default>
>> sdc_d0 = port:PF01<2><1><default><default>
>> sdc_clk = port:PF02<2><1><default><default>
>> sdc_cmd = port:PF03<2><1><default><default>
>> sdc_d3 = port:PF04<2><1><default><default>
>> sdc_d2 = port:PF05<2><1><default><default>
>>
> So what sets this up on real hardware? Is this part of
> a firmware blob? Is it in ROM or flash?
>
>
it's generally in /boot, bootloader will load it
into ram address 0x43000000, kernel will find it
at this fixed address, and parse it, learn the hardware
related configuration, mostly property of devices, and
GPIOes used.
Thanks and Merry Christmas!
Li Guang
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-26 0:39 ` Li Guang
@ 2013-12-26 0:47 ` Peter Maydell
2013-12-26 0:58 ` Li Guang
2013-12-26 1:09 ` Peter Crosthwaite
0 siblings, 2 replies; 17+ messages in thread
From: Peter Maydell @ 2013-12-26 0:47 UTC (permalink / raw)
To: Li Guang; +Cc: Peter Crosthwaite, QEMU Developers
On 26 December 2013 00:39, Li Guang <lig.fnst@cn.fujitsu.com> wrote:
> Peter Maydell wrote:
>>
>> On 26 December 2013 00:14, Li Guang<lig.fnst@cn.fujitsu.com> wrote:
>>> it's the approach sunxi-linux kernel config hardware,
>>> the binary is actually a transformed text script,
>>> and context of script is like:
>>>
>>> [card0_boot_para]
>>> card_ctrl = 0
>>> card_high_speed = 1
>>> card_line = 4
>>> sdc_d1 = port:PF00<2><1><default><default>
>>> sdc_d0 = port:PF01<2><1><default><default>
>>> sdc_clk = port:PF02<2><1><default><default>
>>> sdc_cmd = port:PF03<2><1><default><default>
>>> sdc_d3 = port:PF04<2><1><default><default>
>>> sdc_d2 = port:PF05<2><1><default><default>
>>>
>>
>> So what sets this up on real hardware? Is this part of
>> a firmware blob? Is it in ROM or flash?
> it's generally in /boot, bootloader will load it
> into ram address 0x43000000, kernel will find it
> at this fixed address, and parse it, learn the hardware
> related configuration, mostly property of devices, and
> GPIOes used.
Weird. Why isn't this just using devicetree?
I'd rather not have to add support to QEMU's bootloader
for weird things like this if I can avoid it...
Who provides this file? The board manufacturer?
Where's the source? How do you create the blob?
What license are the sources under?
thanks
-- PMM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-26 0:47 ` Peter Maydell
@ 2013-12-26 0:58 ` Li Guang
2013-12-26 19:40 ` Hans de Goede
2013-12-26 1:09 ` Peter Crosthwaite
1 sibling, 1 reply; 17+ messages in thread
From: Li Guang @ 2013-12-26 0:58 UTC (permalink / raw)
To: Peter Maydell; +Cc: Peter Crosthwaite, QEMU Developers
Peter Maydell wrote:
> On 26 December 2013 00:39, Li Guang<lig.fnst@cn.fujitsu.com> wrote:
>
>> Peter Maydell wrote:
>>
>>> On 26 December 2013 00:14, Li Guang<lig.fnst@cn.fujitsu.com> wrote:
>>>
>>>> it's the approach sunxi-linux kernel config hardware,
>>>> the binary is actually a transformed text script,
>>>> and context of script is like:
>>>>
>>>> [card0_boot_para]
>>>> card_ctrl = 0
>>>> card_high_speed = 1
>>>> card_line = 4
>>>> sdc_d1 = port:PF00<2><1><default><default>
>>>> sdc_d0 = port:PF01<2><1><default><default>
>>>> sdc_clk = port:PF02<2><1><default><default>
>>>> sdc_cmd = port:PF03<2><1><default><default>
>>>> sdc_d3 = port:PF04<2><1><default><default>
>>>> sdc_d2 = port:PF05<2><1><default><default>
>>>>
>>>>
>>> So what sets this up on real hardware? Is this part of
>>> a firmware blob? Is it in ROM or flash?
>>>
>
>> it's generally in /boot, bootloader will load it
>> into ram address 0x43000000, kernel will find it
>> at this fixed address, and parse it, learn the hardware
>> related configuration, mostly property of devices, and
>> GPIOes used.
>>
> Weird. Why isn't this just using devicetree?
>
don't know the exactly reason linux-sunxi community
do this(actually, the script parsing code mostly wrote
by engineer from Allwinner).
> I'd rather not have to add support to QEMU's bootloader
> for weird things like this if I can avoid it...
>
> Who provides this file? The board manufacturer?
> Where's the source? How do you create the blob?
> What license are the sources under?
>
>
the file will vary for different board,
we can created by our-self,
just write the formatted text script, and
transform it to binary by a tool,
refer to:
http://linux-sunxi.org/Sunxi-tools
Thanks!
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-26 0:58 ` Li Guang
@ 2013-12-26 19:40 ` Hans de Goede
2013-12-26 21:34 ` Peter Maydell
0 siblings, 1 reply; 17+ messages in thread
From: Hans de Goede @ 2013-12-26 19:40 UTC (permalink / raw)
To: Li Guang, Peter Maydell; +Cc: Peter Crosthwaite, QEMU Developers
Hi,
On 12/26/2013 01:58 AM, Li Guang wrote:
> Peter Maydell wrote:
>> On 26 December 2013 00:39, Li Guang<lig.fnst@cn.fujitsu.com> wrote:
>>> Peter Maydell wrote:
>>>> On 26 December 2013 00:14, Li Guang<lig.fnst@cn.fujitsu.com> wrote:
>>>>> it's the approach sunxi-linux kernel config hardware,
>>>>> the binary is actually a transformed text script,
>>>>> and context of script is like:
>>>>>
>>>>> [card0_boot_para]
>>>>> card_ctrl = 0
>>>>> card_high_speed = 1
>>>>> card_line = 4
>>>>> sdc_d1 = port:PF00<2><1><default><default>
>>>>> sdc_d0 = port:PF01<2><1><default><default>
>>>>> sdc_clk = port:PF02<2><1><default><default>
>>>>> sdc_cmd = port:PF03<2><1><default><default>
>>>>> sdc_d3 = port:PF04<2><1><default><default>
>>>>> sdc_d2 = port:PF05<2><1><default><default>
>>>>>
>>>> So what sets this up on real hardware? Is this part of
>>>> a firmware blob? Is it in ROM or flash?
>>> it's generally in /boot, bootloader will load it
>>> into ram address 0x43000000, kernel will find it
>>> at this fixed address, and parse it, learn the hardware
>>> related configuration, mostly property of devices, and
>>> GPIOes used.
>> Weird. Why isn't this just using devicetree?
>
> don't know the exactly reason linux-sunxi community
> do this(actually, the script parsing code mostly wrote
> by engineer from Allwinner).
I'm one of the linux-sunxi developers, the only reason we've
this fex file abomination, is because we've inherited it
from the android-allwinner sources.
Currently most of the linux-sunxi developers are no longer
focusing on the 3.4 android/allwinner derived sources we
maintain. They are currently in a "good enough for everyday
use" state.
So now most of us are focusing on getting *proper* sunxi
SoC support upstream. This is using device-tree. Currently
we've working timers, interrupt-controller, uarts, mmc,
sata, nic (both 100mbit and Gbit variants), ehci controller
and builtin rtc support with upstream kernels. Which I
believe likely covers everything the qemu emulation offers
atm. For those interested, see:
https://github.com/linux-sunxi/linux-sunxi/commits/sunxi-devel
And the mailinglist reports about progress in that branch.
From the linux-sunxi pov fex files are a legacy thing which
will go away in the future.
Regards,
Hans
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-26 19:40 ` Hans de Goede
@ 2013-12-26 21:34 ` Peter Maydell
2013-12-27 0:21 ` Li Guang
0 siblings, 1 reply; 17+ messages in thread
From: Peter Maydell @ 2013-12-26 21:34 UTC (permalink / raw)
To: Hans de Goede; +Cc: Peter Crosthwaite, QEMU Developers, Li Guang
On 26 December 2013 19:40, Hans de Goede <hdegoede@redhat.com> wrote:
> I'm one of the linux-sunxi developers, the only reason we've
> this fex file abomination, is because we've inherited it
> from the android-allwinner sources.
Thanks for the clarification; I suspected that might be the case.
> Currently most of the linux-sunxi developers are no longer
> focusing on the 3.4 android/allwinner derived sources we
> maintain. They are currently in a "good enough for everyday
> use" state.
>
> So now most of us are focusing on getting *proper* sunxi
> SoC support upstream. This is using device-tree. Currently
> we've working timers, interrupt-controller, uarts, mmc,
> sata, nic (both 100mbit and Gbit variants), ehci controller
> and builtin rtc support with upstream kernels. Which I
> believe likely covers everything the qemu emulation offers
> atm. For those interested, see:
> https://github.com/linux-sunxi/linux-sunxi/commits/sunxi-devel
>
> And the mailinglist reports about progress in that branch.
>
> From the linux-sunxi pov fex files are a legacy thing which
> will go away in the future.
Given that, my preference would be to not support fex
file loading in QEMU.
thanks
-- PMM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-26 21:34 ` Peter Maydell
@ 2013-12-27 0:21 ` Li Guang
2013-12-27 0:38 ` Peter Maydell
2013-12-27 0:54 ` Peter Crosthwaite
0 siblings, 2 replies; 17+ messages in thread
From: Li Guang @ 2013-12-27 0:21 UTC (permalink / raw)
To: Peter Maydell; +Cc: Hans de Goede, Peter Crosthwaite, QEMU Developers
Peter Maydell wrote:
> On 26 December 2013 19:40, Hans de Goede<hdegoede@redhat.com> wrote:
>
>> I'm one of the linux-sunxi developers, the only reason we've
>> this fex file abomination, is because we've inherited it
>> from the android-allwinner sources.
>>
> Thanks for the clarification; I suspected that might be the case.
>
>
>> Currently most of the linux-sunxi developers are no longer
>> focusing on the 3.4 android/allwinner derived sources we
>> maintain. They are currently in a "good enough for everyday
>> use" state.
>>
>> So now most of us are focusing on getting *proper* sunxi
>> SoC support upstream. This is using device-tree. Currently
>> we've working timers, interrupt-controller, uarts, mmc,
>> sata, nic (both 100mbit and Gbit variants), ehci controller
>> and builtin rtc support with upstream kernels. Which I
>> believe likely covers everything the qemu emulation offers
>> atm. For those interested, see:
>> https://github.com/linux-sunxi/linux-sunxi/commits/sunxi-devel
>>
>> And the mailinglist reports about progress in that branch.
>>
>> From the linux-sunxi pov fex files are a legacy thing which
>> will go away in the future.
>>
> Given that, my preference would be to not support fex
> file loading in QEMU.
>
>
>
that means we don't care legacy script which already be used
in most of cases?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-27 0:21 ` Li Guang
@ 2013-12-27 0:38 ` Peter Maydell
2013-12-27 0:54 ` Peter Crosthwaite
1 sibling, 0 replies; 17+ messages in thread
From: Peter Maydell @ 2013-12-27 0:38 UTC (permalink / raw)
To: Li Guang; +Cc: Hans de Goede, Peter Crosthwaite, QEMU Developers
On 27 December 2013 00:21, Li Guang <lig.fnst@cn.fujitsu.com> wrote:
> Peter Maydell wrote:
>> On 26 December 2013 19:40, Hans de Goede<hdegoede@redhat.com> wrote:
>>> I'm one of the linux-sunxi developers, the only reason we've
>>> this fex file abomination, is because we've inherited it
>>> from the android-allwinner sources.
>> Thanks for the clarification; I suspected that might be the case.
>>> Currently most of the linux-sunxi developers are no longer
>>> focusing on the 3.4 android/allwinner derived sources we
>>> maintain. They are currently in a "good enough for everyday
>>> use" state.
>>>
>>> So now most of us are focusing on getting *proper* sunxi
>>> SoC support upstream. This is using device-tree. Currently
>>> we've working timers, interrupt-controller, uarts, mmc,
>>> sata, nic (both 100mbit and Gbit variants), ehci controller
>>> and builtin rtc support with upstream kernels. Which I
>>> believe likely covers everything the qemu emulation offers
>>> atm. For those interested, see:
>>> https://github.com/linux-sunxi/linux-sunxi/commits/sunxi-devel
>>>
>>> And the mailinglist reports about progress in that branch.
>>>
>>> From the linux-sunxi pov fex files are a legacy thing which
>>> will go away in the future.
>>>
>>
>> Given that, my preference would be to not support fex
>> file loading in QEMU.
> that means we don't care legacy script which already be used
> in most of cases?
If you care about the legacy case I think it would be nicer
to support it the same way the hardware does: implement
the flash or ROM which on the real hardware has the boot
loader in it and then just have a mode where we run the
guest firmware and boot the kernel off SD card or similar.
I don't think we should be adding hacks which neither
(a) are part of implementing emulation of the hardware
nor (b) are needed to boot upstream kernels.
thanks
-- PMM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-27 0:21 ` Li Guang
2013-12-27 0:38 ` Peter Maydell
@ 2013-12-27 0:54 ` Peter Crosthwaite
2013-12-27 1:06 ` Peter Maydell
1 sibling, 1 reply; 17+ messages in thread
From: Peter Crosthwaite @ 2013-12-27 0:54 UTC (permalink / raw)
To: Li Guang; +Cc: Hans de Goede, qemu-devel@nongnu.org Developers, Peter Maydell
[-- Attachment #1: Type: text/plain, Size: 1867 bytes --]
On Dec 27, 2013 10:24 AM, "Li Guang" <lig.fnst@cn.fujitsu.com> wrote:
>
> Peter Maydell wrote:
>>
>> On 26 December 2013 19:40, Hans de Goede<hdegoede@redhat.com> wrote:
>>
>>>
>>> I'm one of the linux-sunxi developers, the only reason we've
>>> this fex file abomination, is because we've inherited it
>>> from the android-allwinner sources.
>>>
>>
>> Thanks for the clarification; I suspected that might be the case.
>>
>>
>>>
>>> Currently most of the linux-sunxi developers are no longer
>>> focusing on the 3.4 android/allwinner derived sources we
>>> maintain. They are currently in a "good enough for everyday
>>> use" state.
>>>
>>> So now most of us are focusing on getting *proper* sunxi
>>> SoC support upstream. This is using device-tree. Currently
>>> we've working timers, interrupt-controller, uarts, mmc,
>>> sata, nic (both 100mbit and Gbit variants), ehci controller
>>> and builtin rtc support with upstream kernels. Which I
>>> believe likely covers everything the qemu emulation offers
>>> atm. For those interested, see:
>>> https://github.com/linux-sunxi/linux-sunxi/commits/sunxi-devel
>>>
>>> And the mailinglist reports about progress in that branch.
>>>
>>> From the linux-sunxi pov fex files are a legacy thing which
>>> will go away in the future.
>>>
>>
>> Given that, my preference would be to not support fex
>> file loading in QEMU.
>>
>>
>>
>
>
> that means we don't care legacy script which already be used
> in most of cases?
>
Your bootstrap process is just "blob this file at this address" which to me
is legitimate generic functionality. If you implement arbitrary file
blobbing on Cmd line there are many applications across all archs and
plats. and you fex case can be done without any allwinnerisms in tree.
I have use cases for this myself (mainly for emulating handoff in AMP
systems - two guests).
Regards
Peter
>
>
[-- Attachment #2: Type: text/html, Size: 2732 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-27 0:54 ` Peter Crosthwaite
@ 2013-12-27 1:06 ` Peter Maydell
0 siblings, 0 replies; 17+ messages in thread
From: Peter Maydell @ 2013-12-27 1:06 UTC (permalink / raw)
To: Peter Crosthwaite
Cc: Hans de Goede, qemu-devel@nongnu.org Developers, Li Guang
On 27 December 2013 00:54, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> Your bootstrap process is just "blob this file at this address" which to me
> is legitimate generic functionality. If you implement arbitrary file
> blobbing on Cmd line there are many applications across all archs and plats.
> and you fex case can be done without any allwinnerisms in tree.
If you want to propose something for generic target file load that's
cross architecture and platform I have no inherent objection to that.
thanks
-- PMM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-26 0:47 ` Peter Maydell
2013-12-26 0:58 ` Li Guang
@ 2013-12-26 1:09 ` Peter Crosthwaite
2013-12-26 1:22 ` Li Guang
2013-12-26 1:30 ` Peter Maydell
1 sibling, 2 replies; 17+ messages in thread
From: Peter Crosthwaite @ 2013-12-26 1:09 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers, Li Guang
On Thu, Dec 26, 2013 at 10:47 AM, Peter Maydell
<peter.maydell@linaro.org> wrote:
> On 26 December 2013 00:39, Li Guang <lig.fnst@cn.fujitsu.com> wrote:
>> Peter Maydell wrote:
>>>
>>> On 26 December 2013 00:14, Li Guang<lig.fnst@cn.fujitsu.com> wrote:
>>>> it's the approach sunxi-linux kernel config hardware,
>>>> the binary is actually a transformed text script,
>>>> and context of script is like:
>>>>
>>>> [card0_boot_para]
>>>> card_ctrl = 0
>>>> card_high_speed = 1
>>>> card_line = 4
>>>> sdc_d1 = port:PF00<2><1><default><default>
>>>> sdc_d0 = port:PF01<2><1><default><default>
>>>> sdc_clk = port:PF02<2><1><default><default>
>>>> sdc_cmd = port:PF03<2><1><default><default>
>>>> sdc_d3 = port:PF04<2><1><default><default>
>>>> sdc_d2 = port:PF05<2><1><default><default>
>>>>
>>>
>>> So what sets this up on real hardware? Is this part of
>>> a firmware blob? Is it in ROM or flash?
>
>> it's generally in /boot, bootloader will load it
>> into ram address 0x43000000, kernel will find it
>> at this fixed address, and parse it, learn the hardware
>> related configuration, mostly property of devices, and
>> GPIOes used.
>
> Weird. Why isn't this just using devicetree?
> I'd rather not have to add support to QEMU's bootloader
> for weird things like this if I can avoid it...
>
Can you just provide a generic solution to the "blob some random data
into RAM" problem (If one doesn't exist already)? I toyed with the
Idea of a bootloader as a device a while back, which would allow you
to implement multiple bootloaders unaware of each other, with
arbitrary command line args:
http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg00858.html
That patch demonstrates creating a bootloader as a QOM object. Its
ancient, so the style is way out of date, but the idea is still there.
So you could use the ARM linux loader as is, then blob your firmware
in on the side something like:
qemu-system-arm -device blob-loader,addr=0x43000000,file=/path/to/blob
-kernel ...
I think your binary file here can then just be treated as any other
binary boot product and kept outside of QEMU.
Regards,
Peter
> Who provides this file? The board manufacturer?
> Where's the source? How do you create the blob?
> What license are the sources under?
>
> thanks
> -- PMM
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-26 1:09 ` Peter Crosthwaite
@ 2013-12-26 1:22 ` Li Guang
2013-12-26 1:30 ` Peter Maydell
1 sibling, 0 replies; 17+ messages in thread
From: Li Guang @ 2013-12-26 1:22 UTC (permalink / raw)
To: Peter Crosthwaite; +Cc: Peter Maydell, QEMU Developers
Peter Crosthwaite wrote:
> On Thu, Dec 26, 2013 at 10:47 AM, Peter Maydell
> <peter.maydell@linaro.org> wrote:
>
>> On 26 December 2013 00:39, Li Guang<lig.fnst@cn.fujitsu.com> wrote:
>>
>>> Peter Maydell wrote:
>>>
>>>> On 26 December 2013 00:14, Li Guang<lig.fnst@cn.fujitsu.com> wrote:
>>>>
>>>>> it's the approach sunxi-linux kernel config hardware,
>>>>> the binary is actually a transformed text script,
>>>>> and context of script is like:
>>>>>
>>>>> [card0_boot_para]
>>>>> card_ctrl = 0
>>>>> card_high_speed = 1
>>>>> card_line = 4
>>>>> sdc_d1 = port:PF00<2><1><default><default>
>>>>> sdc_d0 = port:PF01<2><1><default><default>
>>>>> sdc_clk = port:PF02<2><1><default><default>
>>>>> sdc_cmd = port:PF03<2><1><default><default>
>>>>> sdc_d3 = port:PF04<2><1><default><default>
>>>>> sdc_d2 = port:PF05<2><1><default><default>
>>>>>
>>>>>
>>>> So what sets this up on real hardware? Is this part of
>>>> a firmware blob? Is it in ROM or flash?
>>>>
>>
>>> it's generally in /boot, bootloader will load it
>>> into ram address 0x43000000, kernel will find it
>>> at this fixed address, and parse it, learn the hardware
>>> related configuration, mostly property of devices, and
>>> GPIOes used.
>>>
>> Weird. Why isn't this just using devicetree?
>> I'd rather not have to add support to QEMU's bootloader
>> for weird things like this if I can avoid it...
>>
>>
> Can you just provide a generic solution to the "blob some random data
> into RAM" problem (If one doesn't exist already)? I toyed with the
> Idea of a bootloader as a device a while back, which would allow you
> to implement multiple bootloaders unaware of each other, with
> arbitrary command line args:
>
> http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg00858.html
>
> That patch demonstrates creating a bootloader as a QOM object. Its
> ancient, so the style is way out of date, but the idea is still there.
>
> So you could use the ARM linux loader as is, then blob your firmware
> in on the side something like:
>
> qemu-system-arm -device blob-loader,addr=0x43000000,file=/path/to/blob
> -kernel ...
>
>
that's a good option.
> I think your binary file here can then just be treated as any other
> binary boot product and kept outside of QEMU.
>
Yes, I would like to keep it outside of QEMU,
what's about directly add an abstract device called "blob"?
and the device has it's properties like path, address...
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-26 1:09 ` Peter Crosthwaite
2013-12-26 1:22 ` Li Guang
@ 2013-12-26 1:30 ` Peter Maydell
2013-12-26 1:46 ` Li Guang
1 sibling, 1 reply; 17+ messages in thread
From: Peter Maydell @ 2013-12-26 1:30 UTC (permalink / raw)
To: Peter Crosthwaite; +Cc: QEMU Developers, Li Guang
On 26 December 2013 01:09, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> Can you just provide a generic solution to the "blob some random data
> into RAM" problem (If one doesn't exist already)?
Well, we do already have that (see -machine firmware=whatever), but...
> I think your binary file here can then just be treated as any other
> binary boot product and kept outside of QEMU.
...it's much easier to keep the blob outside QEMU because otherwise
it has to have a git submodule and be built somehow and is generally
a bit of a faff.
Is this FEX stuff actually supported by the upstream Linux kernel?
Googling mostly produced a bunch of stuff from a mid-year flamewar.
I definitely don't think we should add any special support for it in
QEMU if it's just some random thing that isn't going to be upstreamed.
thanks
-- PMM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [PATCH] allwinner-a10: add config script support
2013-12-26 1:30 ` Peter Maydell
@ 2013-12-26 1:46 ` Li Guang
0 siblings, 0 replies; 17+ messages in thread
From: Li Guang @ 2013-12-26 1:46 UTC (permalink / raw)
To: Peter Maydell; +Cc: Peter Crosthwaite, QEMU Developers
Peter Maydell wrote:
> On 26 December 2013 01:09, Peter Crosthwaite
> <peter.crosthwaite@xilinx.com> wrote:
>
>> Can you just provide a generic solution to the "blob some random data
>> into RAM" problem (If one doesn't exist already)?
>>
> Well, we do already have that (see -machine firmware=whatever), but...
>
>
Yes, right.
>> I think your binary file here can then just be treated as any other
>> binary boot product and kept outside of QEMU.
>>
> ...it's much easier to keep the blob outside QEMU because otherwise
> it has to have a git submodule and be built somehow and is generally
> a bit of a faff.
>
> Is this FEX stuff actually supported by the upstream Linux kernel?
> Googling mostly produced a bunch of stuff from a mid-year flamewar.
> I definitely don't think we should add any special support for it in
> QEMU if it's just some random thing that isn't going to be upstreamed.
>
>
OK, I will use firmware=script.bin option,
thanks!
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2013-12-27 1:07 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-25 8:35 [Qemu-devel] [PATCH] allwinner-a10: add config script support liguang
2013-12-25 9:29 ` Peter Maydell
2013-12-26 0:14 ` Li Guang
2013-12-26 0:32 ` Peter Maydell
2013-12-26 0:39 ` Li Guang
2013-12-26 0:47 ` Peter Maydell
2013-12-26 0:58 ` Li Guang
2013-12-26 19:40 ` Hans de Goede
2013-12-26 21:34 ` Peter Maydell
2013-12-27 0:21 ` Li Guang
2013-12-27 0:38 ` Peter Maydell
2013-12-27 0:54 ` Peter Crosthwaite
2013-12-27 1:06 ` Peter Maydell
2013-12-26 1:09 ` Peter Crosthwaite
2013-12-26 1:22 ` Li Guang
2013-12-26 1:30 ` Peter Maydell
2013-12-26 1:46 ` Li Guang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).