Received: from eggs.gnu.org ([2001:4830:134:3::10]:36182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmJlA-0004eT-Up for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:49:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmJl6-0008KW-Nz for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:49:12 -0500 Received: from soto.provo.novell.com ([137.65.250.214]:43728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmJl6-0008KM-Fr for qemu-devel@nongnu.org; Fri, 29 Nov 2013 03:49:08 -0500 Message-Id: <5298C57C0200003000077D05@soto.provo.novell.com> Date: Fri, 29 Nov 2013 01:49:00 -0700 From: "Bamvor Jian Zhang" 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: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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: Li Guang , Peter Maydell Cc: Peter Crosthwaite , hpoussin@reactos.org, qemu-devel , afaerber@suse.de Hi,=20 >>>Peter Maydell wrote:=20 > On 29 November 2013 08:06, Li Guang wrote:=20 > > what I design is:=20 > > we have a sunxi series as a machine, then=20 > > for sunx4i, we specify -M sunxi -cpu cortex-a8 -device x1 ...=20 > > for sunx5i, we specify -M sunxi -cpu cortex-a8 -device x2 ...=20 > > for sunx7i, we specify -M sunxi -cpu cortex-a7 -devcie x3 ...=20 > > for cubieboard, we specify -M sunxi -cpu -cortex-a8 -device x1 -device = p1=20 > =20 > No, QEMU doesn't work this way. "-M whatever" specifies a board=20 > model, so in this example it should be "-M cubieboard" and so on.=20 > That then gives you a particular CPU and set of devices. Obviously=20 > where we have several board models that share a single SoC they=20 > share implementation (by instantiating the same SoC object).=20 > If we have several SoCs that share common subcomponents like=20 > a UART, then they share implementation by having all those SoCs=20 > instantiate the same UART object.=20 > =20 > -cpu is really only intended where you have a situation like the=20 > PC where just the CPU can be plugged and unplugged into a=20 > board; it doesn't fit for SoC-based systems.=20 > Similarly, -device is really (currently) for pluggable devices like=20 > ISA or PCI cards -- where the device is a non-removable=20 > part of the SoC it doesn't work.=20 > =20 > As Andreas says, we need to model real actual hardware,=20 > not some abstraction that kind of matches the kernel's=20 > abstractions.=20 > =20 > Is "sunxi" what the hardware is actually called, or only=20 > what the kernel port has been called? More information=20 > about where this name comes from might make it easier=20 > to tell if it is the correct one for the QEMU SoC models.=20 just FYI: in the kernel source code, it usually use the sunxi-axx format, e.g. = sun7i-a20, sun5i-a10s, sun5i-a13... ref: linux/drivers/clk/sunxi/clk-sunxi.c linux/arch/arm/boot/dts/sun*.dts > thanks=20 > -- PMM=20 > =20 > =20