gem5.git
4 years agoutil,tests: Added exit code to the compiler tests
Bobby R. Bruce [Mon, 3 Aug 2020 23:22:59 +0000 (16:22 -0700)]
util,tests: Added exit code to the compiler tests

This testing script should return a non-exit code when one of the
compilations fail.

Change-Id: Ie15bc5779372dd31d784eaffdee4b04abb9a1b11
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32097
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil,tests: Removed GCC 4.8 from compilers tests
Bobby R. Bruce [Mon, 3 Aug 2020 22:58:16 +0000 (15:58 -0700)]
util,tests: Removed GCC 4.8 from compilers tests

We are going to remove support of GCC 4
(https://gem5.atlassian.net/browse/GEM5-218) as part of the gem5 20.1
release.

Change-Id: Ie44b553d35f48118d24b96eba564a927fefdb985
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32096
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-riscv, arch-x86: convert tlb to new style stats
Emily Brickey [Tue, 18 Aug 2020 20:16:53 +0000 (13:16 -0700)]
arch-riscv, arch-x86: convert tlb to new style stats

Change-Id: Ie2754d861a658fde0acdda30cbcb91e02029e33a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32835
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-mips, arch-power: removed unused stats
Emily Brickey [Tue, 18 Aug 2020 18:28:59 +0000 (11:28 -0700)]
arch-mips, arch-power: removed unused stats

Change-Id: Ic44943eaefab027d6dc665e531f827202b353093
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32834
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-x86,cpu: Fix bpred by annotating branch instructions in x86
Juan M. Cebrian [Tue, 21 Apr 2020 17:15:03 +0000 (19:15 +0200)]
arch-x86,cpu: Fix bpred by annotating branch instructions in x86

Original Creator: Adria Armejach.

Branch instructions needed to be annotated in x86 as direct/indirect and conditional/unconditional. These annotations where not present causing the branch predictor to misbehave, not using the BTB. In addition, logic to determine the real branch target at decode needed to be added as it was also missing.

Change-Id: I91e707452c1825b9bb4ae75c3f599da489ae5b9a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29154
Reviewed-by: Alexandru Duțu <alexandru.dutu@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agotests: Removed m5threads tests from .testignore
Bobby R. Bruce [Wed, 19 Aug 2020 07:32:16 +0000 (00:32 -0700)]
tests: Removed m5threads tests from .testignore

This commit fixes many problems which were resulting in these tests
not executing correctly. However, the m5thread tests are still failing
with an `fatal:syscall set_tid_address (#166) unimplemented` error,
recorded here: https://gem5.atlassian.net/browse/GEM5-747.

The tests have been removed from .testignore as part of our goal of
removing all tests from the .testignore file:
https://gem5.atlassian.net/browse/GEM5-361

Change-Id: I287d1e126963114a791d7f3aa563a037a89b2cb7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32916
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agotests: Added tests/gem5/resources to .gitignore
Bobby R. Bruce [Thu, 13 Aug 2020 05:33:32 +0000 (22:33 -0700)]
tests: Added tests/gem5/resources to .gitignore

This is simply a directory used by testlib to store downloaded
resources. It should therefore be ignored.

Change-Id: Iede2234dc512b3bc8bdcccfaef0b14d56dee0a27
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32915
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agotests: Removed the hello tests from .testignore
Bobby R. Bruce [Thu, 13 Aug 2020 05:24:51 +0000 (22:24 -0700)]
tests: Removed the hello tests from .testignore

The "hello" tests that were previously ignored are all functioning
correctly, and are therefore being re-included in the test suite. The
MIPS and SPARC tests have been tagged a "long" as we do not compile
these ISAs are part of our "quick" tests.

Change-Id: I3aa079b81b938a12da6993213d158e53bc4ae514
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32914
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Delete the critical path annotation code.
Gabe Black [Thu, 20 Aug 2020 03:14:49 +0000 (20:14 -0700)]
misc: Delete the critical path annotation code.

This code was at least a little Alpha specific, and now that Alpha is
gone it can no longer be compiled. We could either fix it up to work
with other/all ISAs or delete it, and the consensus was to delete it. It
could potentially be revived in the future by retrieving it from version
control.

Change-Id: Ied073f2b9b166951ecba3442cd762eb19bc690b3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32954
Reviewed-by: Steve Reinhardt <stever@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem: Use getGuestByteOrder in the indirect memory prefetcher.
Gabe Black [Wed, 19 Aug 2020 09:28:33 +0000 (02:28 -0700)]
mem: Use getGuestByteOrder in the indirect memory prefetcher.

Use that instead of accessing TheISA::GuestByteOrder directly.

Change-Id: I6fbeb7501aceadb95739bb482215097af18da2fa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32926
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-riscv: Add float registers in copyRegs
Ian Jiang [Wed, 19 Aug 2020 08:19:33 +0000 (16:19 +0800)]
arch-riscv: Add float registers in copyRegs

The origin copyRegs() does not include float registers.
This patch fixes the problem.

Change-Id: If4ad04b1eda6035486197879ff3e04ff32dd87bb
Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32934
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Eliminate the unused HasUnalignedMemAcc constant.
Gabe Black [Wed, 19 Aug 2020 09:15:09 +0000 (02:15 -0700)]
arch: Eliminate the unused HasUnalignedMemAcc constant.

Change-Id: Iaf9346df57336216c09979fe1d931701c6b7ddf6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32923
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Eliminate an unused pair of constants from isa_traits.hh.
Gabe Black [Wed, 19 Aug 2020 09:11:54 +0000 (02:11 -0700)]
arch: Eliminate an unused pair of constants from isa_traits.hh.

The one questionable use of CurThreadInfoImplemented (always false) and
CurThreadInfoReg (always -1) has been eliminated, making these constants
unnecessary.

Change-Id: Ibfe4f7be7ce5aaf9c5e896146e1b05b3ac752305
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32922
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Make ThreadInfo::curThreadInfo virtual, protected.
Gabe Black [Wed, 19 Aug 2020 09:07:25 +0000 (02:07 -0700)]
arch: Make ThreadInfo::curThreadInfo virtual, protected.

Also remove it's Alpha centric implementation. All existing ISAs will
panic since they all define the guarding constant as false. Even if they
defined it as true, this function assumes that there is necessarily a misc
reg which can be read to find the current thread_info struct, and how
the contents of that register should be manipulated.

This code is already fairly fragile since it depends on things in the
Linux kernel having certain names and relationships with each other, but
that's a larger problem I don't want to fix right now.

Change-Id: Ic107793ebcd25ee25c4d3713c84c1d2b5209f1a3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32921
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agox86: Replace getDoubleBits with floatToBits64.
Gabe Black [Wed, 19 Aug 2020 09:46:49 +0000 (02:46 -0700)]
x86: Replace getDoubleBits with floatToBits64.

The getDoubleBits function was used exactly once to find the bit
representation of a double floating point value, which is the same thing
the common floatToBits64 function does. Eliminate x86's one off version,
and use the common one instead.

Change-Id: Icb0cec5a55d81a6eacf1bb5a3c2b8f16c414d0d9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32927
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem: Use the System object's getGuestByteOrder in AbstractMemory.
Gabe Black [Wed, 19 Aug 2020 09:24:48 +0000 (02:24 -0700)]
mem: Use the System object's getGuestByteOrder in AbstractMemory.

Change-Id: Ifcf3d8dcbee73555b23ec0a8c25572921fca13a6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32925
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Remove the "inline" keyword in ThreadInfo.
Gabe Black [Wed, 19 Aug 2020 09:05:59 +0000 (02:05 -0700)]
arch: Remove the "inline" keyword in ThreadInfo.

Methods which are defined inline are already implicitly inline, making
that keyword redundant. It's also inconsistently used.

Change-Id: If6ec3e94d126ae52d9c2f0d3e8ca27f1ac600650
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32920
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agox86: Fix some style issues in the microcode ROM class.
Gabe Black [Tue, 18 Aug 2020 06:09:46 +0000 (23:09 -0700)]
x86: Fix some style issues in the microcode ROM class.

Change-Id: I64fb5efbc9f63298c103816503f4718308032eb4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32896
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agox86: Style fix in the decoder class.
Gabe Black [Fri, 7 Aug 2020 09:07:32 +0000 (02:07 -0700)]
x86: Style fix in the decoder class.

Change-Id: If06a8771b5db0fb68e88b16dedfe60fc2ce306d9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32894
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Get the byte order from sys and not TheISA::.
Gabe Black [Wed, 19 Aug 2020 08:52:28 +0000 (01:52 -0700)]
arch: Get the byte order from sys and not TheISA::.

This is a small step which localizes the use of TheISA, hopefully making
it easier to eliminate in the future.

Change-Id: I13472ed69e12a3c753e2dea91b9c7ca813bfc0e7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32919
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agokern: Stop using TheISA::GuestByteOrder in Linux::dumpDmesg.
Gabe Black [Wed, 19 Aug 2020 09:22:35 +0000 (02:22 -0700)]
kern: Stop using TheISA::GuestByteOrder in Linux::dumpDmesg.

This value is already read from the system object in that same function.
We should use that instead of getting the value ourselves.

Change-Id: I0a442cd4892f50ad0179884bebf3eb52881c022f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32924
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Don't add contents to the TheISA namespace in arch/generic.
Gabe Black [Wed, 19 Aug 2020 10:09:12 +0000 (03:09 -0700)]
arch: Don't add contents to the TheISA namespace in arch/generic.

Instead, add what you want other ISAs to be able to use to a generic,
fixed namespace, and then let those other ISAs bring those symbols in
with "using" if they want them.

Change-Id: I15bfaf56e76ffdc3bdb603deef4ad471211f4f24
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32929
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agodev,arm: Stop using TheISA in ARM specific files.
Gabe Black [Wed, 19 Aug 2020 10:03:53 +0000 (03:03 -0700)]
dev,arm: Stop using TheISA in ARM specific files.

These can use ArmISA since there's no ambiguity about what ISA is being
used with those files.

Change-Id: I02e8ea0ab70215679eb939adaa949400e878b1ed
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32928
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Fix a small style issue in Linux::ThreadInfo.
Gabe Black [Wed, 19 Aug 2020 08:51:48 +0000 (01:51 -0700)]
arch: Fix a small style issue in Linux::ThreadInfo.

Change-Id: I7f6f938f9412e535df0cbc0687ec9f2de2dbf8e3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32918
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu: Don't construct and then copy the decoder in SimpleThread.
Gabe Black [Wed, 19 Aug 2020 03:46:45 +0000 (20:46 -0700)]
cpu: Don't construct and then copy the decoder in SimpleThread.

The SimpleThread constructor was constructing a temporary copy of the
decoder, and then copying it into it's local version. This copy is a
waste, and also requires there to be a copy operator for the Decoder.

Change-Id: I1123b4ec767e08ceb2f108b3a6b19ca18d7c677c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32900
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Create a base class for decoders.
Gabe Black [Tue, 18 Aug 2020 07:09:42 +0000 (00:09 -0700)]
arch: Create a base class for decoders.

This base class doesn't actually hold anything yet, it's just a place to
add shared functionality or interfaces later.

Change-Id: Ia33217bd78b1d1ff3df3b2202095576a4e5d8153
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32897
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Replace scalar TypedBufferArg with VPtr.
Gabe Black [Tue, 26 May 2020 00:55:59 +0000 (17:55 -0700)]
misc: Replace scalar TypedBufferArg with VPtr.

Change-Id: Ic8460ad133e3512c103b14820d90ee3df987d78d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31755
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
4 years agoarch-riscv: Fix disassembling of CSR instructions
Ian Jiang [Tue, 18 Aug 2020 09:19:36 +0000 (17:19 +0800)]
arch-riscv: Fix disassembling of CSR instructions

The correct formats of CSR instructions are:
- mnemonic rd, csr, rs1
- mnemonic rd, csr, uimm

This patch fixes the problem.

Change-Id: Ie34e67a523e3458b90c27ca19f8c660b4775da6f
Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32814
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoconfigs,gpu-compute,mem-ruby: connect gmTokenPorts in apu_se
Kyle Roarty [Thu, 13 Aug 2020 22:27:06 +0000 (17:27 -0500)]
configs,gpu-compute,mem-ruby: connect gmTokenPorts in apu_se

This patch adds gmTokenPorts to the ComputeUnit and RubyGPUCoalescer
python classes so the gmTokenPorts can be connected in apu_se.

Change-Id: Icf3cb05c757754d6935b46f14e4b1b1d5072c4ca
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32677
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Rename CallbackQueue2 to CallbackQueue.
Gabe Black [Fri, 14 Aug 2020 08:26:35 +0000 (01:26 -0700)]
misc: Rename CallbackQueue2 to CallbackQueue.

Now that the original CallbackQueue has been removed, CallbackQueue2 can
fully take it's place.

Issue-on: https://gem5.atlassian.net/browse/GEM5-698
Change-Id: I925f647cbbd393045a22f7cbd5d8b4d7d23d19b0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32651
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agobase: Get rid the Callback type.
Gabe Black [Fri, 14 Aug 2020 08:22:34 +0000 (01:22 -0700)]
base: Get rid the Callback type.

This leaves only the lambda/std::function based CallbackQueue2, soon to
be renamed just CallbackQueue.

Issue-on: https://gem5.atlassian.net/browse/GEM5-698
Change-Id: I4e2fd3b7b684c414be6db0e268284ab63e6cfdff
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32650
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.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>
4 years agodev: Replace Callback in the virtio device with a lambda.
Gabe Black [Fri, 14 Aug 2020 08:13:11 +0000 (01:13 -0700)]
dev: Replace Callback in the virtio device with a lambda.

Issue-on: https://gem5.atlassian.net/browse/GEM5-698
Change-Id: Ia628ceb0080b11b81c7eee82e7c8c0049b2cd62f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32649
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agodev: Replace the Callback class with lambdas in ARM's flash devices.
Gabe Black [Fri, 14 Aug 2020 08:09:30 +0000 (01:09 -0700)]
dev: Replace the Callback class with lambdas in ARM's flash devices.

Issue-on: https://gem5.atlassian.net/browse/GEM5-698
Change-Id: I2694dd1952b7412c27c83c9d15d4645899bd28e2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32648
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agodev: Use lambdas instead of the Callback type for serial devices.
Gabe Black [Fri, 14 Aug 2020 07:46:45 +0000 (00:46 -0700)]
dev: Use lambdas instead of the Callback type for serial devices.

Issue-on: https://gem5.atlassian.net/browse/GEM5-698
Change-Id: Idb87fa0b90d14981fd61f997285f61b2ef304227
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32647
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim: Delete the unused PowerStateDumpCallback.
Gabe Black [Fri, 14 Aug 2020 07:26:06 +0000 (00:26 -0700)]
sim: Delete the unused PowerStateDumpCallback.

Issue-on: https://gem5.atlassian.net/browse/GEM5-698
Change-Id: I8e66f31a3a6a82564d9525021ada49ce52beb1fa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32646
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Make the stats callbacks use CallbackQueue2.
Gabe Black [Fri, 14 Aug 2020 07:22:09 +0000 (00:22 -0700)]
misc: Make the stats callbacks use CallbackQueue2.

Issue-on: https://gem5.atlassian.net/browse/GEM5-698
Change-Id: Idcbe04bdf4299925f321aa0ece263d86ed3fc8df
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32645
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoconfigs: Add import for FileSystemConfig in GPU_VIPER.py
Kyle Roarty [Thu, 13 Aug 2020 22:07:25 +0000 (17:07 -0500)]
configs: Add import for FileSystemConfig in GPU_VIPER.py

GPU_VIPER.py uses FileSystemConfig to register CPUs and caches in SE
mode. Without the import, it crashes.

Change-Id: I539a4060d705f6e1b9a12aca7836eca271f61557
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32675
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>
4 years agoconfigs: Replace DirMem w/RubyDirectoryMemory, set addr_ranges
Kyle Roarty [Thu, 13 Aug 2020 21:15:52 +0000 (16:15 -0500)]
configs: Replace DirMem w/RubyDirectoryMemory, set addr_ranges

This was originally from the GCN staging branch, which only had
GPU_VIPER.py, but the other GPU_VIPER configs had DirMem as well, so I
applied this change to all of them.

The patch replaces the Directory in DirCntrl from DirMem to
RubyDirectoryMemory. This fixes errors that DirMem caused relating to
setting class variables. It also generates and sets addr_ranges in
DirCntrl as RubyDirectoryMemory uses the parent object's addr_ranges
in its code

The style checker complained about a line length in GPU_VIPER_Region,
so the patch also fixes that

Change-Id: Icec96777a51d8a826b576fc752fae0f7f15427bc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32674
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Bradford Beckmann <brad.beckmann@amd.com>
Maintainer: Bradford Beckmann <brad.beckmann@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: convert tlb to new style stats
Emily Brickey [Wed, 12 Aug 2020 21:52:10 +0000 (14:52 -0700)]
arch-arm: convert tlb to new style stats

Change-Id: I2a3f138b53496be6361a1a2b81fa471a56a4dc10
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32794
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Early checking if debug is enabled in TLB
Giacomo Travaglini [Wed, 12 Aug 2020 15:07:00 +0000 (16:07 +0100)]
arch-arm: Early checking if debug is enabled in TLB

The patch is aiming at speeding up gem5 execution.  The TLB::translateFs
is in the critical path of the simulator: every fetch + ld/st will make
use of it.
Checking all the time for a breakpoint during fetch is rather expensive;
it is better to make use of the cached booleans in SelfDebug to do an
early check to see if any of
Watchpoint/Breakpopint/VectorCatch/SoftwareStep is enabled.
Most workloads won't use them so there's no point on calling the
testDebug method

Change-Id: I0189b84e0dc2e081acce04ff44787b9f1014477c
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32776
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Rename SelfDebug member variables
Giacomo Travaglini [Wed, 12 Aug 2020 14:12:58 +0000 (15:12 +0100)]
arch-arm: Rename SelfDebug member variables

* enableFlag -> mde
The "enableFlag" variable, enabling the Breakpoint, Watchpoint, Vector
Catch exceptions is actually the cached version of MDSCR_EL1.MDE. The
"enableFlag" name looks too general as it's not covering the Software
Step exception case.

* bKDE -> kde
* bSDD -> sdd

The b prefix was likely referring to "breakpoint". However these bitfields
are actually used by watchpoints as well.

Change-Id: I48b762b32b2d763f4c4ceb7dcc28968cfb470fc1
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32775
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
4 years agoarch-arm: Remove setters from SoftwareStep
Giacomo Travaglini [Wed, 12 Aug 2020 13:36:07 +0000 (14:36 +0100)]
arch-arm: Remove setters from SoftwareStep

Motivation:
Those helpers are used and meant to be used by the parent
(SelfDebug) class only. There is no point on exposing them to
the outer world. Better to make SelfDebug a friend class and to
allow it to access children's private data.

Change-Id: Ib945b1aa46742b90062ce7a5de563f164127075f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32774
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Make registerExitCallback use CallbackQueue2.
Gabe Black [Fri, 14 Aug 2020 07:02:17 +0000 (00:02 -0700)]
misc: Make registerExitCallback use CallbackQueue2.

Issue-on: https://gem5.atlassian.net/browse/GEM5-698
Change-Id: I526d4a19ca4e54a6469a4ee26693c1c0400fcc70
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32644
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem: Use the new type of CallbackQueue in the MemBackdoor.
Gabe Black [Fri, 14 Aug 2020 06:29:55 +0000 (23:29 -0700)]
mem: Use the new type of CallbackQueue in the MemBackdoor.

Issue-on: https://gem5.atlassian.net/browse/GEM5-698
Change-Id: Ide40528f8c613b46204550d6e6840a7b274a366a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32643
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.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>
4 years agobase: Add a new type of CallbackQueue.
Gabe Black [Fri, 14 Aug 2020 06:27:44 +0000 (23:27 -0700)]
base: Add a new type of CallbackQueue.

This type is templated on what arguments the callbacks in it accept, and
it inherits directly from std::list instead of containing one and
forwarding selected members.

This version is called CallbackQueue2, but once all CallbackQueue
instances have been replaced it will be renamed to CallbackQueue.

Issue-on: https://gem5.atlassian.net/browse/GEM5-698
Change-Id: I32ab7454ea8c6a2af31cbcf5d4932a069ace1cb5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32642
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-riscv: Fix disassembling of all register instructions
Ian Jiang [Fri, 14 Aug 2020 02:13:41 +0000 (10:13 +0800)]
arch-riscv: Fix disassembling of all register instructions

How many Rs to output in disassembling register instructions? It does
not depend on wheather the register index is zero, but on the count
of source registers.

This patch fixes the problem.

Change-Id: I9a770722003bc6f4a259589a7471a506494d4c86
Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32694
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: convert table_walker to new style stats
Emily Brickey [Tue, 11 Aug 2020 19:29:00 +0000 (12:29 -0700)]
arch-arm: convert table_walker to new style stats

Change-Id: I347a72d33e3d0eb9f60ac01dfa2cc82bdbae3cbb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32494
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
4 years agomem-cache,python: Allow custom TLB and events in each prefetcher.
Isaac Sánchez Barrera [Fri, 7 Aug 2020 10:12:10 +0000 (12:12 +0200)]
mem-cache,python: Allow custom TLB and events in each prefetcher.

The `BasePrefetcher` python class had members `_events` and `_tlbs`
defined as lists, meaning that any call to `list.append` on them would
affect `_events` and `_tlbs` for all prefetchers, not just the calling
object.  This change redefines them as instance members to fix the
problem.

Change-Id: I68feb1d6d78e2fa5e8775afba8c81c6dd0de6c60
Signed-off-by: Isaac Sánchez Barrera <isaac.sanchez@bsc.es>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32394
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
4 years agoutil,systemc: Update the stats API used in one of the examples.
Gabe Black [Fri, 14 Aug 2020 01:19:15 +0000 (18:19 -0700)]
util,systemc: Update the stats API used in one of the examples.

A new parameter as added to the initText method in March of this year,
but this example code was not updated which prevents it from compiling.

This change adds the parameter to the call and sets it to what the
documenting comments say is the default, true.

Change-Id: Ic8da46dba03f01f338c38a7bc02ba232a90ae349
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32641
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil,systemc: Update the gem5-within-systemc TLM example code.
Gabe Black [Fri, 14 Aug 2020 01:18:08 +0000 (18:18 -0700)]
util,systemc: Update the gem5-within-systemc TLM example code.

Some class names within gem5 changed in March of last year, and this
code was not updated to match. Change ExternalMaster::Port to
ExternalMaster::ExternalPort, and ExternalSlave::Port to
ExternalSlave::ExternalPort.

Change-Id: I04c0970c4107de3449473c24c7c6f99ada72bbb3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32640
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil: Add Xen compilation to gen_arm_fs_files.py
Giacomo Travaglini [Mon, 30 Mar 2020 09:08:25 +0000 (10:08 +0100)]
util: Add Xen compilation to gen_arm_fs_files.py

Change-Id: I61014d9686f0362ebb83dca5d4d33ac08d66d0a7
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32557
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil: Remove dependency check
Giacomo Travaglini [Mon, 30 Mar 2020 09:00:12 +0000 (10:00 +0100)]
util: Remove dependency check

The list is rather old and it contains some entries which are likely
unneeded. Since we are also now able to select specific FS binaries
to be compiled individually, there is not point of requiring all
components to be installed.
Instead, if is better to rely on the error message of building process
and let the users figure out which packages they need to install

Change-Id: I16c74861cb1f2b09c3e91e408ace01a9bd7a234d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32556
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil: Allow the short -j option in gen_arm_fs_files.py
Giacomo Travaglini [Mon, 30 Mar 2020 08:58:36 +0000 (09:58 +0100)]
util: Allow the short -j option in gen_arm_fs_files.py

Change-Id: I15c3bad13882cd38683b7c733311191e1f51d13f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32555
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil: Change gen_arm_fs_files.py to allow selective compilation
Giacomo Travaglini [Fri, 27 Mar 2020 15:32:24 +0000 (15:32 +0000)]
util: Change gen_arm_fs_files.py to allow selective compilation

With the -b/--fs-binaries option it is possible to specify a list
of fs binaries to be fetched/compiled.

Change-Id: I12a642f65b74e8606c82cdddcbc3a8172bad2381
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32554
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agotests: Dropped the i386 host tag in tests
Bobby R. Bruce [Thu, 13 Aug 2020 00:28:01 +0000 (17:28 -0700)]
tests: Dropped the i386 host tag in tests

Issue-on: https://gem5.atlassian.net/browse/GEM5-532
Change-Id: Ifee50d59c65f8b460248508688232d9253c040b6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32596
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Use isSecure variable for Stage2Lookup
Giacomo Travaglini [Wed, 12 Aug 2020 12:16:21 +0000 (13:16 +0100)]
arch-arm: Use isSecure variable for Stage2Lookup

TLB entries are tagged with the security state of the cpu instead
of the security attribute of the physical address

Change-Id: I728ba1c841de1ec6c1ee03aee012b185c968d078
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32639
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Fix physmem NS attribute in VMSAv8-32 descriptors
Giacomo Travaglini [Wed, 12 Aug 2020 11:14:06 +0000 (12:14 +0100)]
arch-arm: Fix physmem NS attribute in VMSAv8-32 descriptors

The NS field in PTEs descriptors is tagging Secure/Non-secure physical
memory (pages). This field is relevant in Secure state only:

While in Secure state, software can access both the Secure and
Non-secure physical address spaces, software in Non-secure state can
only access Non-secure memory; the NS bit is hence discarded/treated as
1.

This patch is aligning VMSAv8-32 with VMSAv8-64, which is tagging the
pointed memory as Non-secure in case of a Non-secure lookup.

The old behaviour was probably not leading to incorrect execution:
once a translation completes, the security flag in the memory request
is chcked against the security state of the cpu (and not only relying
on the NS bit in the TLB entry)

if (isSecure && !te->ns) {
    req->setFlags(Request::SECURE);
}

so we were already forbidding secure accesses from non secure world
if NS = 0.

It is however misleading in the debug logs to see tlb entries with
NSTID = 1 and NS = 0.

Change-Id: I1f964069f88c33fb14362dd4101cb22538907226
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32638
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: VSTTBR_EL2 doesn't contain a VMID field
Giacomo Travaglini [Tue, 11 Aug 2020 20:10:01 +0000 (21:10 +0100)]
arch-arm: VSTTBR_EL2 doesn't contain a VMID field

Change-Id: Ia6e14b509d7016020af9c85941e7b2d89dcdd359
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32637
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Disable HVC when SCR_EL3.HCE is 0
Giacomo Travaglini [Tue, 11 Aug 2020 13:11:29 +0000 (14:11 +0100)]
arch-arm: Disable HVC when SCR_EL3.HCE is 0

This was already implemented for AArch32 but it had been wrongly
removed by:

https://gem5-review.googlesource.com/c/public/gem5/+/31394

Change-Id: Ida303d5ccb5d8568ca4e7faaedf9b4efd1cd88b5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32636
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Fix XN in TLB permissions
Giacomo Travaglini [Tue, 11 Aug 2020 08:37:04 +0000 (09:37 +0100)]
arch-arm: Fix XN in TLB permissions

The SIF condition check should be logically ORed with the TLB
entry XN attribute, instead of overriding it.

Change-Id: I70b38d97bbdc82b9f385d40ad06546785fc2c5bb
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32635
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Fix SoftwareStep::debugExceptionReturnSS
Giacomo Travaglini [Mon, 10 Aug 2020 22:02:10 +0000 (23:02 +0100)]
arch-arm: Fix SoftwareStep::debugExceptionReturnSS

debugExceptionReturnSS is called on an ERET instruction to
check for software step. The method was not using the
SPSR.width and it was relying on the more generic ELIs32 to
check the execution mode of the destination EL.

This is not only an efficiency problem: the helper might not work
when returning to EL0. In general it is not possible to
understand if EL0 is using AArch32 or AArch64 if the current
EL is not EL0 and EL1 is using AArch64.

This is instead visible by inspecting the spsr.width during the
execution of an ERET instruction

Change-Id: Ibc5a43633d0020139f2c0e372959a3ab4880da6e
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32634
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoconfigs: Use proper keywordargs for RedirectPath in apu_se
Kyle Roarty [Thu, 13 Aug 2020 19:31:36 +0000 (14:31 -0500)]
configs: Use proper keywordargs for RedirectPath in apu_se

RedirectPath uses app_path and host_paths instead of src and dests.
This patch fixes that in apu_se.

The patch also changes the formatting for those lines, as simply
replacing dests with host_paths put the lines over the 80 char limit.

Change-Id: If7e4c41f2f52bc3d5aa26465c786294f9b68f8d3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32655
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoconfigs: Remove unneeded variable assignments in apu_se
Kyle Roarty [Thu, 13 Aug 2020 19:09:45 +0000 (14:09 -0500)]
configs: Remove unneeded variable assignments in apu_se

This patch removes:
A line assigning a variable to itself

An assignment to a variable (chroot) that is never used.
The above assignment also caused an error, "'NoneType' object
has no attribute 'startswith'"

Change-Id: Ib93c25fee4a0f7c1440de8067b086d8b96614796
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32654
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>
4 years agoconfigs: Remove remnants of /dev/shm mapping from apu_se
Kyle Roarty [Thu, 6 Aug 2020 23:47:17 +0000 (18:47 -0500)]
configs: Remove remnants of /dev/shm mapping from apu_se

This patch removes a redirect for /dev/shm. It also removes
a function call that cleaned up the /dev/shm redirect

Change-Id: Iec2598c715223d079bc5dfd2ea52859945706cfc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32354
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>
4 years agoutil: Add build dependency to gcn Dockerfile
Kyle Roarty [Tue, 11 Aug 2020 20:27:30 +0000 (15:27 -0500)]
util: Add build dependency to gcn Dockerfile

src/base/pngwriter.cc requires libpng-dev

Change-Id: I7f009cd8f5cacd64150c06b716b1ce3008832910
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32474
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
4 years agomem-ruby: Fix debug prints for regular Stores
Pouya Fotouhi [Wed, 12 Aug 2020 06:31:29 +0000 (23:31 -0700)]
mem-ruby: Fix debug prints for regular Stores

In the updated implementation of LL/SC (27103) the default value
of success was changed, which results in printing "SC_Failed" for
any regular stores.

Change-Id: I4f2e0b26233ce0cbdf948aadd19c9d81bf18bec0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32514
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-gcn3: Free registers when execMask = 0
Kyle Roarty [Wed, 5 Aug 2020 18:24:56 +0000 (13:24 -0500)]
arch-gcn3: Free registers when execMask = 0

Flat instructions free some of their registers through their memory
requests, in particuar a call to scheduleWriteOperandsFromLoad(),
which gets called from GlobalMemPipeline::exec.

When execMask is 0, the instruction doesn't issue a memory request.

This patch adds in a call to scheduleWriteOperandsFromLoad() when
execMask is 0 for Flat Load and AtomicReturn instructions, as those
are the instructions that call scheduleWriteOperandsFromLoad()
in the memory pipeline.

This patch also adds in a missing return statement when execMask is 0
in one of the Flat instructions.

Change-Id: I09296adb7401e7515d3cedceb780a5df4598b109
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32234
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: fix races between data and DMA in MOESI_AMD_Base-dir
Kyle Roarty [Wed, 29 Jul 2020 22:58:45 +0000 (17:58 -0500)]
mem-ruby: fix races between data and DMA in MOESI_AMD_Base-dir

There are race conditions while running several benchmarks, where
the DMA engine and the CorePair simultaneously send requests for the
same block. This patch fixes two scenarios
(a) If the request from the DMA engine arrives before the one from the
CorePair, the directory controller records it as a pending request.
However, once the DMA request is serviced, the directory doesn't check
for pending requests. The CorePair, consequently, never sees a response
to its request and this results in a Deadlock.

Added call to wakeUpDependents in the transition from BDR_Pm to U
Added call to wakeUpDependents in the transition from BDW_P to U

(b) If the request from the CorePair is being serviced by the directory
and the DMA requests for the same block, this causes an invalid
transition because the current coherence doesn't take care of this
scenario.

Added transition state where the requests from DMA are added to the
stall buffer.

Updated B to U CoreUnblock transition to check all buffers, as the DMA
requests were being placed later in the stall buffer than was being checked

Change-Id: I5a76efef97723bc53cf239ea7e112f84fc874ef8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31996
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Bradford Beckmann <brad.beckmann@amd.com>
Maintainer: Bradford Beckmann <brad.beckmann@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-gcn3: make read2st64_b32 write proper registers
Kyle Roarty [Wed, 5 Aug 2020 19:08:31 +0000 (14:08 -0500)]
arch-gcn3: make read2st64_b32 write proper registers

Per the GCN3 ISA, read2st64_b32 writes to consecutive registers

Change-Id: Ibc1672584a72cf7de12e06068a03fe304b34dce2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32236
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Alexandru Duțu <alexandru.dutu@amd.com>
Reviewed-by: Bradford Beckmann <brad.beckmann@amd.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agogpu-compute: Fixing HSA's barrier bit implementation
Sooraj Puthoor [Tue, 16 Jun 2020 01:48:15 +0000 (20:48 -0500)]
gpu-compute: Fixing HSA's barrier bit implementation

This changeset fixes several bugs in the HSA barrier bit implementation.

1. Forces AQL packet launch to wait for completion of all previous packets
2. Enforces barrier bit blocking only if there are packets pending completion
3. Barrier bit unblocking is correclty done by the last pending packet
4. Implementing barrier bit for all packets to conform to HSA spec

Change-Id: I62ce589dff57dcde4d64054a1b6ffd962acd5eb8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30354
Reviewed-by: Sooraj Puthoor <puthoorsooraj@gmail.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil: Install python six module in gcn dockerfile
Kyle Roarty [Wed, 5 Aug 2020 18:50:11 +0000 (13:50 -0500)]
util: Install python six module in gcn dockerfile

six is used in develop, but wasn't used in the GCN staging branch.

Change-Id: Ic1ca42df871d1e683c288282497267d00421609f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32235
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>
4 years agoarch: Remove the stacktrace.hh switching header file.
Gabe Black [Wed, 5 Aug 2020 06:56:36 +0000 (23:56 -0700)]
arch: Remove the stacktrace.hh switching header file.

This is no longer used.

Change-Id: I1419b28d51ff603beb7d8ab89632ad7038c3057e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32215
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu-simple: Fix BaseSimpleCPU to reset group stats
seanzw [Mon, 10 Aug 2020 18:49:33 +0000 (11:49 -0700)]
cpu-simple: Fix BaseSimpleCPU to reset group stats

BaseSimpleCPU::resetStats() should call Stats::Group::resetStats()
to reset new style hierarchy stats.

Change-Id: I932280449b29577d214db56ac8347aca4143c949
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32434
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil: Add stub unit tests for the call types in the m5 utility.
Gabe Black [Thu, 9 Apr 2020 07:39:00 +0000 (00:39 -0700)]
util: Add stub unit tests for the call types in the m5 utility.

These will be filled out in later changes. This CL just adds the
plumbing to the build script.

Change-Id: If58ea023d0c85eae0160f88217c83fca70346da2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27688
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
4 years agoutil: Pull "usage()" out of the call types in the m5 utility.
Gabe Black [Thu, 9 Apr 2020 06:55:14 +0000 (23:55 -0700)]
util: Pull "usage()" out of the call types in the m5 utility.

Also pull common implementations of some call type methods into the base
class, and make disappearing call types clean themselves up to make the
test a little simpler and less error prone.

Change-Id: Ie178fe02d41587647ddc90a084d1d1142b84dde9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27687
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Reduce boilerplate when extracting SelfDebug from tc
Giacomo Travaglini [Thu, 9 Jul 2020 09:24:16 +0000 (10:24 +0100)]
arch-arm: Reduce boilerplate when extracting SelfDebug from tc

Change-Id: I1746400617be64ac9c2f3194442734e178342909
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31354
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agodev-arm: Fix <timer>_CTL_EL<x>.ISTATUS when masking the irq
Giacomo Travaglini [Thu, 23 Jul 2020 12:19:49 +0000 (13:19 +0100)]
dev-arm: Fix <timer>_CTL_EL<x>.ISTATUS when masking the irq

According to the ArmArm:

"When the value of the ENABLE bit is 1, ISTATUS indicates whether the
timer condition is met.  ISTATUS takes no account of the value of the
IMASK bit. If the value of ISTATUS is 1 and the value of IMASK is 0 then
the timer interrupt is asserted."

Since ISTATUS is simply flagging that timer conditions are met, an
interrupt mask (via the <timer>_CTL_EL<x>.IMASK) shouldn't reset the
field to 0.
Clearing the ISTATUS bit leads to the following problem
as an example:

1) virtual timer (EL1) issuing a physical interrupt to the GIC

