gem5

How to switch CPU models in gem5 after restoring a checkpoint and then observe the difference?

我是研究僧i 提交于 2019-12-20 05:37:12
问题 I want to boot the Linux kernel in full system (FS) mode with a lightweight CPU to save time, make a checkpoint after boot finishes, and then restore the checkpoint with a more detailed CPU to study a benchmark, as mentioned at: http://gem5.org/Checkpoints However, when I tried to use -r 1 --restore-with-cpu= I cannot observe cycle differences between the new and old CPU. The measure I'm looking at is how cache sizes affect the number of cycles that a benchmark takes to run. The setup I'm

How to attach multiple disk images in a simulation with gem5 fs.py?

半世苍凉 提交于 2019-12-20 04:51:58
问题 At https://www.mail-archive.com/gem5-users@gem5.org/msg15233.html Jason mentioned the technique of attaching two disk images to restore a checkpoint and run a different benchmark. Is it possible to specify multiple disk images when using fs.py ? From the source code I don't think it is currently supported, but just double checking before I decided to patch it or not. It seems that multiple --disk-image= options just overwrite one another. fs_bigLITTLE.py seems to support it however. gem5

How to attach multiple disk images in a simulation with gem5 fs.py?

谁说我不能喝 提交于 2019-12-20 04:51:03
问题 At https://www.mail-archive.com/gem5-users@gem5.org/msg15233.html Jason mentioned the technique of attaching two disk images to restore a checkpoint and run a different benchmark. Is it possible to specify multiple disk images when using fs.py ? From the source code I don't think it is currently supported, but just double checking before I decided to patch it or not. It seems that multiple --disk-image= options just overwrite one another. fs_bigLITTLE.py seems to support it however. gem5

UART communication in Gem5 with ARM Bare-metal

依然范特西╮ 提交于 2019-12-20 02:35:36
问题 I am currently working with Gem5 and I have to access via UART from my Host to ARMv8 bare-metal option, so i tried lots way but i stocked yet. could you please let me know, how can i map my host's Serial port to ARMv8's Serial Port in bare-metal type programming. Any help would be appreciated 回答1: Working setups This repository contains a highly automated working example. Features: works on both QEMU and gem5 works on both arm and aarch64 newlib allows using the standard C library optionally

How to compile and run an executable in gem5 syscall emulation mode with se.py?

旧街凉风 提交于 2019-12-17 16:39:43
问题 There are many possible errors and workarounds scattered in may different places, can anyone provide at least one detailed working setup, with exact gem5 and compiler versions, hopefully on Ubuntu? 回答1: Minimal working Ubuntu setup As of gem5 8162e0da0285d346046151b2a45ceeb1baf63b8f Oct 2018, a C hello world for all of x86, arm and aarch64 just works on both Ubuntu 16.04 and 18.04. x86 was working previously, but that commit finalized some required arm changes to make the glibc int code run

How to enable ARM semihosting in gem5?

浪尽此生 提交于 2019-12-11 22:15:29
问题 I tried to run a semihosting exit instruction that worked on QEMU: mov r0, #0x18 ldr r1, =#0x20026 svc 0x00123456 but gem5 seemed to not process it properly and crashed. 回答1: As of 7bfb7f3a43f382eb49853f47b140bfd6caad0fb8 (Sep 2018) for fs.py apply the patch: diff --git a/configs/example/fs.py b/configs/example/fs.py index 3997ed76c..43bebcd66 100644 --- a/configs/example/fs.py +++ b/configs/example/fs.py @@ -376,5 +376,7 @@ if buildEnv['TARGET_ISA'] == "arm" and options.generate_dtb: sys =

How to run gem5 on KVM on ARM with multiple cores?

不想你离开。 提交于 2019-12-11 19:50:38
问题 Single core worked with fs.py at a5bc2291391b0497fdc60fdc960e07bcecebfb8f (Nov 2018), but multicore hanged in early in the boot process. Is multicore KVM supported on ARM 回答1: As of October 2019, gem5's ARM KVM is generally not robust enough to be generally recommended. Multicore works on some setups and fails on others, so there are likely outstanding bugs. There are also issues with GICv2 vs GICv3 version incompatibilities: only GICv2 hosts were supported. It is likely not extremely hard to

How can gem5 se mode execute a program with operating system dependencies?

谁都会走 提交于 2019-12-08 02:47:09
问题 Gem5 se mode is non-os mode, but i am able to execute row-hammer code on it which has commands with os dependencies.But if there is no os in se mode then how are they executed in se mode. 回答1: Most userland allowed instructions just do the usual thing, which is to change the state of the the CPU slightly: touch registers + cache + memory. Then when a syscall instruction is reached, the syscall is forwarded to the host which actually takes action. However, this also requires some extra

Why would a simple C program need syscalls?

百般思念 提交于 2019-12-05 15:10:15
Related to this other question. I am trying to run this simple C program in gem5: int main() { int a=1, b=2; int c=a+b; return c; } And it fails because gem5 doesn't have some syscalls implemented. My question is, why would a simple program like this require syscalls? This should run bare-metal without trouble. Is there a way to compile this to avoid syscalls? I am using arm-linux-gnueabi-gcc -static -DUNIX to compile it. Without syscalls the program cannot exit. The way it works is typically something like this: // Not how it's actually implemented... just a sketch. void _start() { char *

Why doesn't the Linux kernel see the cache sizes in the gem5 emulator in full system mode?

岁酱吖の 提交于 2019-12-02 08:27:34
I want to play around with cache sizes in my gem5 simulator to see how it affects performance of programs, and possibly tune programs at runtime. As a sanity check, I tried to check that the command lines arguments I used were working , and so I tried the various methods proposed at: https://superuser.com/questions/55776/finding-l2-cache-size-in-linux/1298808#1298808 cat /sys/devices/system/cpu/cpu0/cache/index2/size getconf LEVEL2_CACHE_SIZE But I observed that: the file /sys/devices/system/cpu/cpu0/cache/index2/size does not exist getconf is empty Why is that? I am certain however that the