Hey List,
I am running Full system X86 and the bigger picture is to integrate
accelerators (or co-processors) in gem5. I think starting with adding
devices will be a good starting point.
I have added a device "Hello device" in the system (similar to procedure
listed in ASPLOS tutorial). Since, SouthBridge.py assigns address to the
devices which are connected to the south bridge, so I have added these
lines in SouthBridge.py
========================================
_hello = HelloDevice(pio_addr=x86IOAddress(0x84))
hello = Param.HelloDevice(_hello,"test device")
....................................................................................
self.hello.pio = bus.master
========================================
But I can see that the device is connected to the system in
m5out/config.ini.
=========================================
[system.pc.south_bridge]
type=SouthBridge
children=cmos dma1 *hello* ide int_lines0 int_lines1 int_lines2
int_lines3 int_lines4 int_lines5 int_lines6 io_apic keyboard pic1 pic2
pit speaker
cmos=system.pc.south_bridge.cmos
dma1=system.pc.south_bridge.dma1
*hello=system.pc.south_bridge.hello*
io_apic=system.pc.south_bridge.io_apic
keyboard=system.pc.south_bridge.keyboard
pic1=system.pc.south_bridge.pic1
pic2=system.pc.south_bridge.pic2
pit=system.pc.south_bridge.pit
platform=system.pc
speaker=system.pc.south_bridge.speaker
...................................................................................
*[system.pc.south_bridge.hello]*
type=HelloDevice
clock=1
pio_addr=9223372036854775940
pio_latency=100000
system=system
pio=system.iobus.master[11]
=========================================
So my question is, how am I suppose to access this device (either at
boot time or as a user). The ASPLOS tutorial mentioned about making some
changes in the ALPHA console for accessing device address at boot time,
do I have to make similar changes in linux kernel ?? Also in the
documentation, it is mentioned about 'BadDevice' which panics on an
access; I am not sure who to access that device either.
Similar questions were asked couple of times in the past but they were
not answered.
http://www.mail-archive.com/gem5-users@gem5.org/msg02222.html
The above post asked about the following code but it gives a segfault on
running it.
========================================
int main(){
volatile int *ptr = (int *) 0x8000000000000084; //device address
*ptr=10;
printf("Device accessed (Value:%d)\n", *ptr);
return 0;
}
========================================
Any help/pointers in this regard will be appreciated.
Thanks
Shoaib
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users