Received: from eggs.gnu.org ([2001:4830:134:3::10]:37095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoJkh-0003Zp-0v for qemu-devel@nongnu.org; Wed, 04 Dec 2013 16:13:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoJkb-0001W8-Gk for qemu-devel@nongnu.org; Wed, 04 Dec 2013 16:12:58 -0500 Received: from mail-la0-x232.google.com ([2a00:1450:4010:c03::232]:54792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoJkb-0001W0-9J for qemu-devel@nongnu.org; Wed, 04 Dec 2013 16:12:53 -0500 Received: by mail-la0-f50.google.com with SMTP id el20so9934086lab.37 for ; Wed, 04 Dec 2013 13:12:52 -0800 (PST) Date: Thu, 5 Dec 2013 01:20:12 +0400 From: Antony Pavlov Message-Id: <20131205012012.9525291b4909770920572ea2@gmail.com> In-Reply-To: References: <1378537467-13471-1-git-send-email-antonynpavlov@gmail.com> <1378537467-13471-3-git-send-email-antonynpavlov@gmail.com> <526031BD.9030204@g3gg0.de> <20131205002254.8c3dd729857f3c9e2236f4c3@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC v5 2/5] hw/arm/digic: prepare DIGIC-based boards support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Alex Dumitrache , Peter Crosthwaite , Giovanni Condello , g3gg0 , QEMU Developers , Georg Hofstetter , Paul Brook , Paolo Bonzini , Andreas =?ISO-8859-1?Q?F=E4rber?= On Wed, 4 Dec 2013 20:29:05 +0000 Peter Maydell wrote: > On 4 December 2013 20:22, Antony Pavlov wrote: > > Here is my proposition: > > > > 1. qemu board code setup CPU to start from 0xFFFF0000. (0xffff0000 is a= ROM address > > on DIGIC chips) >=20 > Sort of. What we need is: > 1a. Add a "hivecs" property to the ARM CPU object (which > just sets env->cp15.c1_sys bit 13) >=20 > (this is about half a dozen lines of code max) >=20 > 1b DIGIC board init code creates the CPU and sets the hivecs property on= it >=20 > (another handful of lines of code) Ok, I'll try to make the work at the weekend. > > 2. we need somehow put a 'jump-to-beginning-of-ROM' instruction to 0xff= ff0000. > > (We can't put barebox to 0xffff0000 as barebox image is bigger that 64K= .) > > > > There is at least two possibilities to do so: > > * we can use specially prepared ROM image; > > * qemu board code can insert by itself a 'jump-to-beginning-of-ROM' in= struction > > after loading ROM image (as qemu MIPS Malta board code does). >=20 > The board code should definitely not be writing random instructions into > memory. You need to provide a ROM image which will do the work. >=20 > > 3. CPU starts as usual. Branching to barebox code in ROM happends in a = natural way! >=20 > This bit's OK :-) >=20 > thanks > -- PMM --=20 --=A0 Best regards, =A0 Antony Pavlov