2) hypervisor handling the physical interrupt; setting the
CNTV_CTL_EL0.IMASK to 1 before issuing the virtual interrupt
to the VM

3) The VM receives the virtual interrupt but it gets confused
since CNTV_CTL_EL0.ISTATUS is 0 (due to point 2)

What happens when we disable the timer?

"When the value of the ENABLE bit is 0, the ISTATUS field is UNKNOWN."

So we are allowed to not clear the ISTATUS bit if the timer gets
disabled

Change-Id: I8eb32459a3ef6829c1910cf63815e102e2705566
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Adrian Herrera <adrian.herrera@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31775
Reviewed-by: Hsuan Hsu <kugwa2000@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim-se: don't wake up SE futex syscalls on ARM events
Ciro Santilli [Thu, 19 Dec 2019 18:52:44 +0000 (18:52 +0000)]
sim-se: don't wake up SE futex syscalls on ARM events

Before this commit:

* SEV events were not waking neither WFE (wrong) nor futex WAIT (correct)
* locked memory events (LLSC) due to LDXR and STXR were waking up both
  WFE (correct) and futex WAIT (wrong)

This commit fixes all wrong behaviours mentioned above.

The fact that LLSC events were waking up futexes leads to deadlocks,
as shown in the test case described at:
https://gem5.atlassian.net/browse/GEM5-537
because threads woken up by SVE are not removed from the waiter list
for the futex address they are sleeping on.

