From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYVAV-0000k8-QE for qemu-devel@nongnu.org; Fri, 11 Apr 2014 02:42:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYVAU-0001ze-To for qemu-devel@nongnu.org; Fri, 11 Apr 2014 02:42:31 -0400 Received: from mail-ob0-x22a.google.com ([2607:f8b0:4003:c01::22a]:61658) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYVAU-0001zT-OL for qemu-devel@nongnu.org; Fri, 11 Apr 2014 02:42:30 -0400 Received: by mail-ob0-f170.google.com with SMTP id uz6so5595377obc.15 for ; Thu, 10 Apr 2014 23:42:30 -0700 (PDT) MIME-Version: 1.0 Sender: alistair23@gmail.com In-Reply-To: References: From: Alistair Francis Date: Fri, 11 Apr 2014 16:41:59 +1000 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] [PATCH v2 0/4] Allow sysbus devices to be attached via commandline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alistair Francis Cc: Edgar Iglesias , Peter Maydell , Peter Crosthwaite , konstanty@ieee.org, eric.auger@linaro.org, kim.phillips@linaro.org, Markus Armbruster , Alexander Graf , "qemu-devel@nongnu.org Developers" , "Edgar E. Iglesias" , =?ISO-8859-1?Q?Andreas_F=E4rber?= CC Konstanty On Fri, Apr 11, 2014 at 4:34 PM, Alistair Francis wrote: > This patch allows sysbus devices to be attached via > command line arguments. > > This can be used to build an entire machine from the command > line or to just add devices that aren't in the machine_init > code. > > A peripheral can be added with the following syntax: > -device cadence_uart,addr=0xE0000000,irq=27 > > A CPU can be added with either of the following: > -device cpu,model=cortex-a9,type=arm-cpu,reset-cbar=0xF8F00000,midr=0x413 FC090 > -sysbusdev device=cpu,name=microblaze-cp > > RAM or ROM can be attached with this command: > -device memory,name=zynq.ext_ram,addr=0x00000000,size=0x8000000 > > Multiple IRQ lines can be used as well as multiple properties: > -device pl330,addr=0xF8003000,irq=13,irq=14,irq=15,irq=16,irq=17,\ > irq=40,irq=41,irq=42,irq=43,num_chnls=8,num_periph_req=4,num_events=16 > > This implementation uses a three round multi-pass method. This will > hopefully allow devices attached via the command line to be connected > to other command line devices (I haven't managed to get that working > yet though) > > With Li Guang's blob loader implemented it is also possible to boot > images while using "-M none". > > V2: > Use -device to attach the devices (Thanks Markus Armbruster) > Make the method much more generic > Allow CPUs and Memory to be attached via command line > Allow properties to be passed in via the command line > > Thanks to Markus Armbruster and Peter Crosthwaite for > feedback on the first version > > > Alistair Francis (4): > qemu-option.c: Add qemu_opt functions that step over arguments > qdev-monitor: Implement three functions used to connect devices > vl.c: Enable adding devices to the system bus > qemu-options.hx: Update the command line documentation for -device > > include/hw/boards.h | 2 + > include/monitor/qdev.h | 3 + > include/qemu/option.h | 2 + > include/qemu/option_int.h | 1 + > qdev-monitor.c | 237 ++++++++++++++++++++++++++++++++++++++++++++- > qemu-options.hx | 8 +- > util/qemu-option.c | 30 ++++++ > vl.c | 74 +++++++++++++- > 8 files changed, 346 insertions(+), 11 deletions(-) >