[Gems-users] ruby for x86: to install ruby for multiple memory objects or just one


Date: Wed, 26 Sep 2007 20:35:17 -0400
From: "soohong p kim" <spkim@xxxxxxxxxx>
Subject: [Gems-users] ruby for x86: to install ruby for multiple memory objects or just one
I've been trying to work on ruby-x86-patch for gems1.4 (based on x86-patch
for gems1.1).  My end goal is to use simics 3.x and gems 1.4 to run
x86-target with ruby.

x86-patch seemed to install ruby on all phys_mem objects ("phys_mem%i")
instead of just one, i.e. phys_mem0 or phys_mem, resulting in the following
in ruby.c for ruby-x86-patch for gems1.1:

  for(i=0;i<nProcs;i++) {
    sprintf(memname,"phys_mem%i",i);
    memory = SIM_get_object(memname);
...

Is memory-per-processor assumption true for any x86-based targets?  My
4-processor version of Tango seemed to have just one memory object
(phys_mem0).  And all cpu[0123]_mem objects seem to point to phys_mem0.  And
the above nProc loop seem to cause "load-module ruby" to fail.  

Any help will be greatly appreciated.

Soohong


P.S.  memory-related objects in my checkpoint file...

...
...
OBJECT cpu0_mem TYPE memory-space {
	queue: cpu0
	map: ((0xfee00000, cpu0_apic, 0, 0, 0x4000, NIL, 0, 0, 0))
	default_target: (phys_mem0, 0, 0, phys_mem0)
}
OBJECT cpu1_mem TYPE memory-space {
	queue: cpu0
	map: ((0xfee00000, cpu1_apic, 0, 0, 0x4000, NIL, 0, 0, 0))
	default_target: (phys_mem0, 0, 0, phys_mem0)
}
OBJECT cpu2_mem TYPE memory-space {
	queue: cpu0
	map: ((0xfee00000, cpu2_apic, 0, 0, 0x4000, NIL, 0, 0, 0))
	default_target: (phys_mem0, 0, 0, phys_mem0)
}
OBJECT cpu3_mem TYPE memory-space {
	queue: cpu0
	map: ((0xfee00000, cpu3_apic, 0, 0, 0x4000, NIL, 0, 0, 0))
	default_target: (phys_mem0, 0, 0, phys_mem0)
}
...
...
OBJECT phys_mem0 TYPE memory-space {
	queue: cpu0
	map: ((0, dram0, 0, 0, 0xa0000, dram0, 0, 0, 0),
              (0x100000, ram0, 0, 0x100000, 0xff00000, NIL, 0, 0, 0))
	default_target: (pci_mem0, 0, 0, pci_mem0)

[← Prev in Thread] Current Thread [Next in Thread→]