A previous fix atttempt was done at:
1531b56d605d47252dc0620bb3e755b7cf84df97
in which only sleeping threads are woken up. But that is not sufficient,
because the futex sleeping thread that was being wrongly woken up on SEV
can start to sleep on a second futex.

As an example, consider the case where 4 threads are fighting over two
critical sections protected by futex1 and futex2 addresses. In this case,
one thread wakes up the other thread after it is done with the section.

Suppose the following sequence of events:

* thread1 is awake and all others are suspended on futex1

* thread1 SEV wakes thread2 from the futex1 while in the critical region 1.

  This is the wrong behaviour that this patch prevents, because
  now thread2 is still in the sleeper list for futex1

* thread1 then futex wakes tread3, then proceeds to critical region 2.

* thread3 wakes up, but because thread2 has critical region, it sleeps
  again.

* thread2 finishes its work, futex wakes thread3, and then proceeds to
  futex2

  When it reaches futex2, thread1 is still working there, so it sleeps on
  futex2.

* thread3 futex wakes thread2, because it is still wrongly on the sleeper
  list of futex1. But thread2 is in futex2 now.

  If it weren't for this mistake, it should have awaken the final thread4
  instead.

Outcome: thread4 sleeps forever, no other thread ever wakes it, because all
other threads have woken from futex1 and awoken another thread.

