From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26649 invoked by alias); 18 Feb 2015 16:53:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 26636 invoked by uid 89); 18 Feb 2015 16:53:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 18 Feb 2015 16:53:28 +0000 Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id D62B4340896; Wed, 18 Feb 2015 16:53:25 +0000 (UTC) Date: Wed, 18 Feb 2015 16:53:00 -0000 From: Mike Frysinger To: Jiri Gaisler Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 03/23] sim/erc32: Perform pseudo-init of system if binary starts from non-zero address. Message-ID: <20150218165325.GT544@vapier> Mail-Followup-To: Jiri Gaisler , gdb-patches@sourceware.org References: <1424159099-5148-1-git-send-email-jiri@gaisler.se> <1424159099-5148-4-git-send-email-jiri@gaisler.se> <20150217085931.GI20008@vapier> <54E4A45E.9050606@gaisler.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CMEQapY8OuP5ao1l" Content-Disposition: inline In-Reply-To: <54E4A45E.9050606@gaisler.se> X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00487.txt.bz2 --CMEQapY8OuP5ao1l Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1410 On 18 Feb 2015 15:40, Jiri Gaisler wrote: > On 02/17/2015 09:59 AM, Mike Frysinger wrote: > > On 17 Feb 2015 08:44, Jiri Gaisler wrote: > >> +extern struct pstate sregs; > >> + > >> +void > >> +boot_init () > >=20 > > also looks like this is missing an update to a header to add the protot= ype ? >=20 > This is done in patch (17/23). ok, but patches things really should be standalone. although your series is pretty good already in terms of splitting things apart. > >> +{ > >> + mec_write(MEC_WCR, 0); /* zero waitstates */ > >> + mec_write(MEC_TRAPD, 0); /* turn off watch-dog */ > >> + mec_write(MEC_RTC_SCALER, sregs.freq-1); /* generate 1 MHz RTC ti= ck */ > >> + mec_write(MEC_MEMCFG, (3 << 18) | (4 << 10)); /* 1 MB ROM, 4 MB R= AM */ > >> + sregs.wim =3D 2; > >> + sregs.psr =3D 0x110010e0; > >> + sregs.r[30] =3D RAM_END; > >> + sregs.r[14] =3D sregs.r[30] - 96*4; > >> + mec_mcr |=3D 1; /* power-down enabled */ > >> +} > >=20 > > why isn't sregs passed in as an arg ? looks like both callers have a p= ointer to=20 > > it already. >=20 > I am saving this for next major update - SMP support. All globals will th= en > be removed and the full cpu state will be in a struct that is passed to t= he > simulation engine. In this way I can simulate multiple cpu's. can't this particular bit be done already ? or is the global pointer diff = from the local one ? -mike --CMEQapY8OuP5ao1l Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJU5MOFAAoJEEFjO5/oN/WBkyAP/3BfY8NEjfsWKwuimSDdwQ2y Pj7TNiVMCGVUEVr9Ab5YCdwmELP4U+R8aIQbTn0Y6KjrjZCY1f7t243DVTy2NeNx 608ve5jlLCE1hTj4Mp+KhsJjFdjkU75Rr/rjtD5ZoMZFNTulOgbzQb7AnFj12n4J DCsyuh3jOnl1EPMY6XxeHWkmZCH9W7C2hz9VF5dUBNZzTUR0S0Idj5tY+hXFTR1U on9qz5jlZiTAXSSCIMvPP3WFGsChlvUANhTlErFaZNRWBfpN8DifzE64mIBxZ8hk eby2vRQREWj/LBQdHKbeC/Cdx5foKyBTnSkBjD+oHKh3qVQOWdQ2klhw342rPJDA URLO6aNRJCz93l8a12SU4SiF1IJT/u6OYvKQMmNMIV0VPQ6ydnoShAKBFnooEw9n 8V+PvVhHZmfDKezJNLH00TPFIJgbPikx+eN8kN+FuK5/88Jg4dPnJU0P2XaIxN8L F8Ony+Y4lWavprO8RitV1i48TjhqeTByzmVHFpK6oF++sQr2RBOU7l/2m0GzLiSh STUbDy5JgsS/vXUURNv2VJ2GaPTjs2DWEEbo0rsEVhjPLChjj6FdtRn3rJPsEvzZ Xjq7IAWlg7VfJX67TWm5iHklgsMs1xMfFMuxG1FQ95E618SUWWVEq6hW/Nk3iLVZ ek8cwNzlUxfnPf1U2sC1 =MN3q -----END PGP SIGNATURE----- --CMEQapY8OuP5ao1l--