From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmJtm-0008Ex-4D for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:58:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmJth-0002sH-Ca for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:58:06 -0500 Received: from [222.73.24.84] (port=63970 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmJtg-0002ra-Vg for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:58:01 -0500 Message-ID: <529856AD.20105@cn.fujitsu.com> Date: Fri, 29 Nov 2013 16:56:13 +0800 From: Li Guang MIME-Version: 1.0 References: <1385450531-3170-1-git-send-email-lig.fnst@cn.fujitsu.com> <1385450531-3170-4-git-send-email-lig.fnst@cn.fujitsu.com> <5295B9BD.7080101@suse.de> <5295BB1E.1090600@suse.de> <5297E3F1.4060200@cn.fujitsu.com> <5298098C.1040105@suse.de> <52984B0C.9030209@cn.fujitsu.com> In-Reply-To: Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8; format=flowed Subject: Re: [Qemu-devel] [PATCH v4 3/4] hw/arm: add sunxi machine type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel , Peter Crosthwaite , =?UTF-8?B?SGVydsOpIFBvdXNzaW5lYXU=?= , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Bamvor Jian Zhang Peter Maydell wrote: > On 29 November 2013 08:06, Li Guang wrote: > >> what I design is: >> we have a sunxi series as a machine, then >> for sunx4i, we specify -M sunxi -cpu cortex-a8 -device x1 ... >> for sunx5i, we specify -M sunxi -cpu cortex-a8 -device x2 ... >> for sunx7i, we specify -M sunxi -cpu cortex-a7 -devcie x3 ... >> for cubieboard, we specify -M sunxi -cpu -cortex-a8 -device x1 -device p1 >> > No, QEMU doesn't work this way. "-M whatever" specifies a board > model, so in this example it should be "-M cubieboard" and so on. > That then gives you a particular CPU and set of devices. Obviously > where we have several board models that share a single SoC they > share implementation (by instantiating the same SoC object). > If we have several SoCs that share common subcomponents like > a UART, then they share implementation by having all those SoCs > instantiate the same UART object. > > -cpu is really only intended where you have a situation like the > PC where just the CPU can be plugged and unplugged into a > board; it doesn't fit for SoC-based systems. > Similarly, -device is really (currently) for pluggable devices like > ISA or PCI cards -- where the device is a non-removable > part of the SoC it doesn't work. > why not just say this SoC is a board? and other board like cubieboard are only this SoC + several devices, I think is reasonable, at least in this case. A10 and A13 both have a cortex-a8, different in HDMI and SATA, suppose we modeled A10, A10State, if we add cubieboard, we realize A10, then we have a board called demoboard based on A13, what we will do here? also realize A10? unlucky, we miss HDMI and SATA difference, model A13? new a A13State? but we have most devices the same for A10 & A13. > As Andreas says, we need to model real actual hardware, > not some abstraction that kind of matches the kernel's > abstractions. > I never aimed to do what you said abstraction, I just specified a represented of real hardware. > Is "sunxi" what the hardware is actually called, or only > what the kernel port has been called? More information > about where this name comes from might make it easier > to tell if it is the correct one for the QEMU SoC models. > > > I tried to contact Allwinner's engineer, no response until now. Thanks! Li Guang