From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xc9uR-0002KU-Uj for qemu-devel@nongnu.org; Thu, 09 Oct 2014 05:21:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xc9uO-0000Mx-00 for qemu-devel@nongnu.org; Thu, 09 Oct 2014 05:21:19 -0400 Received: from mel.v6.act-europe.fr ([2a02:2ab8:224:1::a0a:d2]:60815 helo=smtp.eu.adacore.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xc9uN-0000LV-Qe for qemu-devel@nongnu.org; Thu, 09 Oct 2014 05:21:15 -0400 Message-ID: <5436538A.8030801@adacore.com> Date: Thu, 09 Oct 2014 11:21:14 +0200 From: Fabien Chouteau MIME-Version: 1.0 References: <1412777966-28286-1-git-send-email-chouteau@adacore.com> <54355A7C.8060007@suse.de> <543593E5.5060503@gaisler.se> In-Reply-To: <543593E5.5060503@gaisler.se> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH][SPARC] LEON3: Add emulation of AMBA plug&play List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jiri Gaisler , =?ISO-8859-15?Q?Andreas_F=E4rber?= , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk On 10/08/2014 09:43 PM, Jiri Gaisler wrote: > On 10/08/2014 05:38 PM, Andreas F=E4rber wrote: >> Hi, >> >> Am 08.10.2014 um 16:19 schrieb Fabien Chouteau: >>> From: Jiri Gaisler >>> >>> AMBA plug&play is used by kernels to probe available devices (Timers, >>> UART, etc...). This is a static declaration of devices implemented in >>> QEMU. In the future, a more advanced version could compute those >>> information directly from the device tree. >> >> Interesting. There's quite some magic numbers in the read functions; I >> wonder if you could read them via QOM if you actually give the devices= a >> canonical path or search by type? You may want to peek at ACPI code. >=20 >=20 > The plug&play area is similar in function to the PCI configuration > space, indicating vendor/device ID's, address range, interrupt number > etc. of on-chip IP cores. The 'magic' numbers could be generated by > generic functions taking these parameters as inputs. This would > certainly make the code more readable, and easily extended in the > future. Would such a solution be acceptable? >=20 >=20 That would be a great improvement, then we could try to plug it with the QOM API to generate automatically the data.