qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Li Guang <lig.fnst@cn.fujitsu.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Bamvor Jian Zhang <BJZhang@suse.com>
Subject: Re: [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type
Date: Fri, 29 Nov 2013 08:46:41 +0800	[thread overview]
Message-ID: <5297E3F1.4060200@cn.fujitsu.com> (raw)
In-Reply-To: <5295BB1E.1090600@suse.de>

Andreas Färber wrote:
> Am 27.11.2013 10:22, schrieb Andreas Färber:
>    
>> Hi,
>>
>> Am 26.11.2013 10:22, schrieb Peter Crosthwaite:
>>      
>>> On Tue, Nov 26, 2013 at 5:22 PM, liguang<lig.fnst@cn.fujitsu.com>  wrote:
>>>        
>>>> Signed-off-by: liguang<lig.fnst@cn.fujitsu.com>
>>>> ---
>>>>   hw/arm/Makefile.objs |    1 +
>>>>   hw/arm/sunxi-soc.c   |   98 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>   2 files changed, 99 insertions(+), 0 deletions(-)
>>>>   create mode 100644 hw/arm/sunxi-soc.c
>>>>
>>>> diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs
>>>> index 3671b42..f9f3071 100644
>>>> --- a/hw/arm/Makefile.objs
>>>> +++ b/hw/arm/Makefile.objs
>>>> @@ -5,3 +5,4 @@ obj-y += tosa.o versatilepb.o vexpress.o xilinx_zynq.o z2.o
>>>>
>>>>   obj-y += armv7m.o exynos4210.o pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o
>>>>   obj-y += omap1.o omap2.o strongarm.o
>>>> +obj-y += sunxi-soc.o
>>>> diff --git a/hw/arm/sunxi-soc.c b/hw/arm/sunxi-soc.c
>>>> new file mode 100644
>>>> index 0000000..b45af6d
>>>> --- /dev/null
>>>> +++ b/hw/arm/sunxi-soc.c
>>>> @@ -0,0 +1,98 @@
>>>> +/*
>>>> + * Allwinner sunxi series SoC emulation
>>>> + *
>>>> + * Copyright (C) 2013 Li Guang
>>>> + * Written by Li Guang<lig.fnst@cn.fujitsu.com>
>>>> + *
>>>> + * This program is free software; you can redistribute it and/or modify it
>>>> + * under the terms of the GNU General Public License as published by the
>>>> + * Free Software Foundation; either version 2 of the License, or
>>>> + * (at your option) any later version.
>>>> + *
>>>> + * This program is distributed in the hope that it will be useful, but WITHOUT
>>>> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
>>>> + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
>>>> + * for more details.
>>>> + */
>>>> +
>>>> +#include "hw/sysbus.h"
>>>> +#include "hw/devices.h"
>>>> +#include "hw/boards.h"
>>>> +#include "hw/arm/arm.h"
>>>> +#include "hw/ptimer.h"
>>>> +#include "hw/char/serial.h"
>>>> +#include "hw/timer/sunxi-pit.h"
>>>> +#include "hw/intc/sunxi-pic.h"
>>>> +
>>>> +#include "sysemu/sysemu.h"
>>>> +#include "exec/address-spaces.h"
>>>> +
>>>> +
>>>> +#define SUNXI_PIC_REG_BASE 0x01c20400
>>>> +#define SUNXI_PIT_REG_BASE 0x01c20c00
>>>> +#define SUNXI_UART0_REG_BASE 0x01c28000
>>>> +
>>>> +static struct arm_boot_info sunxi_binfo = {
>>>> +    .loader_start = 0x40000000,
>>>> +    .board_id = 0x1008,
>>>> +};
>>>> +
>>>> +static void sunxi_init(QEMUMachineInitArgs *args)
>>>>          
>>> I would check with Andreas/PMM on what the go is with SoCs regarding
>>> container devices and boards. My (vague) understanding is that SoCs
>>> should be container devices and boards instantiate those containers
>>> with off-chip connectivity. This seems flat to me, with everything on
>>> board level.
>>>        
>> Yes, thanks, that matches what I was going to comment. But I think it's
>> even more complicated: To my understanding, "sunxi" is the name of a
>> community effort [1] to clean up and upstream the BSP kernels from
>> Allwinner, so it sounds as if this was an attempt to write an emulation
>> for that kernel family while naming everything "sunxi" when in fact the
>> SoCs are called Axx [2] (with A1x = sun4i, A2x = sun5i, A3x = sun6i but
>>      
> My interpolation was incorrect: A10 = sun4i, A13 = sun5i, A3x = sun6i,
> A20 = sun7i
>
> Andreas
>
>    
>> no literal "sunxi" AFAIK) and boards include Cubieboard, Cubieboard2,
>> Cubieboard3/Cubietruck [3] and whatever tablets etc. are out there.
>> (CC'ing Bamvor)
>>
>> That's a lesson we learned from the old "prep" machine: Please name
>> things after real hardware, only then can it later be verified whether
>> the modeling is actually correct or which changes need to be performed.
>>
>>      

well, sunxi maybe be representation of Axx series,
but, what's wrong?
we can't track Axx hardware changes? why?
and also, this patch-set is also community effort just like
sunxi in linux kernel.

>> A practical aspect of modeling SoCs correctly is that they can more
>> easily be reused across boards or modules, and you don't need to mess
>> with machine-level cpu_model if you have a fixed SoC-CPU mapping.
>>      

modeling SoC is good, but
sorry, I can't assure that fixed mapping.

>> You may want to consult the recent DIGIC or earlier Faraday series or my
>> Tegra2 repository for examples of how to implement this paradigm.
>> I believe the composition tree naming wrt "cortex" and the MPCore was
>> still open, hopefully PMM can comment on his current preferences.
>>
>> And thanks for your efforts, from a distribution viewpoint I am looking
>> forward to testing our kernels and images with this.
>>      

currently, I can only provide linux kernel build for sunxi-4i,
where I can up-load it to?

>> Regards,
>> Andreas
>>
>> [1] http://linux-sunxi.org/Main_Page
>> [2] http://www.allwinnertech.com/en/product/A-Serial.html
>>      

this page is can't accessed for me.

Thanks for your comment!

Li Guang

>> [3] http://cubieboard.org/
>>
>>      
>
>    


  reply	other threads:[~2013-11-29  0:48 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-26  7:22 [Qemu-devel] [PATCH v4 0/4] add sunxi machine type liguang
2013-11-26  7:22 ` [Qemu-devel] [PATCH v4 1/4] hw/timer: add sunxi timer device liguang
2013-11-26  8:40   ` Peter Crosthwaite
2013-11-26  8:59     ` Li Guang
2013-11-26  9:14       ` Peter Crosthwaite
2013-11-26  9:19         ` Li Guang
2013-11-26  9:25           ` Peter Crosthwaite
2013-11-26  7:22 ` [Qemu-devel] [PATCH v4 2/4] hw/intc: add sunxi interrupt controller device liguang
2013-11-26  9:02   ` Peter Crosthwaite
2013-11-26  9:11     ` Li Guang
2013-11-27  3:36       ` Li Guang
2013-11-27  5:31         ` Peter Crosthwaite
2013-11-27  5:44           ` Li Guang
2013-11-26  7:22 ` [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type liguang
2013-11-26  9:22   ` Peter Crosthwaite
2013-11-27  0:22     ` Li Guang
2013-11-27  9:22     ` Andreas Färber
2013-11-27  9:27       ` Andreas Färber
2013-11-29  0:46         ` Li Guang [this message]
2013-11-29  0:53           ` Peter Crosthwaite
2013-11-29  3:27           ` Andreas Färber
2013-11-29  8:06             ` Li Guang
2013-11-29  8:31               ` Peter Maydell
2013-11-29  8:49                 ` Bamvor Jian Zhang
2013-11-29 13:51                   ` Andreas Färber
2013-11-29  8:56                 ` Li Guang
2013-11-29  9:11                   ` Peter Maydell
2013-11-29  8:41               ` Bamvor Jian Zhang
2013-11-29  9:01                 ` Li Guang
2013-11-29 13:04               ` Andreas Färber
2013-12-01 11:48                 ` Peter Crosthwaite
2013-12-02  4:30                 ` Li Guang
2013-11-26  7:22 ` [Qemu-devel] [PATCH v4 4/4] MAINTAINERS: add myself to maintain sunxi machine liguang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5297E3F1.4060200@cn.fujitsu.com \
    --to=lig.fnst@cn.fujitsu.com \
    --cc=BJZhang@suse.com \
    --cc=afaerber@suse.de \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).