From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44726 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrtF8-0004nb-TK for qemu-devel@nongnu.org; Tue, 22 Feb 2011 09:29:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrtEG-0004uJ-Jc for qemu-devel@nongnu.org; Tue, 22 Feb 2011 09:28:41 -0500 Received: from nenya.ms.mff.cuni.cz ([195.113.20.55]:50886 helo=d3s.mff.cuni.cz) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrtEG-0004tH-BB for qemu-devel@nongnu.org; Tue, 22 Feb 2011 09:28:40 -0500 Received: from vpn-ksi-dsrg.ms.mff.cuni.cz ([195.113.20.92] helo=[10.10.16.192]) by d3s.mff.cuni.cz with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72) (envelope-from ) id 1PrtED-0004vl-II for qemu-devel@nongnu.org; Tue, 22 Feb 2011 15:28:37 +0100 Message-ID: <4D63C816.7080809@d3s.mff.cuni.cz> Date: Tue, 22 Feb 2011 15:28:38 +0100 From: Tomas Bures MIME-Version: 1.0 Subject: Re: [Qemu-devel] General IO ports in pc386 References: <4D62F5A1.8040304@d3s.mff.cuni.cz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Thank you. This is exactly what I was looking for. I've created the device, added the compilation of it to Makefile.target . Now, I'm wondering how to persuade QEMU to initialize it? I've registered it using the code below. The registration executes during QEMU launch, the the initialization doesn't. Please where should I add it? static void ers_io_register_devices(void) { isa_qdev_register(&ers_io_info); ers_io_debug("\n"); } device_init(ers_io_register_devices); Thank you, best regards, Tomas On 22.2.2011 9:48, Markus Armbruster wrote: > Tomas Bures writes: > >> Dear all, >> >> I'm preparing a class on embedded systems. I would like to make a >> client that interfaces with QEMU and the application running inside >> it. This client would simulate the physical environment that the >> application running inside QEMU should control. To achieve this, I >> would like to introduce use general IO ports (in a similar way they >> are used e.g. on ARMs). Please is there a simple way to emulate the >> general IO ports on pc386? >> >> If not, what would be the simplest way to create (i.e. develop) a new >> device for QEMU? Is there any intro or some simple device, which could >> be taken as a stub? > If you crusty old ISA is okay for you, the ib700 watchdog device > (hw/wdt_ib700.c) is really simple. For PCI, maybe try the i6300esb > watchdog (hw/wdt_i6300esb.c). > -- Tomas Bures, Ph.D. Assistant Professor Department of Distributed and Dependable Systems Charles University Malostranske nam.25 11800 Prague 1, Czech Republic http://dsrg.mff.cuni.cz Phone: (+420) 2 2191 4236 Fax: (+420) 2 2191 4323