qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Writing a CAN driver for QEMU


From: Andreas Färber
Subject: Re: [Qemu-devel] Writing a CAN driver for QEMU
Date: Sun, 19 May 2013 20:23:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

Am 18.05.2013 20:24, schrieb Rempel, Cynthia:
>>> The RTEMS development community is considering having a Google Summer
>>> of Code student test LinCAN on a simulated RTEMS target board using
>>> QEMU, and have some questions:
>>>
>>> 1. What guidelines should the student follow when writing the device > 
>>> simulation, so the device simulation will be "upstreamed"/accepted by
>>> the QEMU project?
>>> 2. Is there additional documentation on how to write a device
>>> simulation?
> 
>> Unfortunately there is not much documentation.
> 
> Would following the guidance in:
> http://lists.gnu.org/archive/html/qemu-devel/2011-07/msg00842.html
> increase the probability the device simulation would be committed to qemu?

Unfortunately that is out of date as far as the code goes (QOM is our
successor to qdev), but it might serve as a good starting point.
I emailed you my KVM Forum slides on QOM with a device skeleton to use
as a starting point.

One point I would like to point out is that QEMU devices don't simulate
their hardware counterpart but instead only emulate them - that is, if
you implement, e.g., a Freescale MPC5604B FlexCAN or Renesas RX62N RCAN
controller you will deal with register accesses coming from the guest
and their abstract concepts like mailboxes and objects rather than
actual line-encodings. So if you want, you might get around some of the
gory details by implementing the device using an abstract CANBus bus
implementation (cf. PCIBus, I2CBus, etc.) and if necessary interfacing
with whatever CAN API on the host directly; if you need to externalize
this through a -chardev command line option for analysis, it probably
requires some more work.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]