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
pgpOS2no7aFsd.pgp
Description: PGP signature