24.10.4. gem5 config.ini
The m5out/config.ini file, contains a very good high level description of the system:
less $(./getvar --arch arm --emulator gem5 m5out_dir)"
That file contains a tree representation of the system, sample excerpt:
[root] type=Root children=system full_system=true [system] type=ArmSystem children=cpu cpu_clk_domain auto_reset_addr_64=false semihosting=Null [system.cpu] type=AtomicSimpleCPU children=dstage2_mmu dtb interrupts isa istage2_mmu itb tracer branchPred=Null [system.cpu_clk_domain] type=SrcClockDomain clock=500
Each node has:
-
a list of child nodes, e.g.
systemis a child ofroot, and bothcpuandcpu_clk_domainare children ofsystem -
a list of parameters, e.g.
system.semihostingisNull, which means that Semihosting was turned off-
the
typeparameter shows is present on every node, and it maps to aPythonobject that inherits fromSimObject.For example,
AtomicSimpleCPUmaps is defined at src/cpu/simple/AtomicSimpleCPU.py.
-
Set custom configs with the --param option of fs.py, e.g. we can make gem5 wait for GDB to connect with:
fs.py --param 'system.cpu[0].wait_for_remote_gdb = True'
More complex settings involving new classes however require patching the config files, although it is easy to hack this up. See for example: patches/manual/gem5-semihost.patch.
Modifying the config.ini file manually does nothing since it gets overwritten every time.