Run the simulator in GDB and see what happens.

Ali

On May 25, 2011, at 9:23 PM, Digant wrote:

> Hi all,
> I am developing a model for Pl081 Dma controller,
> As in copyengine ,I am using nested classes for controller & channel.
> From channel's private function I try to use dmaPort->dmaAction(...) but when 
> ever I call it Gem5 gives segmentation fault.
> here is the part of the code,
> --------------------------
> from source:
> class channel{
> . 
> .
> .
> private: 
> void dmaRead();
>  void dmaReadDone();
>   EventWrapper<pl081_channel, &pl081_channel::dmaReadDone>
>             dmaReadDoneEvent;
> uint8_t *dmaBuffer;
> dmaBuffer = new uint8_t[channel_regs.reg_DMAC_Chan_Control.transfersize
>                                       * 8];
> int dmasize;
> 
> .
> .
> .
> }
> 
> channel::dmaread(){
> . 
> .
> .
> //single request for 8 bytes 
> startAddr = 0x0x7a00000; // frame buffer
> dmasize=8;
> dmaPort->dmaAction(MemCmd::ReadReq,  startAddr,
>                           dmasize, &dmaReadDoneEvent,  dmaBuffer, 0,
>                   Request::UNCACHEABLE);  
> 
> }
> from config.ini
> [system.realview.dmac]
> type=Pl081
> amba_id=1314945
> gic=system.realview.gic
> int_num=56
> max_backoff_delay=10000000
> min_backoff_delay=4000
> pio_addr=268632064
> pio_latency=10000
> pio_size=4095
> platform=system.realview
> system=system
> dma=system.iobus.port[25]
> pio=system.iobus.port[8]
> --------------------------
> I have checked PL111 as reference and tried to do exactly same with dmasize 
> =8 and same startaddress.
> Even after that also it didn't work.
> Can anybody tell me what can be wrong ??
> I can send you the codes if anybody wants.
> Thank you in advance.
> 
> Regards,
> Digant Desai.
> 
> _______________________________________________
> 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