Devices don't work in SE mode. In the future they might, but for now
they don't for reasons like what you're seeing.

Gabe

On 09/30/11 16:31, Min Kyu Jeong wrote:
> Hi,
>
> I am trying to get a device working in SE mode. I hacked SConscripts
> here and there, and successed compiling a device that inherits DmaDevice.
>
> The intertance chain looks like
> MyDevice:DmaDevice:PioDevice:MemObject:SimObject
>
> The problem is, the PioDevice.sys (a pointer to the system) is not
> initialized properly (holds 0).
>
> It should be initilazed in the Ctor of PioDevice as:
>
> dev/io_device.cc
>
> PioDevice::PioDevice(const Params *p)
>     : MemObject(p),
> #if FULL_SYSTEM
>     platform(p->platform),
> #endif
>     sys(p->system), pioPort(NULL)
> {}
>
> I gdbed and p->system holds 0 when the Ctor is executed. I guess
> p->system should have been initialized in the following
>
> dev/Device.py
>
> class PioDevice(MemObject):
>     type = 'PioDevice'
>     abstract = True
>     pio = Port("Programmed I/O port")
>     if buildEnv['FULL_SYSTEM']:
>         platform = Param.Platform(Parent.any, "Platform this device is
> part of")
>     system = Param.System(Parent.any, "System this device is part of")
>
>
> Now it is the where python-SWIG magic occurs, so I would appreciate
> any advice how should I proceed debugging from here.
>
> Thanks,
>
> Min
>
>
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to