The problem is fixed by adding the waitingTcs unordered_set FutexMap,
which is basically an inverse map to FutexMap, which tracks (addr,
tgid) -> ThreadContext. This allows us allow to quickly check
if a given ThreadContext is waiting on a futex in any address.

Then the SEV wakeup code path
now checks if the thread is k

Change-Id: Icec5e30b041f53e5aa3b6e0d291e77bc0e865984
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29777
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim-se: factor out FutexMap::suspend and FutexMap::suspend_bitset
Ciro Santilli [Thu, 19 Dec 2019 19:04:32 +0000 (19:04 +0000)]
sim-se: factor out FutexMap::suspend and FutexMap::suspend_bitset

Both methods do basically the same, especially since they don't handle the
timeout which is basically the only difference between both modes of the
syscall (one uses absolute and the other relative time).

Remove the WaiterState::WaiterState(ThreadContext* _tc) constructor,
since the only calls were from FutexMap::suspend which does not use them
anymore. Instead, set the magic 0xffffffff constant as a parameter to
suspend_bitset.

Change-Id: I69d86bad31d63604657a3c71cf07e5623f0ea639
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29776
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim-se: split futex_map.cc into header and source files
Ciro Santilli [Thu, 19 Dec 2019 12:53:03 +0000 (12:53 +0000)]
sim-se: split futex_map.cc into header and source files

