GEM5 checkpoint

Add gem5 as buildroot package to cross compile m5.

Add gem5 as a submodule.

Split gem5 from arch on CLI with "-a arm -g" instead of "-a arm-gem5".
This commit is contained in:
Ciro Santilli
2018-02-21 00:44:17 +00:00
parent 0c2bd829d4
commit 9e5173f324
11 changed files with 133 additions and 54 deletions

View File

@@ -1208,8 +1208,8 @@ Instead, we have only chip makers, who keep everything that really works closed,
==== GEM5 ARM
....
./configure && ./build -a arm-gem5
./rungem5 -a arm-gem5
./configure && ./build -a arm -g
./rungem5 -a arm
....
On another shell:
@@ -1223,7 +1223,7 @@ On another shell:
E.g., to add `printk.time=y`, run:
....
./rungem5 -a arm-gem5 -- --command-line='earlyprintk=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 norandmaps rw loglevel=8 mem=512MB root=/dev/sda printk.time=y'
./rungem5 -a arm -- --command-line='earlyprintk=pl011,0x1c090000 console=ttyAMA0 lpj=19988480 norandmaps rw loglevel=8 mem=512MB root=/dev/sda printk.time=y'
....
When you use `--command-line=`, it overrides default command lines, which are required to boot properly.
@@ -1233,7 +1233,7 @@ So if you pass just `--command-line='printk.time=y'`, it removes the required op
An easy way to find the other options is to to an initial boot:
....
./rungem5 -a arm-gem5
./rungem5 -a arm
....
and then look at the line of the linux kernel that starts with
@@ -1295,6 +1295,54 @@ Escape character is '^]'.
I have also tried to copy the exact same kernel command line options used by QEMU, but nothing changed.
===== GEM5 checkpoint
Analogous to QEMU's <<snapshot>>.
Documentation: http://gem5.org/Checkpoints
....
./rungem5 -a arm
....
In guest, wait for the boot to end and run:
....
/m5 checkpoint
....
To restore the checkpoint, kill the VM and run:
....
./rungem5 -a arm -- -r 1
....
Let's create a second checkpoint to see how it works, in guest:
....
date >f
/m5 checkpoint
....
Kill the VM, and try it out:
....
./rungem5 -a arm -- -r 2
....
and now in the guest:
....
cat f
....
contains the `date`. The file `f` wouldn't exist had we used the first checkpoint with `-r 1`.
Internals:
- the checkpoints are stored under `m5out/cpt.*`
- `m5` is a guest utility present inside the GEM5 tree which we cross-compiled and installed into the guest
==== GEM5 x86
TODO didn't get it working yet.