config,arch,cpu,kern,sim: Extract kernel information from System.
authorGabe Black <gabeblack@google.com>
Tue, 29 Oct 2019 01:55:02 +0000 (18:55 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 11 Mar 2020 15:57:14 +0000 (15:57 +0000)
commit73fdc2eb57dded37c2e0d93c1cdb179d1faa6679
tree092fee786bfd39e11bba6b60acc2912ffcc2edd9
parentba78eaf876afcef02452c06710c2c5737c8232ed
config,arch,cpu,kern,sim: Extract kernel information from System.

Information about what kernel to load and how to load it was built
into the System object and its subclasses. That overloaded the System
object and made it responsible for too many things, and also was
somewhat awkward when working with SE mode which doesn't have a kernel.

This change extracts the kernel and information related to it from the
System object and puts into into a OsKernel or Workload object.
Currently the idea of a "Workload" to run and a kernel are a bit
muddled, an unfortunate carry-over from the original code. It's also an
implication of trying not to make too sweeping of a change, and to
minimize the number of times configs need to change, ie avoiding
creating a "kernel" parameter which would shortly thereafter be
renamed to "workload".

In future changes, the ideas of a kernel and a workload will be
disentangled, and workloads will be expanded to include emulated
operating systems which shephard and contain Process-es for syscall
emulation.

This change was originally split into pieces to make reviewing it
easier. Those reviews are here:

https: //gem5-review.googlesource.com/c/public/gem5/+/22243
https: //gem5-review.googlesource.com/c/public/gem5/+/24144
https: //gem5-review.googlesource.com/c/public/gem5/+/24145
https: //gem5-review.googlesource.com/c/public/gem5/+/24146
https: //gem5-review.googlesource.com/c/public/gem5/+/24147
https: //gem5-review.googlesource.com/c/public/gem5/+/24286

Change-Id: Ia3d863db276a023b6a2c7ee7a656d8142ff75589
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26466
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
69 files changed:
configs/common/FSConfig.py
configs/common/MemConfig.py
configs/example/arm/baremetal.py
configs/example/arm/fs_bigLITTLE.py
configs/example/arm/starter_fs.py
configs/example/fs.py
configs/example/se.py
src/arch/arm/ArmFsWorkload.py [new file with mode: 0644]
src/arch/arm/ArmSystem.py
src/arch/arm/SConscript
src/arch/arm/freebsd/fs_workload.cc [new file with mode: 0644]
src/arch/arm/freebsd/fs_workload.hh [new file with mode: 0644]
src/arch/arm/freebsd/system.cc [deleted file]
src/arch/arm/freebsd/system.hh [deleted file]
src/arch/arm/fs_workload.cc [new file with mode: 0644]
src/arch/arm/fs_workload.hh [new file with mode: 0644]
src/arch/arm/linux/fs_workload.cc [new file with mode: 0644]
src/arch/arm/linux/fs_workload.hh [new file with mode: 0644]
src/arch/arm/linux/system.cc [deleted file]
src/arch/arm/linux/system.hh [deleted file]
src/arch/arm/stacktrace.cc
src/arch/arm/system.cc
src/arch/arm/system.hh
src/arch/generic/linux/threadinfo.hh
src/arch/mips/MipsSystem.py
src/arch/riscv/RiscvFsWorkload.py [new file with mode: 0644]
src/arch/riscv/RiscvSystem.py
src/arch/riscv/SConscript
src/arch/riscv/bare_metal/fs_workload.cc [new file with mode: 0644]
src/arch/riscv/bare_metal/fs_workload.hh [new file with mode: 0644]
src/arch/riscv/faults.cc
src/arch/riscv/fs_workload.hh [new file with mode: 0644]
src/arch/riscv/system.cc
src/arch/riscv/system.hh
src/arch/riscv/tlb.cc
src/arch/sparc/SConscript
src/arch/sparc/SparcFsWorkload.py [new file with mode: 0644]
src/arch/sparc/SparcSystem.py
src/arch/sparc/fs_workload.cc [new file with mode: 0644]
src/arch/sparc/fs_workload.hh [new file with mode: 0644]
src/arch/sparc/system.cc
src/arch/sparc/system.hh
src/arch/x86/SConscript
src/arch/x86/X86FsWorkload.py [new file with mode: 0644]
src/arch/x86/X86System.py
src/arch/x86/fs_workload.cc [new file with mode: 0644]
src/arch/x86/fs_workload.hh [new file with mode: 0644]
src/arch/x86/linux/fs_workload.cc [new file with mode: 0644]
src/arch/x86/linux/fs_workload.hh [new file with mode: 0644]
src/arch/x86/linux/system.cc [deleted file]
src/arch/x86/linux/system.hh [deleted file]
src/arch/x86/process.cc
src/arch/x86/pseudo_inst.cc
src/arch/x86/stacktrace.cc
src/arch/x86/system.cc
src/arch/x86/system.hh
src/cpu/o3/thread_state.hh
src/cpu/simple_thread.cc
src/dev/arm/RealView.py
src/kern/linux/helpers.cc
src/sim/OsKernel.py [new file with mode: 0644]
src/sim/SConscript
src/sim/System.py
src/sim/os_kernel.cc [new file with mode: 0644]
src/sim/os_kernel.hh [new file with mode: 0644]
src/sim/pseudo_inst.cc
src/sim/system.cc
src/sim/system.hh
tests/configs/arm_generic.py