To speed up development when modifying the implementation.

Change-Id: I1b3c67c86f8faa38ed81a538521b08e256d21a5a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29775
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-mips: Remove old TypeBufferArg call
Matthew Poremba [Fri, 7 Aug 2020 22:05:03 +0000 (17:05 -0500)]
arch-mips: Remove old TypeBufferArg call

TypeBufferArg was replaced by VPtr so this call is no longer needed.
This fixes the MIPS build / nightly build.

Change-Id: I3880229fa0ad87fad1ca35c136e12efc6c36ceda
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32414
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim: Add checkpoint parameters for VMA list
Ian Jiang [Tue, 28 Jul 2020 06:41:33 +0000 (14:41 +0800)]
sim: Add checkpoint parameters for VMA list

Add checkpoint parameters (together with corresponding serialization
and unserialization) for VMA list of class MemState into a separate
section named 'vmalist'.

Without these VMA list parameters, a page table fault will occur when
running with --restore-simpoint-checkpoint, because of an empty VMA
list. For example:

  $ ./build/RISCV/gem5.debug --debug-flags=Exec configs/example/se.py \
      -c tests/test-progs/hello/bin/riscv/linux/hello \
      --cpu-type=NonCachingSimpleCPU --restore-simpoint-checkpoint \
      --checkpoint-dir m5out/ -r 2
  ...
  2404000: system.switch_cpus: T0 : @_int_malloc+3392    : sd a5, 8(a0) \
      : MemWrite :  D=0x000000000001ed21 A=0x862e8
  panic: Page table fault when accessing virtual address 0x862e8
  ...

Example checkpoint output:

  [system.cpu.workload.vmalist]
  size=3

  [system.cpu.workload.vmalist.Vma0]
  name=stack
  addrRangeStart=...
  addrRangeEnd=...

  [system.cpu.workload.vmalist.Vma1]
  name=heap
  addrRangeStart=...
  addrRangeEnd=...

  [system.cpu.workload.vmalist.Vma2]
  ...

Change-Id: Ib2fa7ad2c34fe667ce95bc4b10a1affcf60d9c1f
Signed-off-by: Ian Jiang <ianjiang.ict@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31875
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Alexandru Duțu <alexandru.dutu@amd.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-power: Implement GDB XML target description for PowerPC
Boris Shingarov [Tue, 7 Jul 2020 19:34:56 +0000 (15:34 -0400)]
arch-power: Implement GDB XML target description for PowerPC

Change-Id: I2610626a7e1464316ebaa770291d4bdcb59e8856
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31114
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu: Remove the "profile" parameter and plumbing.
Gabe Black [Wed, 5 Aug 2020 06:25:25 +0000 (23:25 -0700)]
cpu: Remove the "profile" parameter and plumbing.

This parameter is associated with a periodic event which would take a
sample for a kernel profile in FS mode. Unfortunately the only ISA which
had working versions of the necessary classes was alpha, and that has
been deleted. That means that without additional work for any given ISA,
the profile parameter has no chance of working.

