Re: [Gems-users] How can I handle non-contiguous physical address?


Date: Sat, 4 Jul 2009 09:18:18 -0500
From: Dan Gibson <degibson@xxxxxxxx>
Subject: Re: [Gems-users] How can I handle non-contiguous physical address?
Thanks for posting the fix.

On Fri, Jul 3, 2009 at 7:03 PM, Jae W. Lee <leejw@xxxxxxxxxxxxx> wrote:
I've fixed the problem. CONTIGUOUS_ADDRESSES flag is made work with
the following patch in *Simics 3.0* (I haven't tried with Simics 2.2):

@@ -72,8 +72,12 @@
   * Ask Simics for the maps
   */
  conf_object_t *phys_mem;
+#ifdef SIMICS30
+  phys_mem = SIM_get_object("phys_mem");
+#else
  phys_mem = SIM_get_object("phys_mem0");
-
+#endif
+
  attr_value_t map = SIM_get_attribute( phys_mem, "map" );
  if(map.kind!=Sim_Val_List) {
    ERROR_MSG("Danger, Will Robinson! Physical Memory Object Map is
not a list??? \n");

@@ -163,7 +167,12 @@
 uint64 ContiguousAddressTranslator::TranslateRubyToSimics( uint64
addr ) const {
  uint64 translated = 0;
  for(int i=0;i<m_nNumMaps-1;i++) {
+#ifdef SIMICS30
+    if( addr >= m_offsets[i] &&
+      addr < m_offsets[i] + m_sizes[i] ) {
+#else
    if( addr < m_offsets[i] ) {
+#endif
      translated = addr + m_translations[i];
      break;
    }


The problem was caused by a object name mismatch between Simics 2.2
and 3.0. A bug in an address translation function has been fixed as
well.

-- Jae



On Tue, Jun 30, 2009 at 8:42 PM, Jae W. Lee<leejw@xxxxxxxxxxxxx> wrote:
> Hi there,
>
> There were several posts related to this issue, but I cannot find a
> conclusive answer.
>
> I'm simulating 16-core CMP with 1 GB memory (with
> MSI_MOSI_CMP_directory protocol). I've found that the physical memory
> space in Solaris 10 is non-contiguous as follows:
>
> simics> phys_mem.map
> base               object               fn offs               length
> 0x0000000000000000 memory                0 0x0
> 0x10000000         /* 1st 256 MB */
> 0x0000000800000000 memory                0 0x10000000
> 0x10000000  /* 2nd 256 MB */
> 0x0000001000000000 memory                0 0x20000000
> 0x10000000  /* 3rd 256 MB */
> 0x0000001800000000 memory                0 0x30000000
> 0x10000000  /* 4th 256 MB */
> 0x000007fff07ffff0 simicsfs              0 0x0                0x10
> simics>
>
> To fix the problem, I enabled the "CONTIGUOUS_ADDRESSES" flag in
> ruby/Makefile and recompiled Ruby. When I tried to load and set up
> Ruby, I hit upon a seg fault as follows:
>
> simics> ruby0.init
>
> [[[ SKIPPED ]]]
>
> Turning I-STC off and flushing old data
> Turning D-STC off and flushing old data
> The switch time will change to 1 cycles (for CPU-0) once all
> processors have synchronized.
> successful installation of the ruby timing model.
> Ruby Timing Mode
> Warning: optimizations not enabled.
> Creating event queue...
> Creating event queue done
> Creating system...
>  Processors: 16
> Creating system done
> Establishing Contiguous Address Space Mappings...Segmentation fault
> (SIGSEGV) in main thread
> The simulation state has been corrupted. Simulation cannot continue.
> Please restart Simics.
>
> simics>
>
>
> My version of Ruby works fine without the CONTIGUOUS_ADDRESSES flag.
> Is this flag supported by GEMS 2.1? Or is there another way to get
> around the problem?
>
> Thanks,
> Jae
>
_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.




--
http://www.cs.wisc.edu/~gibson [esc]:wq!
[← Prev in Thread] Current Thread [Next in Thread→]