From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28853 invoked by alias); 22 Feb 2015 04:17:39 -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 28837 invoked by uid 89); 22 Feb 2015 04:17:37 -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; Sun, 22 Feb 2015 04:17:36 +0000 Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 268293409A4; Sun, 22 Feb 2015 04:17:34 +0000 (UTC) Date: Sun, 22 Feb 2015 04:17:00 -0000 From: Mike Frysinger To: Jiri Gaisler Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2 03/22] sim/erc32: Perform pseudo-init if binary linked to non-zero address. Message-ID: <20150222041734.GF8744@vapier> Mail-Followup-To: Jiri Gaisler , gdb-patches@sourceware.org References: <1424385100-15397-1-git-send-email-jiri@gaisler.se> <1424385100-15397-4-git-send-email-jiri@gaisler.se> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9Iq5ULCa7nGtWwZS" Content-Disposition: inline In-Reply-To: <1424385100-15397-4-git-send-email-jiri@gaisler.se> X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg00619.txt.bz2 --9Iq5ULCa7nGtWwZS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 919 On 19 Feb 2015 23:31, Jiri Gaisler wrote: > Binaries produced by most erc32 tool-chains do not include > system initialization. sis will detect this and initialize > necessary registers for memory and timer control. >=20 > * erc32.c (mec_read) allow simulator memory size to be read > by application. (boot_init) initialize memory and timers if > start address is not 0. >=20 > * erc32,c (exe_cmd) call boot_init if start address not 0 > * interf.c (run_sim) Likewise same comments, but there's also a typo here -- "func.c" instead of the seco= nd=20 "erc32.c" > --- a/sim/erc32/interf.c > +++ b/sim/erc32/interf.c > @@ -78,6 +78,7 @@ run_sim(sregs, icount, dis) > init_stdio(); > sregs->starttime =3D time(NULL); > irq =3D 0; > + if ((sregs->pc !=3D 0) && (ebase.simtime =3D=3D 0)) boot_init(); > while (!sregs->err_mode & (icount > 0)) { this needs unwrapping too. fixed it & pushed. -mike --9Iq5ULCa7nGtWwZS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJU6VheAAoJEEFjO5/oN/WB+EAP/AtJSNYpJG8kZBOc34KeytwJ L3xRAEWfvgmAMfCndy5AEtYE43rxMkUM3+nT8qX4Qe3NjqDtKOyLeHqTgO/3Ygpb uXyNRgq3FSqaRJtN+8lFLBZCOEcykHsDCHZ+0RElyZq4tMQBA0FqtGbkxbHLdlkd hdUQbIt4U4qzZaZ/yiZHgXp3MSrPU9vyWr+4mjmbzoCrNrY2aamFUV2wL0lJEVhF s3ijBq5Nt4YxAMD1Ko0LU5KFqxJ6QCNc0e7sILOSgCKi+DqPVObIhjvhmZXvies2 tSgMI/PZmWxDH2GObtdjCwzHty2WcKO8onHxi5Nb5Zxhyuy1JjFtmC7bHvaZMGh/ y/Rh/G+UAQuA5CGVOAYBppJFNi+ZXiAr7wO9gFEz1bjdb3Agb4wQofcmWiahIjlp dIKSpV74V1qjrh7+K5oEaaD+RxSe9pTJtqo8Ec0/5ywZr6IU3flJUPKtBv8MJhVr ABTyR2+p53Bqy/sjm1bLmZSZFTFbKElcWSGUyuxOp1PlF9wizyGnfVgA05/lTbmt meNLz3xDz4/YUYHBk+rGQC3sRPh/WGxYN5V/kDKysE60b4f8B3mhbsOGx0ok0P3N hV825hnNwbhJm07OVUC8wjGWIn4e/8CSjnwSBiesX21KAY3966VXhyH6/IKzem02 NfSdj36h2r+nCtCRcTZK =BzqY -----END PGP SIGNATURE----- --9Iq5ULCa7nGtWwZS--