Ideally, this parameter should be moved to the Workload classes. There
it can intrinsically be tied to a particular kernel, rather than having
to assume a particular kernel and gate everything on whether you're in
FS mode.

Because this isn't (IMHO) where this parameter should live in the long
term, and because it's currently unusable without additional development
for each of the ISAs, I think it makes the most sense to remove the
front end for this mechanism from the CPU.

Since the sampling/profiling mechanism itself could be useful and could
be re-plumbed somewhere else, the back end and its classes are left alone.

Change-Id: I2a3319c1d5ad0ef8c99f5d35953b93c51b2a8a0b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32214
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosystemc: Adjust some type names in a couple tests.
Gabe Black [Wed, 5 Aug 2020 05:20:19 +0000 (22:20 -0700)]
systemc: Adjust some type names in a couple tests.

These names happened to collide with names from gem5 itself, and when
linked together produced strange and incorrect results.

Ideally gem5's names should go inside a gem5 namespace, but that's a
much larger change.

Change-Id: Ie7c5f2236678d5dbb722a86321296fce395fbd37
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32175
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosystemc: Filter a pydot warning message out when checking test output.
Gabe Black [Wed, 5 Aug 2020 05:19:08 +0000 (22:19 -0700)]
systemc: Filter a pydot warning message out when checking test output.

This warning can show up if pydot isn't set up properly and doesn't have
anything to do with the success of the test.

Change-Id: Iddcea5aa27196bc5cf747bf5a295b6c9a91b3d2c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32174
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons,fastmodel: Limit how many instances of simgen can run at once.
Gabe Black [Tue, 4 Aug 2020 07:33:55 +0000 (00:33 -0700)]
scons,fastmodel: Limit how many instances of simgen can run at once.

Each instance of simgen uses a license. If there are only so many to
go around, running many instances at once could exhaust the pool of
licenses and break the build.

