Received: from eggs.gnu.org ([208.118.235.92]:54587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr08C-00042j-8T for qemu-devel@nongnu.org; Tue, 17 Jul 2012 01:15:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sr08B-0006yN-Av for qemu-devel@nongnu.org; Tue, 17 Jul 2012 01:15:32 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:54026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr08B-0006tr-1T for qemu-devel@nongnu.org; Tue, 17 Jul 2012 01:15:31 -0400 Received: from localhost (localhost [127.0.0.1]) by mailbox.adnet.avionic-design.de (Postfix) with ESMTP id 0E76C2A2830F for ; Tue, 17 Jul 2012 07:15:28 +0200 (CEST) Received: from mailbox.adnet.avionic-design.de ([127.0.0.1]) by localhost (mailbox.avionic-design.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tviiLpHlYZne for ; Tue, 17 Jul 2012 07:15:26 +0200 (CEST) Received: from localhost (avionic-0098.adnet.avionic-design.de [172.20.31.233]) (Authenticated sender: thierry.reding) by mailbox.adnet.avionic-design.de (Postfix) with ESMTPA id DCE942A28201 for ; Tue, 17 Jul 2012 07:15:26 +0200 (CEST) Date: Tue, 17 Jul 2012 07:15:24 +0200 From: Thierry Reding Message-ID: <20120717051524.GA15116@avionic-0098.mockup.avionic-design.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline Subject: [Qemu-devel] Keeping a secondary CPU in reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIcBAEBAgAGBQJQBPTsAAoJEN0jrNd/PrOhEW0P+gLudZ3o1nGDcY6/yAAa5S+k ySrfRDgqO5Gog0g/G9ZfIThVPQ3zDNcLmK8jIbriVCEf4OPO92pkYGyoqjplsYBA XnaaelSorHVrej7h5/cxGFqSGGIbGstjuoPKCl7UeA9cbkFbKhnnJqHrZHt81VOQ 2OPMOnrf2HAXW9T7NzxATzFbZG24ir+Nxh0yj5dUDyKBajseLDdSOX3FYLNFFLHs 0sgFHJn3VO+/O5ovQpUp5npaH7wPxUmMiLLT/RIOzCoh8CHi5FxpsjW00tl0QHfp YD4aiVYjJ3XZuS8B2fTkNajOLtdGyWx0gzQ4riA4T0EgFj176DrCxJuViFTt7aoO RNZaKndz0IDTvQ9CPQapWhxP6iBsakhj3o4/DenHMupTZnrQqU/cUPW4fW32n3yn VHrpHDIdYEgHvRTuiVaLgc1GButPH0zlqr5ymseMGTNdTq4E9KzZru34gvcVFQEa JlZBwrGm7lep0ZYL8iZUUBXWxNMXNeGlitn2RmZD0qEiWNWh19oge7JUT6r8IZ3u 4BMvnR9zFUyBEN0fU4DQC3MX4trzXsh1ZPuogN4CyBeYOPnObmCKo4DN2/9HDu7H 74mi/62FLB4o11wLC4K2X4a66BsGeuqkdUGBWPLXh6fmDZtdign2MK2pgh0bYIwU rL7TSlHjGl8BkdQXMwzB =w3jr -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk--