All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] General IO ports in pc386
@ 2011-02-21 23:30 Tomas Bures
  2011-02-22  8:48 ` Markus Armbruster
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas Bures @ 2011-02-21 23:30 UTC (permalink / raw)
  To: qemu-devel

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?

Thank you. Best regards,
Tomas

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

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

* Re: [Qemu-devel] General IO ports in pc386
  2011-02-21 23:30 [Qemu-devel] General IO ports in pc386 Tomas Bures
@ 2011-02-22  8:48 ` Markus Armbruster
  2011-02-22 14:28   ` Tomas Bures
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Armbruster @ 2011-02-22  8:48 UTC (permalink / raw)
  To: Tomas Bures; +Cc: qemu-devel

Tomas Bures <bures@d3s.mff.cuni.cz> 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).

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

* Re: [Qemu-devel] General IO ports in pc386
  2011-02-22  8:48 ` Markus Armbruster
@ 2011-02-22 14:28   ` Tomas Bures
  2011-02-23 10:06     ` Markus Armbruster
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas Bures @ 2011-02-22 14:28 UTC (permalink / raw)
  To: qemu-devel

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<bures@d3s.mff.cuni.cz>  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

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

* Re: [Qemu-devel] General IO ports in pc386
  2011-02-22 14:28   ` Tomas Bures
@ 2011-02-23 10:06     ` Markus Armbruster
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2011-02-23 10:06 UTC (permalink / raw)
  To: Tomas Bures; +Cc: qemu-devel

Tomas Bures <bures@d3s.mff.cuni.cz> writes:

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

Try starting with -device NAME, where NAME is whatever you put into
qdev.name.  Your device should then be visible in "info qtree".

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

end of thread, other threads:[~2011-02-23 10:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-21 23:30 [Qemu-devel] General IO ports in pc386 Tomas Bures
2011-02-22  8:48 ` Markus Armbruster
2011-02-22 14:28   ` Tomas Bures
2011-02-23 10:06     ` Markus Armbruster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.