All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Keeping a secondary CPU in reset
@ 2012-07-17 15:46 Thierry Reding
  2012-07-19 14:32 ` Andreas Färber
  0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2012-07-17 15:46 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]

Hi,

I've been toying around with adding NVIDIA Tegra support to QEMU. While
adding SMP support I came across a problem: on Tegra, the secondary CPU
is kept in reset by the clock-and-reset controller (CRC). When bringing
up the secondary CPU, the OS writes a given register in the CRC to
release the CPU, after which it starts running. Other hardware blocks
can also be reset by writing other registers in the CRC.

QEMU however seems to assume that all CPUs can immediately be run, so I
solved this by providing some SMP boot code that basically just executes
the wfi (wait for interrupt) instruction and raise an interrupt after
the CRC register has been written to emulate this behaviour. This is at
best kludgy, so I wonder if QEMU provides functionality that I could use
to model this properly. I didn't find any, so I wonder if it might be a
good idea to add some kind of generic reset framework.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [Qemu-devel] Keeping a secondary CPU in reset
@ 2012-07-17  5:15 Thierry Reding
  0 siblings, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2012-07-17  5:15 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 912 bytes --]

Hi,

I've been toying around with adding NVIDIA Tegra support to QEMU. While
adding SMP support I came across a problem: on Tegra, the secondary CPU
is kept in reset by the clock-and-reset controller (CRC). When bringing
up the secondary CPU, the OS writes a given register in the CRC to
release the CPU, after which it starts running. Other hardware blocks
can also be reset by writing other registers in the CRC.

QEMU however seems to assume that all CPUs can immediately be run, so I
solved this by providing some SMP boot code that basically just executes
the wfi (wait for interrupt) instruction and raise an interrupt after
the CRC register has been written to emulate this behaviour. This is at
best kludgy, so I wonder if QEMU provides functionality that I could use
to model this properly. I didn't find any, so I wonder if it might be a
good idea to add some kind of generic reset framework.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-07-19 14:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-17 15:46 [Qemu-devel] Keeping a secondary CPU in reset Thierry Reding
2012-07-19 14:32 ` Andreas Färber
  -- strict thread matches above, loose matches on Subject: below --
2012-07-17  5:15 Thierry Reding

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.