tests: arch-power: Add 64-bit hello binaries This adds 64-bit statically linked big and little endian binaries for the hello test program. It should be noted that all possible combinations of ABI version and endianness are possible for 64-bit binaries. However, standard toolchains always use ELF ABI v1 for big endian and ELF ABI v2 for little endian binaries. Change-Id: I2dca7eaa2b04a7b68b117ada799d4c3bb69368be Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
tests: arch-power: Move 32-bit hello binary This moves the 32-bit hello binary for Power under the linux subdirectory like it was originally before being removed and reintroduced. Change-Id: I5f3da38f9abdda90b31755ce7e7c955838cc7289 Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
tests: arch-power: Add support for building hello Commit a440108cc ("tests: Add Makefiles for hello") introduced Makefiles for building the hello test binary for ARM and x86 using dockcross. Since dockcross also provides an image with a 64-bit little endian toolchain for Power, this adds a Makefile for building the hello binary. As of this moment, 64-bit little endian (ppc64le) is the prevalent variant supported by most distributions. Hence, we are currently limited to only building the binary for this variant. Change-Id: Ic20322ca33c69634d9f17d30b29e522cc35742fb Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
scons: Add support for debug info compression. If supported this will compress the debug information in object files, libraries, and binaries. This decreases the size of the build/ARM directory from 11GB to 7.2GB. Because the benefit of this mechanism depends on the performance and capacity of the build machine's storage, it can be disabled with the --no-compress-debug scons flag. For instance if your storage is very fast, writing out a larger binary may take less time than compressing that same number of bytes, plus the time to write out the smaller file. This feature seems to make our presubmit test machine run out of memory when trying to build gem5, and so is disabled in the testing scripts. Change-Id: I71919062d23742b7658918b0fa9c4d91d0521fbf Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40715 Reviewed-by: Gabe Black <gabe.black@gmail.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
arch-power: Restore consistency with other platforms The 32-bit POWER reference test binary was removed in c1ebdf66f (as a nasty surprise for POWER users). The remaining platforms split between two approaches: MIPS rebuilds "hello" from source. This fails for two reasons: 1) The trivial reason is that on POWER make abends due to no makefile. 2) The more fundamental reason is that gem5 is not completely bug-free (especially the Decoder on POWER in this case), therefore regression testing is only possible if we have not just some hello program, but a very particular bit sequence to serve as an immutable reference. ARM and X86 follow the reference-bit-sequence approach. POWER will be consistent with same. Including the sha1 for hello32, 77b27b67393311546e768b5ff35202490bad71aa, as a simple immutability assurance. I have also renamed hello to hello32 in anticipation to merge Sandipan's e52dbcb. Change-Id: I77ef31349c9e50b987c6f58bb23324844527366d Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40635 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Reviewed-by: Sandipan Das <sandipan@linux.ibm.com> Reviewed-by: Pratik Sampat <pratik.r.sampat@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
tests: Changed 'long' boot tests to X86 from GCN3_X86 We compile GCN3_X86 for the 'quick' tests, as a substitute for X86. We compile X86 as part of our nightly tests, along with the running of the 'long' tests. This leads to a needless duplicate compilation of the X86 isa during our nightly tests. Therefore, this commit removes GCN3_X86 for the 'long' tests (only the x86 boot tests are affected). Change-Id: Ifd8aaf0e7b8178c588ace33b27671d4ba9b353ed Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40415 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Matt Sinclair <mattdsinclair@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
tests: Increase presubmit (Kokoro) timeout to 6 hours Kokoro is now frequnetly timing out. This will increase the timeout from 5 hours to 6 hours. Change-Id: I2124567142358ab183d962fcbd73ee9ea4e809a3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40455 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
tests: Remove Python 2.7 glue code Remove uses of six and from __future__ imports as they are no longer needed. Change-Id: I74b5250722abe1e202f31a9ec1d4cc04039df168 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39757 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
python: Require a unit in anyToFrequency and anyToLatency The anytToFrequency and anyToLatency conversion functions are currently ambiguous when called without a unit. Fix this by always requiring a unit. Change-Id: I5ea94e655f7ca82c0efe70b9f9f7f734fbf711c1 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39435 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
base, python: Add a Temperature type and associated param Add a class to represent a temperature. The class stores temperatures in Kelvin and provides helper methods to convert to/from Celsius. The corresponding param type automatically converts from Kelvin, Celsius, and Fahrenheit to the underlying C++ type. Change-Id: I5783cc4f4fecbea5aba9821dfc71bfa77c3f75a9 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39218 Maintainer: Jason Lowe-Power <power.jg@gmail.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
tests: Add Python unit tests for m5.util.convert Python unit tests need to be run from within gem5. This change adds a script to run unit tests (tests/run_pyunit.py) and a unit test for m5.util.convert. The tests can be run as follows: ./build/NULL/gem5.opt tests/run_pyunit.py Change-Id: I80d1aabbe1d87b01b48280972f9418317e648779 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39377 Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
tests: Fix syntax error in cpu_tests/test.py The testsuite was not loaded with the following error: Exception thrown while loading <gem5>/tests/gem5/cpu_tests/test.py Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Change-Id: I1e88b8957bb24471e1bb6113ffc7c78886b6ed70 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39295 Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
tests,arch-gcn3,arch-x86: Changed X86 testlib tests to GCN3_X86 In an effort to get better test coverage, we've changed all X86 tests to use GCN3_X86. This will, as a minimum, ensure that GCN3 is regularly compiled. GCN3_X86 is a superset of X86 and all X86 tests should pass on GCN3_X86. Change-Id: I2684edfc4e48c3e311a400231293a9e04c701130 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38279 Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
tests: Standardized used of the ISA constants tags Change-Id: I4a3966168a1d159bf4ac4cc3148e9c7a43c880e3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38278 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
configs,tests: use Sequencer port connect methods This patch updates Ruby configuration scripts to use the functions defined in the RubySequencer python object to connect to cpu ports. Only the protocol-agnostic scripts were updated. Scripts that assume a specific protocol (e.g. configs/example/apu_se.py, gpu tests, etc) and scripts in which the obj connected to the RubySequencer is not a BaseCPU (e.g. the tests scripts) were not changed as they require a non-standard port wireup. Change-Id: I1e931ff0fc93f393cb36fbb8769ea4b48e1a1e86 Signed-off-by: Tiago Mück <tiago.muck@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31418 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
tests,misc: Added gem5.fast clang compilation to Kokoro Compilation issues in Clang and in compiling gem5.fast are normally only caught during gem5's weekly, intensive, compilation checks: http://jenkins.gem5.org/job/Compiler-Checks. The purpose of this change is to have smaller checks on every commit, reducing the chance of uncompilable code being submitted. Change-Id: Idd8c6795ff73e21b1814281c31fc7ae39f09dcc5 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37478 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
cpu-minor: this is a bug fix for MinorCPU for thread cloning. Inside the code of cloneFunc(…) //syscall_emul.hh cp->initState(); //line 1483 p->clone(tc, ctc, cp, flags); //line 1484 … ctc->clearArchRegs(); //line 1503 OS::archClone(flags, p, cp, tc, ctc, newStack, tlsPtr); //line 1505 … At line 1483, initState() is called and the activateContext() of the corresponding MinorCPU is eventually called. The actual architecture clone happens at line 1505 where PC of the new thread could have a correct value. In the existing implementation of MinorCPU::activateContext(ThreadID thread_id), the below line 275 is called pipeline->wakeupFetch(thread_id); to start fetching instruction with current value of PC, which is 0x0, leading to panic “Page table fault when accessing virtual address 0”. This is because the OS::archClone() is not yet called. So, the below bug fix handles the wakeup fetch for a thread for two scenarios: ... if (!threads[thread_id]->getUseForClone()) { //the thread is not cloned pipeline->wakeupFetch(thread_id); } else {//the thread from clone if (fetchEventWrapper != NULL) delete fetchEventWrapper; fetchEventWrapper = new EventFunctionWrapper([this, thread_id] {pipeline->wakeupFetch(thread_id);}, "wakeupFetch"); schedule(*fetchEventWrapper, clockEdge(Cycles(0))); } ... If a thread is not cloned, pipeline->wakeupFetch() is called immediately. For the cloned thread, the above bug fix delays the execution of pipeline->wakeupFetch() after the OS::archClone is done. ThreadContext::getUseForClone() return true if a thread is cloned. A member variable fetchEventWrapper is added to MinorCPU class for delayed fetch event. A member variable useForClone and its corresponding get/set methods are added to ThreadContext class. This approach allows future reuse of this useForClone variable by other CPU models if needed and also avoid lots of changes resulted by modifying parameters of activateContext () and activate() which are defined as override. Inside the syscall cloneFunc, the useForClone member of a ThreadContext object is set via its set method right before Process's initState() is called, shown as below. ctc->setUseForClone(true); cp->initState(); p->clone(tc, ctc, cp, flags); A few previously failed RISC-V ASM tests have been open in tests.py file after the bug fix works. JIRA issue: https://gem5.atlassian.net/browse/GEM5-374 Change-Id: Ibffe46522e2617443d29f49df180692c54830f14 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37315 Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>
tests: Add realview64-kvm.py test to quick regressions By using the valid_host parameter we can make sure the test is run on a aarch64 host only Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Change-Id: I3cdb35967e85377f26adf73ad147cb2479162ca1 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31219 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com>
tests: Add realview64-kvm.py testing platform Change-Id: If9952563413b4c7462a3ddf46c40358023d5bc60 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31218 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
tests: Update guest binaries used by regressions The new tarball (aarch-system-20200611.tar.bz2) contains the m5_exit_addr.squashfs.arm64 disk image to be used by KVM regressions This disk image is based on a memory mapped m5 exit Change-Id: I23c4a2fa8f969c98dd319cbfa51bca0bcbc9e890 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37177 Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu> Tested-by: kokoro <noreply+kokoro@google.com>