The number of licenses may be less than the number of regular build
steps we want to do in parallel, but may be greater than zero. To
limit them to at most n in parallel where n might be less than j
and/or more than 1, we create a group of license slots, assign simgen
invocations to a slot, and then use scons's side effect mechanism to
ensure no two invocations in the same slot run at the same time.

This may be a suboptimal packing if the commands take significantly
different amounts of time to run since the slots are preallocated and
not demand allocated, but the difference shouldn't normally matter in
practice, and scons doesn't provide a better mechanism for partially
serializing certain build steps.

Change-Id: Ifae58b48ae1b989c1915444bf7564f352f042305
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32124
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons: Make src/systemc/tests/SConscript python 3 compatible.
Gabe Black [Tue, 4 Aug 2020 06:17:21 +0000 (23:17 -0700)]
scons: Make src/systemc/tests/SConscript python 3 compatible.

The os.path.walk method was removed in python 3. Replace it with os.walk
which is available in both python 2 and 3.

Change-Id: I7919b6a2063c65bc3619927aa4514d8d6d1b2038
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32123
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch: Use VPtr for uname.
Gabe Black [Thu, 7 May 2020 12:32:00 +0000 (05:32 -0700)]
arch: Use VPtr for uname.

Change-Id: Ia4b6c9135f16e6c68bbcf3a9c15ba7433a0a6682
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29403
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
4 years agosim: Convert stat functions to use VPtr.
Gabe Black [Thu, 7 May 2020 11:18:04 +0000 (04:18 -0700)]
sim: Convert stat functions to use VPtr.

Change-Id: I1fe43ad7508b5fbbcbf6c84195858455fc8f3e85
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29402
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons: Delete the now unused --update-ref option.
Gabe Black [Tue, 4 Aug 2020 05:43:09 +0000 (22:43 -0700)]
scons: Delete the now unused --update-ref option.

This option was for use with the old scons based regression tests.
Those had been deleted for a while, but some other bits and pieces
related to them were still lying around, depending on this option. Now
that those have been cleaned up, this option can go away.

Change-Id: I95b41dd0a14c51e74d1e527eb40e09f49aaeaf7e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32122
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons: Remove explicitly set defaults in calls to AddOption.
Gabe Black [Tue, 4 Aug 2020 04:51:17 +0000 (21:51 -0700)]
scons: Remove explicitly set defaults in calls to AddOption.

Like the optparse module's add_option method, most keyword arguments
have sensible default values. We should avoid setting those explicitly
when calling AddOption, since it usually doesn't make anything clearer
and just adds more text to wade through.

Change-Id: I70e425d9f1a0da1cafcc3d7dd24bfde18c0b3f35
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32116
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

4 years agoutils,tests: Enable passing of build args to compiler-tests.sh
Bobby R. Bruce [Thu, 23 Jul 2020 16:29:51 +0000 (09:29 -0700)]
utils,tests: Enable passing of build args to compiler-tests.sh

Previously we passed "-j `nproc`" to the scons. This a greedy approach
that should not be default. This change was introduced so the "-j" flag
may be passed via the "util/compiler-tests.sh" script.

Change-Id: I2e891ae3a9819770bd3ef15b95b81b7f5b71f7fa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31734
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil: Delete the util/regress script.
Gabe Black [Tue, 4 Aug 2020 05:42:30 +0000 (22:42 -0700)]
util: Delete the util/regress script.

This script was for running the old style scons based tests, but those
have all been deleted.

Change-Id: I644516a89ecafb611903ca304ced254e47e2e063
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32121
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>

4 years agotests: Get rid of the now unused diff-out script.
Gabe Black [Tue, 4 Aug 2020 05:39:38 +0000 (22:39 -0700)]
tests: Get rid of the now unused diff-out script.

This script had been used to compare the output of gem5 regression
tests to a golden reference, but all the tests that used it have been
deleted.

Change-Id: Ib65e4271ce8081dd5994b412ac2240869ab02d44
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32120
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>

4 years agotests: Get rid of the tests/testing python package.
Gabe Black [Tue, 4 Aug 2020 05:37:31 +0000 (22:37 -0700)]
tests: Get rid of the tests/testing python package.

This was used by the now deleted tests/tests.py script.

Change-Id: I18481b02a78432b88e6cd9226a4c046bc6433743
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32119
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>

4 years agotests: Get rid of the tests/tests.py script.
Gabe Black [Tue, 4 Aug 2020 05:31:04 +0000 (22:31 -0700)]
tests: Get rid of the tests/tests.py script.

This script was to manage and run the old style regression tests, which
have all been deleted.

Change-Id: I573f8e4ca0d61cb12de18f280ffabbb45a5443e8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32118
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>

4 years agoscons: Remove the plumbing for running regression tests from scons.
Gabe Black [Tue, 4 Aug 2020 05:22:20 +0000 (22:22 -0700)]
scons: Remove the plumbing for running regression tests from scons.

All of these tests have been migrated to the new framework, so there's
no reason to leave the old plumbing lying around.

Change-Id: Iaa5412864354d5754a68a9f53f30aa42f07ec2eb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32117
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>

4 years agoscons: Update some scons bug report URLs.
Gabe Black [Tue, 4 Aug 2020 02:52:47 +0000 (19:52 -0700)]
scons: Update some scons bug report URLs.

It appears that scons bugs are not on tigris.org any more and are now
on github, although fortunately old bugs seem to have been ported over
and have the same numbering.

This CL updates URLs which were in comments in the gem5 source,
specifically in scons scripts, to point to the corresponding github
version.

I also checked to see if these bugs were still open, or if we could
remove our workarounds for them.

1. 2356 is still open, and has been fairly recently assigned.
2. 2611 is marked as fixed. We might be able to implement the
   workaround in its last comment from August of 2019.
3. 2811 has been marked fixed, and as best I can tell the fix first
   appeared in around version 3.0 of scons. If/when that is our
   minimum version, we can remove the workaround in
   site_scons/site_tools/default.py. That is mostly fixing an annoying
   spurious rebuild by scons which does not affect correctness, so even
   if we remove that workaround we shouldn't break earlier versions,
   although it would be obnoxious for people that are affected by it
   and best avoided.

Change-Id: I0d74820f399044c6f80148bf3022d07d7bf6f4e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32114
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu-kvm: Add missing 'override' keyword
Hoa Nguyen [Mon, 3 Aug 2020 22:03:51 +0000 (15:03 -0700)]
cpu-kvm: Add missing 'override' keyword

clang requires all functions that override a member function to be
masked by the 'override' keyword. The missing 'override' in
timer.hh causes compiling issues while compiling gem5 with clang.
This commit adds the missing keyword.

Jira: https://gem5.atlassian.net/browse/GEM5-724

Change-Id: I3b5c7af666927b079a785803c8bb4869180ff777
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32095
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>