qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/4] Allow sysbus devices to be attached via commandline
@ 2014-04-11  6:34 Alistair Francis
  2014-04-11  6:34 ` [Qemu-devel] [PATCH v2 1/4] qemu-option.c: Add qemu_opt functions that step over arguments Alistair Francis
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Alistair Francis @ 2014-04-11  6:34 UTC (permalink / raw)
  To: qemu-devel
  Cc: edgar.iglesias, peter.maydell, peter.crosthwaite, eric.auger,
	kim.phillips, agraf, armbru, edgar.iglesias, alistair.francis,
	afaerber

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(-)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-04-11  9:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-11  6:34 [Qemu-devel] [PATCH v2 0/4] Allow sysbus devices to be attached via commandline Alistair Francis
2014-04-11  6:34 ` [Qemu-devel] [PATCH v2 1/4] qemu-option.c: Add qemu_opt functions that step over arguments Alistair Francis
2014-04-11  6:34 ` [Qemu-devel] [PATCH v2 2/4] qdev-monitor: Implement three functions used to connect devices Alistair Francis
2014-04-11  6:34 ` [Qemu-devel] [PATCH v2 3/4] vl.c: Enable adding devices to the system bus Alistair Francis
2014-04-11  7:45   ` Peter Maydell
2014-04-11  6:35 ` [Qemu-devel] [PATCH v2 4/4] qemu-options.hx: Update the command line documentation for -device Alistair Francis
2014-04-11  9:49   ` Peter Crosthwaite
2014-04-11  6:41 ` [Qemu-devel] [PATCH v2 0/4] Allow sysbus devices to be attached via commandline Alistair Francis
2014-04-11  7:55 ` Peter Maydell
2014-04-11  9:09   ` Alexander Graf
2014-04-11  9:13   ` Peter Crosthwaite

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).