From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27003 invoked by alias); 19 Feb 2015 16:11:32 -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 26989 invoked by uid 89); 19 Feb 2015 16:11:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: bin-vsp-out-03.atm.binero.net Received: from vsp-authed01.binero.net (HELO bin-vsp-out-03.atm.binero.net) (195.74.38.224) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 19 Feb 2015 16:11:29 +0000 X-Halon-ID: f894ffaa-b851-11e4-9ac0-0050569116f7 Authorized-sender: jiri@gaisler.se Received: from [192.168.1.20] (unknown [78.68.173.120]) by bin-vsp-out-03.atm.binero.net (Halon Mail Gateway) with ESMTPA for ; Thu, 19 Feb 2015 17:11:32 +0100 (CET) Message-ID: <54E60B2D.5020905@gaisler.se> Date: Thu, 19 Feb 2015 16:11:00 -0000 From: Jiri Gaisler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH 03/23] sim/erc32: Perform pseudo-init of system if binary starts from non-zero address. 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> <20150218165325.GT544@vapier> In-Reply-To: <20150218165325.GT544@vapier> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rDfaA4e64CVIJXbpcwWXKjNIj28joavi8" X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00546.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rDfaA4e64CVIJXbpcwWXKjNIj28joavi8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1742 On 02/18/2015 05:53 PM, Mike Frysinger wrote: > 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 () >>> >>> also looks like this is missing an update to a header to add the protot= ype ? >> >> This is done in patch (17/23). >=20 > ok, but patches things really should be standalone. although your series= is > pretty good already in terms of splitting things apart. >=20 >>>> +{ >>>> + 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 */ >>>> +} >>> >>> why isn't sregs passed in as an arg ? looks like both callers have a p= ointer to=20 >>> it already. >> >> I am saving this for next major update - SMP support. All globals will t= hen >> be removed and the full cpu state will be in a struct that is passed to = the >> simulation engine. In this way I can simulate multiple cpu's. >=20 > can't this particular bit be done already ? or is the global pointer dif= f from > the local one ? The global pointer is not different from the local, but since the global is used in so many places it does not seem logical to switch to a local copy j= ust here. That is why I would like to keep this as is and remove all globals in a later patch. Jiri. > -mike >=20 --rDfaA4e64CVIJXbpcwWXKjNIj28joavi8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 884 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJU5gstAAoJEIAIwBKmO2+b1VMQAIrkpMTPEk5wNIsiVRV2eiPH qeqzRJbVi+CXi+ZfedLcWIBP7P/IKEflF74tS0LFTYqF9fekCh1O8W7A7NMBXmmE OZFMNaCfra1siimCtc0bQ+sC7ubZTPpoA/llceV90tyvYTJjTu5YVdm/Nx87hn00 ory8sv1hjhWRwJN/TC4g23YKtxZhgp8CwRG/YesHVb8kIxzcXAdZw7yV7N4MFX// jewT0E7tVbbYGDMsIhuRLI7Szk6JPliur1utvOzsadcjCRjq7veslY9RD80cuKHF oIeRDWZ3voF96E9QbwpZKa3CBw6TZgDfmiQhhIsaTV//U8bwoQdAi9ZcZYBO0+NY V6YpFSIc9g3VNi0L9y8qilEVL1rzDMsUoFuqCwenXpolgI2UVwSo/xj7aMKjs2Nj Vj/p9zRHSu3EDvMZz7Z4NRqQbV4sNVm91bBakmnjlgvOQT5CTYDAT3dxJAHiqWWA aIIZNABow3/Z3A1WIfkMBB5W1Xoq2X8T8ibvxGvAH3jiosHZvMGWP99pjHL2is6y MN6mRwhiCpk95srapJciYEz5oInFeahz5O5Ymyv5QBHG0Oh3xFH4Y/DHbMTCQNiF bcv3SlTJuhIKL6j4lgr/IL0C2Dm1i0yshlySpW9GsFYqZpmbsVXHaw+yNNlhAnKh vpA16p/3wT14AFlt5dg3 =hQ8B -----END PGP SIGNATURE----- --rDfaA4e64CVIJXbpcwWXKjNIj28joavi8--