ab8d484c272fe99c94a361ee8e1e7d3e3c860007
Also add the syscall number into the SyscallDesc class. The common table structure is basically just a map that extracts its key value from the SyscallDesc class using a new num() accessor. By using a map instead of an array (like RISCV was already doing), it's easy to support gaps of arbitrary size and non-zero offsets of groups of system calls without lots of filler or additional logic. This simplified the ARM system call tables in particular which had a lot of filler entries. Also, both the 32 and 64 bit ARM syscall tables had entries for a syscall at 123456 which was the "Angel SWI system call". This value is actually the immediate constant passed to the SWI system call instruction and is not interpreted as the system call number in linux. This constant can be intercepted by hardware or a simulator to, for instance, implement ARM semihosting. Also, that constant in combination with the SWI instruction is only used for semihosting in 32 bit ARM mode, not in 64 bit mode or in thumb. Since checking for that system call number was very likely a mistake from misinterpreting how the semihosting calls work, this change drops those checks. Change-Id: I9b2a902d7326791449cf0e1b98e932dcadba54f7 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24117 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
This is the gem5 simulator. The main website can be found at http://www.gem5.org A good starting point is http://www.gem5.org/about, and for more information about building the simulator and getting started please see http://www.gem5.org/documentation and http://www.gem5.org/documentation/learning_gem5/introduction. To build gem5, you will need the following software: g++ or clang, Python (gem5 links in the Python interpreter), SCons, SWIG, zlib, m4, and lastly protobuf if you want trace capture and playback support. Please see http://www.gem5.org/documentation/general_docs/building for more details concerning the minimum versions of the aforementioned tools. Once you have all dependencies resolved, type 'scons build/<ARCH>/gem5.opt' where ARCH is one of ARM, NULL, MIPS, POWER, SPARC, or X86. This will build an optimized version of the gem5 binary (gem5.opt) for the the specified architecture. See http://www.gem5.org/documentation/general_docs/building for more details and options. The basic source release includes these subdirectories: - configs: example simulation configuration scripts - ext: less-common external packages needed to build gem5 - src: source code of the gem5 simulator - system: source for some optional system software for simulated systems - tests: regression tests - util: useful utility programs and files To run full-system simulations, you will need compiled system firmware (console and PALcode for Alpha), kernel binaries and one or more disk images. If you have questions, please send mail to gem5-users@gem5.org Enjoy using gem5 and please share your modifications and extensions.
Description