Issue is resolved. Truns out, although the .txt file is in the same directory and in my C code I am doing "./abc.txt", gem5 was trying to search the absolute path (/home/path to text file). I tried some debug flag, and --debug-flag=SyscallVerbose helped me to identify the issue.
________________________________ From: Nazmus Sakib via gem5-users <gem5-users@gem5.org> Sent: 02 September 2025 14:07 To: Harshil Patel via gem5-users <gem5-users@gem5.org> Cc: Jason Lowe-Power <jlowepo...@ucdavis.edu>; Nazmus Sakib <nsak...@nmsu.edu> Subject: [gem5-users] ARM Page table fault WARNING This email originated external to the NMSU email system. Do not click on links or open attachments unless you are sure the content is safe. I am running with ARM, SE mode. The executable to test is compiled using gcc arm cross compiler (aarch64-linux-gnu-gcc-13). Everything works fine until my test code tries to read from a text file (.txt). src/sim/faults.cc:102: panic: panic condition !handled && !tc->getSystemPtr()->trapToGdb(GDBSignal::SEGV, tc->contextId()) occurred: Page table fault when accessing virtual address 0xc0 The path to the text file is correct. The size of the file is large, around 87 MB. I tried to increase my --mem-size from 8 GB to 100 GB, no effect. I am using FILE *, fopen(), fclose() and fscanf() from stdio.h to read from the file. Note: I am using 2 separate memory ranges in my simulation, system.mem_ranges[0] and system.mem_ranges[1]. But they are carefully chosen to avoid overlapping (later starts where former ends). They worked fine for different cases, until I attempted to read from file. Any suggestion or solution would be appreciated. Thank you.
_______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org