From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16087 invoked by alias); 18 Feb 2015 14:40:40 -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 15594 invoked by uid 89); 18 Feb 2015 14:40:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: bin-vsp-out-05.atm.binero.net Received: from vsp-unauthed01.binero.net (HELO bin-vsp-out-05.atm.binero.net) (195.74.38.225) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 18 Feb 2015 14:40:36 +0000 X-Halon-ID: 2a66d199-b77c-11e4-a613-005056916f53 Authorized-sender: jiri@gaisler.se Received: from [192.168.1.20] (unknown [78.68.173.120]) by bin-vsp-out-05.atm.binero.net (Halon Mail Gateway) with ESMTPA for ; Wed, 18 Feb 2015 15:41:04 +0100 (CET) Message-ID: <54E4A45E.9050606@gaisler.se> Date: Wed, 18 Feb 2015 14:40: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> In-Reply-To: <20150217085931.GI20008@vapier> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="irjRb909Dmicjk7WamxjOOJUbETiwAXOu" X-SW-Source: 2015-02/txt/msg00479.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --irjRb909Dmicjk7WamxjOOJUbETiwAXOu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1146 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 > in C, you need to do (void) to avoid ugliness. Will fix. >=20 > also looks like this is missing an update to a header to add the prototyp= e ? This is done in patch (17/23). >=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 tick= */ >> + mec_write(MEC_MEMCFG, (3 << 18) | (4 << 10)); /* 1 MB ROM, 4 MB RAM= */ >> + 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 poi= nter to=20 > it already. I am saving this for next major update - SMP support. All globals will then 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. Jiri. --irjRb909Dmicjk7WamxjOOJUbETiwAXOu 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/ iQIcBAEBAgAGBQJU5KReAAoJEIAIwBKmO2+baagP/2jNdiPsRp/ZIVCkJDvy3ten 8YWbna56CL8cIYnuRO/Y4umlGz/WxOIM3AsIzFpZkVWjByVqquaVh4d3E1pWpUcL 0dzi8fmGsylTk9WSWMeBj78ViZGe0OxhLbxn34cOri8XApY7bQ4F/lgBB0NChUpA QbubGH+f8bX1rJPIKBObDlccTrJ/5qioeUMAy1R2h6yx4hmwmwwP5FPG3JOCyNa/ U5OZwJwrSqGn1Zg2jOUO3oOe9bsGqhD+z6ye6DxYv2XsXMCptF3izj/0aRNtjRwH HRDTg/EMt6mCatYQveRl177+pOjjsrNdBBSp/MBYCOKNsTRCDWJp7EA1XwLBsgQp s1F2XuugjOMyyj/TEyv/hKudnnqoh5+0k+jlV3fF3mXe5YnRhAZXTYwom0Seubx9 lKzoZ+ETW7LX+RN80Loi/h/TuCrkIBVzrkUHlRfSqtT/ih0HJ/A17ITOBwzuLQXJ 0qfZkmNQql4JXvHzxo2vANxIRtRX5woYq+CyDzUAg3aPxHOHQ3z3r0b8pYPzCnSA aARpYAdEod1O+0fJKTzo//k0Lz93UDwEJo3jD2i6S2qlRv4TnW/hvRYH3j3y+Csq IHIyad+KDYM7JkOTUTZcVNC6lQSeSv1vnj++BHKX4k2PTdKSHAKyvvVWoW7RZOTo rMMBWsu6zPlj/UoWrOKx =NC3c -----END PGP SIGNATURE----- --irjRb909Dmicjk7WamxjOOJUbETiwAXOu--