From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4529 invoked by alias); 23 Aug 2012 01:12:02 -0000 Received: (qmail 4517 invoked by uid 22791); 23 Aug 2012 01:12:01 -0000 X-SWARE-Spam-Status: No, hits=-8.7 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Aug 2012 01:11:37 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 3FB2733DE67; Thu, 23 Aug 2012 01:11:36 +0000 (UTC) From: Mike Frysinger To: DJ Delorie Subject: Re: is sim/common documented anywhere? Date: Thu, 23 Aug 2012 01:12:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.5.0; KDE/4.6.5; x86_64; ; ) Cc: gdb@sourceware.org References: <201208222258.q7MMw5Gw016471@greed.delorie.com> <201208221923.15833.vapier@gentoo.org> <201208222341.q7MNfg9Y017675@greed.delorie.com> In-Reply-To: <201208222341.q7MNfg9Y017675@greed.delorie.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6193990.Q0vjBptxuk"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201208222111.38601.vapier@gentoo.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-08/txt/msg00077.txt.bz2 --nextPart6193990.Q0vjBptxuk Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-length: 1959 On Wednesday 22 August 2012 19:41:42 DJ Delorie wrote: > I've read through the comments and README. Mostly what's missing is > some guide to help tell people where to begin, what parts to worry > about, and WHY you'd use any given piece. yes, some of the fundamental pieces explaining how it all comes together is= =20 missing > Example: how do I set up the chip's RAM/ROM regions?=20 you use sim_core_attach to attach memory regions. the mapmask allows you t= o=20 set different permissions on it. be aware that the sim currently has an is= sue=20 when used in conjunction with gdb -- the read/write bits not only lock out = the=20 simulated code from accessing the region, but gdb too :(. so you can't setup something like executable-only memory by specifying=20 access_exec as then when you try to use `x` or `dis` from gdb, you'd get ba= ck=20 an error -- the memory may not be read. similarly, if you were to try to u= se=20 `load` to load an executable with custom contents into that region you'd ag= ain=20 get denied -- gdb is not allowed to write to it. i mentioned this a while ago seeking ideas, but didn't get any response. > Do I want them to be user-configurable? yes. the idea of the sim is two fold: provide simulation of the ISA with n= o=20 SoC related details (peripherals/memory regions/etc...), and then t optiona= lly=20 provide support for common SoCs. > If so, what's the best way to manage them? check out sim-model.c. this lets you specify --model on the command line t= o=20 select different SoCs. this sets up CPU_MODEL (cpu) which you can then par= se=20 in the early init phases of the sim (sim_open) to attach an appropriate set= of=20 memory regions based on the model. you can also use SIM_AC_OPTION_DEFAULT_MODEL() in your configure.ac to sele= ct=20 the default model for the sim if you want one. if you have different ISAs to select between, you probably want to use -- architecture for that. HTH -mike --nextPart6193990.Q0vjBptxuk Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJQNYNKAAoJEEFjO5/oN/WBKBsP/2zZhnJXkhYfbg/HM0HZnHAD UvyzuyySbDFTpB47O75qH4sGa4LhiWG4yzSs54LJEPi9j0JUeobLAQ0Nej0h7JUx OoOfv2Nj1u2CpyIrru8/GPcgPTKWDYH02i/wMNbct71rJxIVrAL+lhWWHHCJQuJm 5p0EwqwBWrKRB3yvNK5ntqGHwM7jGgT0cjF33q58kKpnpZuZtkUMo5Yh8GXoM6RA H6+tTZrRO6pbtuVbwa9NOzid8TwoHBTl/eVZg89IHE0FSpnRi2JtD+78Vl68lCAq gnfO8f+Gf9/c6BDM+atoITn2JDF8y+HTkWLrTS3mjXBakmWjT19xx3PuilCN5tIh iPOYqls3Y0Np0rGLpE9FoxRQcUVxNhzbbhncHu5gzxDN0dXuY4xrxTbR/h6svuwb 5B4Szd08Bi0yOwCR4Wb37FhhmuAeHfl2kiaLCGng2jQcQ5oj4ctQUmnXZlYoMGzj KvYQGaFoVUY8b3km0YH+N/jTmuyvfsFpmMOUEanshekWquKubiZSW8ATdGhM5jmX ifA/uPcdMIYhLG5W6PVNzRnxnepiCpzH9oWCYRmuj7gXwRdywfwN2L9lzUeR0BLe sXAOZiy2mB3IXjlRH/udYIu98CAsT1qh+N71uuxgvDc0FdWBGdG42uxOjyO7r2PO PCCM5BwyNrwySRBOD8Rm =J0mZ -----END PGP SIGNATURE----- --nextPart6193990.Q0vjBptxuk--