[gem5-users] Re: Porting a configuration file from gem5 v20 to gem5 v21

2021-10-18 Thread Ali Ghandour via gem5-users
Hi Giacomo,



In SE mode, the segmentation fault is triggered

at  line 905 in build/ARM/cpu/o3/cpu.cc.



Following is the code that triggers the interrupt

and the code that is executed in the last two steps before the interrupt.



 gef➤  up

#1  0x55dc2969 in gem5::o3::CPU::trap (this=0x5b7ca000,
fault=std::shared_ptr (use count 2, weak count 0) = {...},
tid=0x0, inst=...) at build/ARM/cpu/o3/cpu.cc:905

*905* fault->invoke(threadContexts[tid], inst);



*void*

*CPU::trap(const Fault , ThreadID tid, const StaticInstPtr )*

*{*

*// Pass the thread's TC into the invoke method.*

*fault->invoke(threadContexts[tid], inst); < line 905*

*}*





 gef➤  up

#2  0x55dae664 in gem5::o3::Commit::commitHead
(this=0x5b7cd8a0, head_inst=..., inst_num=0x0) at
build/ARM/cpu/o3/commit.cc:1252

*1252* cpu->trap(inst_fault, tid,





 *  if (inst_fault != NoFault) {*



*……*

*…….*

……..



*assert(!thread[tid]->noSquashFromTC);*





*cpu->trap(inst_fault, tid, <- line 1252*

*  head_inst->notAnInst() ? nullStaticInstPtr :*

*  head_inst->staticInst);*





gef➤  up

#3  0x55dacbaf in gem5::o3::Commit::commitInsts
(this=0x5b7cd8a0) at build/ARM/cpu/o3/commit.cc:1020

*1020* bool commit_success = commitHead(head_inst,
num_committed);



*if (head_inst->isSquashed()) {*



*……*

*…….*

……..

*} else {*

*pc[tid] = head_inst->pcState();*



*// Try to commit the head instruction.*

*bool commit_success = commitHead(head_inst, num_committed);
 < line 1020*

Ali

On Tue, Oct 12, 2021 at 5:01 PM Giacomo Travaglini <
giacomo.travagl...@arm.com> wrote:

>
> > -Original Message-
> > From: Ali Ghandour via gem5-users 
> > Sent: 12 October 2021 08:50
> > To: gem5-users@gem5.org
> > Cc: Ali Ghandour 
> > Subject: [gem5-users] Re: Porting a configuration file from gem5 v20 to
> gem5
> > v21
> >
> > Hi Giacomo,
> >
> > Indeed, I was able to use ArmMMU.connectWalkerPorts method and run
> > the config file in fs mode.
>
> Great!
>
> > However, I a, still struggling with the segmentation fault in se mode.
> >
> > Does it make any sense to have a config file working in fs mode but
> failing in
> > se? (notice that it is running in both fs and se mode in v20.0.0.)
> >
>
> It does as I believe the two issues (in SE and FS) are not related to each
> other. You are probably hitting another bug in SE mode.
> If you are getting a segmentation fault you are probably trying to
> dereference an invalid pointer (nullptr?). With GDB, could you navigate the
> stack frames
> until you find the invalid pointer? (just print the pointer you are trying
> to dereference)
>
> > Ali
> > ___
> > gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an
> > email to gem5-users-
> > le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>
> Kind Regards
>
> Giacomo
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Re: Porting a configuration file from gem5 v20 to gem5 v21

2021-10-12 Thread Giacomo Travaglini via gem5-users


> -Original Message-
> From: Ali Ghandour via gem5-users 
> Sent: 12 October 2021 08:50
> To: gem5-users@gem5.org
> Cc: Ali Ghandour 
> Subject: [gem5-users] Re: Porting a configuration file from gem5 v20 to gem5
> v21
>
> Hi Giacomo,
>
> Indeed, I was able to use ArmMMU.connectWalkerPorts method and run
> the config file in fs mode.

Great!

> However, I a, still struggling with the segmentation fault in se mode.
>
> Does it make any sense to have a config file working in fs mode but failing in
> se? (notice that it is running in both fs and se mode in v20.0.0.)
>

It does as I believe the two issues (in SE and FS) are not related to each 
other. You are probably hitting another bug in SE mode.
If you are getting a segmentation fault you are probably trying to dereference 
an invalid pointer (nullptr?). With GDB, could you navigate the stack frames
until you find the invalid pointer? (just print the pointer you are trying to 
dereference)

> Ali
> ___
> gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an
> email to gem5-users-
> le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Kind Regards

Giacomo
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s


[gem5-users] Re: Porting a configuration file from gem5 v20 to gem5 v21

2021-10-12 Thread Ali Ghandour via gem5-users
Hi Giacomo,

Indeed, I was able to use ArmMMU.connectWalkerPorts method and run the config 
file in fs mode.
However, I a, still struggling with the segmentation fault in se mode.

Does it make any sense to have a config file working in fs mode but failing in 
se? (notice that it is running in both fs and se mode in v20.0.0.)

Ali
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s


[gem5-users] Re: Porting a configuration file from gem5 v20 to gem5 v21

2021-10-11 Thread Giacomo Travaglini via gem5-users
Hi Ali,

> -Original Message-
> From: Ali Ghandour via gem5-users 
> Sent: 05 October 2021 15:44
> To: gem5-users@gem5.org
> Cc: Ali Ghandour 
> Subject: [gem5-users] Re: Porting a configuration file from gem5 v20 to gem5
> v21
>
> In FS mode, full errror stack below:
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "build/ARM/python/m5/main.py", line 455, in main
>   File "./RPIv4.py", line 535, in 
> main()
>   File "./RPIv4.py", line 512, in main
> root.system = systemCreate(args)
>   File "./RPIv4.py", line 297, in systemCreate
> system = RPISystemCreate(ArmSystem, args, mode)
>   File "./RPIv4.py", line 182, in RPISystemCreate
> return RPISystem(args, mode)
>   File "./RPIv4.py", line 127, in __init__
> self.configMem(args)
>   File "./RPIv4.py", line 158, in configMem
> self.cpu_cluster.connectDirect(self.membus)
>   File "/home/ali/Desktop/spirals/reproduce-spectre-
> gem5/gem5/./ARMv8A_Cortex_A72.py", line 325, in connectDirect
> cpu.dtb.walker.port = bus.slave
>   File "build/ARM/python/m5/SimObject.py", line 1416, in __getattr__

>From v21.0 the BaseCPU is interfacing to the MMU rather than the TLBs [1]:
So you should amend your configuration file accordingly. I suggest you to have 
a look at the
ArmMMU.connectWalkerPorts anyway [2]

> AttributeError: object 'ARM_A72_TLB_L1D' has no attribute 'walker'
>   (C++ object is not yet constructed, so wrapped C++ methods are
> unavailable.) ___
> gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an
> email to gem5-users-
> le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s


Kind Regards

Giacomo


[1]: https://github.com/gem5/gem5/blob/v21.0.0.0/src/cpu/BaseCPU.py#L154
[2]: https://github.com/gem5/gem5/blob/v21.0.0.0/src/arch/arm/ArmMMU.py#L52
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s


[gem5-users] Re: Porting a configuration file from gem5 v20 to gem5 v21

2021-10-06 Thread Ali Ghandour via gem5-users
Hi Jason,

I am not sure this is the same issue.
I compiled the hello.c example using the below make file and run it in se mode 
using my config file and still received the segmentation error:

CC=aarch64-linux-gnu-gcc
CFLAGS=-Wall -g3 -march=armv8-a -static -O0 # -I../

all: arm

arm:
$(CC) $(CFLAGS) -c hello.c  
-o hello.o
$(CC) $(CFLAGS) hello.o -o hello

Please advise.
Ali
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s


[gem5-users] Re: Porting a configuration file from gem5 v20 to gem5 v21

2021-10-06 Thread Jason Lowe-Power via gem5-users
Hi Ali,

Is your guest code 32-bit Arm? If so, I think this could be the problem in
SE mode: https://gem5.atlassian.net/browse/GEM5-1074

Cheers,
Jason

On Tue, Oct 5, 2021 at 7:45 AM Ali Ghandour via gem5-users <
gem5-users@gem5.org> wrote:

> In FS mode, full errror stack below:
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "build/ARM/python/m5/main.py", line 455, in main
>   File "./RPIv4.py", line 535, in 
> main()
>   File "./RPIv4.py", line 512, in main
> root.system = systemCreate(args)
>   File "./RPIv4.py", line 297, in systemCreate
> system = RPISystemCreate(ArmSystem, args, mode)
>   File "./RPIv4.py", line 182, in RPISystemCreate
> return RPISystem(args, mode)
>   File "./RPIv4.py", line 127, in __init__
> self.configMem(args)
>   File "./RPIv4.py", line 158, in configMem
> self.cpu_cluster.connectDirect(self.membus)
>   File
> "/home/ali/Desktop/spirals/reproduce-spectre-gem5/gem5/./ARMv8A_Cortex_A72.py",
> line 325, in connectDirect
> cpu.dtb.walker.port = bus.slave
>   File "build/ARM/python/m5/SimObject.py", line 1416, in __getattr__
> AttributeError: object 'ARM_A72_TLB_L1D' has no attribute 'walker'
>   (C++ object is not yet constructed, so wrapped C++ methods are
> unavailable.)
> ___
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-users] Re: Porting a configuration file from gem5 v20 to gem5 v21

2021-10-05 Thread Ali Ghandour via gem5-users
In FS mode, full errror stack below:

Traceback (most recent call last):
  File "", line 1, in 
  File "build/ARM/python/m5/main.py", line 455, in main
  File "./RPIv4.py", line 535, in 
main()
  File "./RPIv4.py", line 512, in main
root.system = systemCreate(args)
  File "./RPIv4.py", line 297, in systemCreate
system = RPISystemCreate(ArmSystem, args, mode)
  File "./RPIv4.py", line 182, in RPISystemCreate
return RPISystem(args, mode)
  File "./RPIv4.py", line 127, in __init__
self.configMem(args)
  File "./RPIv4.py", line 158, in configMem
self.cpu_cluster.connectDirect(self.membus)
  File 
"/home/ali/Desktop/spirals/reproduce-spectre-gem5/gem5/./ARMv8A_Cortex_A72.py", 
line 325, in connectDirect
cpu.dtb.walker.port = bus.slave
  File "build/ARM/python/m5/SimObject.py", line 1416, in __getattr__
AttributeError: object 'ARM_A72_TLB_L1D' has no attribute 'walker'
  (C++ object is not yet constructed, so wrapped C++ methods are unavailable.)
___
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s