All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] List of files containing devices which have not been QOMified
Date: Mon, 12 Nov 2018 10:57:48 +0000	[thread overview]
Message-ID: <CAFEAcA-GqB-ZsFW2x+_j6XaaHY7L4m+2gSrD2JRQ7PJ2VANoYg@mail.gmail.com> (raw)
In-Reply-To: <a92fc500-6c7c-d995-744d-cf7e36d76e0b@ilande.co.uk>

On 10 November 2018 at 15:20, Mark Cave-Ayland
<mark.cave-ayland@ilande.co.uk> wrote:
> On 09/11/2018 10:31, Peter Maydell wrote:
>> I think the code I saw that looked like a non-QOMified
>> device was cpu_timer_create().

> Ah okay. The above timers are certainly internal CPU timers rather than external, so
> should they still be QOMified? How are timers modelled for other CPUs?

So, a couple of caveats first:
 * I haven't really looked at the sparc code
 * as I mentioned elsewhere in this thread, I'm not sure this is
   necessarily our most-important cleanup/refactoring

There are a couple of "QOM-style" ways I know of to do cpu timers:

(1) the Arm Cortex-A9/A15 have some timers that are part of the cpu
in the sense that they're always there in hardware, but they're just
memory-mapped devices at a known address. We model these as
the usual sort of standalone QOM device, with a convenience
container object in hw/cpu/ that instantiates the various devices
and wires things up.

(2) the newer Arm "generic timers" are more closely coupled to the
CPU, because they're programmed via system registers. These we
actually model as part of the CPU object itself, with the code all
in target/arm. The CPU object then exposes outbound GPIO lines
which are the interrupt signals for the timers, and which the board
or SoC code wires up to the interrupt controller.

So it depends on how closely coupled the sparc cpu timers are to
the cpu, I think.

thanks
-- PMM

  reply	other threads:[~2018-11-12 10:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 18:43 [Qemu-devel] List of files containing devices which have not been QOMified Peter Maydell
2018-11-06 19:16 ` Philippe Mathieu-Daudé
2018-11-06 23:06   ` Peter Maydell
2018-11-07 15:22     ` Philippe Mathieu-Daudé
2018-11-06 19:43 ` Paolo Bonzini
2018-11-06 19:46 ` Paolo Bonzini
2018-11-06 19:51   ` Alistair Francis
2018-11-06 21:23   ` John Snow
2018-11-06 21:26     ` Paolo Bonzini
2018-11-06 23:05   ` Peter Maydell
2018-11-06 23:09     ` Paolo Bonzini
2018-11-07 18:53 ` Palmer Dabbelt
2018-11-09 10:17 ` Mark Cave-Ayland
2018-11-09 10:31   ` Peter Maydell
2018-11-10 15:20     ` Mark Cave-Ayland
2018-11-12 10:57       ` Peter Maydell [this message]
2018-11-09 11:17 ` Gerd Hoffmann
2018-11-09 11:29   ` Gerd Hoffmann
2018-11-09 12:39     ` Thomas Huth
2018-11-09 12:44       ` Peter Maydell
2018-11-09 13:16       ` Paolo Bonzini
2018-11-09 14:03         ` [Qemu-devel] deprecating/removing bluetooth (was: Re: List of files containing devices which have not been QOMified) Gerd Hoffmann
2018-11-12  8:51         ` [Qemu-devel] List of files containing devices which have not been QOMified Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFEAcA-GqB-ZsFW2x+_j6XaaHY7L4m+2gSrD2JRQ7PJ2VANoYg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.