From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzK0u-0007Hv-JG for qemu-devel@nongnu.org; Mon, 01 Jun 2015 03:20:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzK0p-0001eI-G9 for qemu-devel@nongnu.org; Mon, 01 Jun 2015 03:20:00 -0400 Received: from mail-wg0-x230.google.com ([2a00:1450:400c:c00::230]:35425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzK0p-0001eC-8c for qemu-devel@nongnu.org; Mon, 01 Jun 2015 03:19:55 -0400 Received: by wgme6 with SMTP id e6so106079145wgm.2 for ; Mon, 01 Jun 2015 00:19:53 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <556C078C.1070709@redhat.com> Date: Mon, 01 Jun 2015 09:19:40 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <2816EEF2-0256-4B49-8811-74EFB3016CD4@livius.net> <20150529111118.7f116572@nial.brq.redhat.com> <7A249492-B5F2-46D5-92A2-12BB30202C5F@livius.net> <84953DC4-7936-4C86-B442-BAFB325E540D@livius.net> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] extensions to the -m memory option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liviu Ionescu , Peter Crosthwaite Cc: Peter Maydell , QEMU Developers , Igor Mammedov On 31/05/2015 16:05, Liviu Ionescu wrote: > I followed your advice and I ended up with the following: > > - I added a new type "cortexm-mcu" that I use as parent for all Cortex-M MCU objects (like "STM32F103RB") > > - I added the following properties to this type: > > cortexm-mcu.flash-sizeK=uint32 This should be okay, though more on this below. > cortexm-mcu.ram-sizeK=uint32 This is the same as "-m", thus probably unnecessary, but I understand that the megabyte default unit in -m can be a bit annoying for you. However, there were patches on the list to set a different default for each machine. > cortexm-mcu.cpu-model=str This is the same as "-cpu" > cortexm-mcu.kernel-filename=str This is the same as "-kernel" i.e. "-machine kernel=str". Regarding flash, I'm still curious about some questions I have... 1) who initializes flash contents? 2) can the running program modify flash at run-time? if so, how? and if so, are the writes supposed to stick around from one QEMU invocation to the next? Paolo