gem5.git
4 years agobase,sim: implement a faster mutex for single thread case
Earl Ou [Tue, 22 Sep 2020 06:06:30 +0000 (14:06 +0800)]
base,sim: implement a faster mutex for single thread case

This change applies an atomic variable to check if we really need to
obtain a mutex, and uses a condition variable to notify.

See about 5% improvement in the simulation speed.

Change-Id: I7e165987dcb587b27fae90978b9b3fde6f5563ef
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34915
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim: Remove check whether the System port is connected.
Gabe Black [Sat, 19 Sep 2020 06:07:00 +0000 (23:07 -0700)]
sim: Remove check whether the System port is connected.

The port will report an error if something tries to use it and
it's not connected. If it isn't needed, there's no reason to force
users to hook something up to it just to satisfy the check.

Change-Id: I0668b8a86c8cb323aba51670fb7914d35acc5198
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34815
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
4 years agobase: When creating an ELF file memory image, ignore empty segments.
Gabe Black [Fri, 25 Sep 2020 07:59:12 +0000 (00:59 -0700)]
base: When creating an ELF file memory image, ignore empty segments.

Sometimes ELF files have segments in them which are marked as loadable,
but which actually have zero size in memory. When setting up a memory
image we should drop those to avoid confusing other code which tries
to find the footprint of a memory image. No part of these segments,
including their starting address or ending address, need to actually
land on top of memory since they don't actually contain any data.

Change-Id: If8b61d10db139e0f688b6ceabcb8e6a898557469
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35156
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoext: Monkeypatch os.waitpid to extract CPU time from subprocess
Richard Cooper [Fri, 14 Aug 2020 11:19:55 +0000 (12:19 +0100)]
ext: Monkeypatch os.waitpid to extract CPU time from subprocess

Added utility class `TimedWaitPID` which monkey-patches os.waitpid()
with a functor that has the same signature, but calls os.wait4()
instead. This allows the process's user and system CPU time to be
obtained from the OS when using APIs (such as subprocess) which use
os.waitpid() internally.

The process CPU time is stored within the functor and can be read back
later by calling TimedWaitPID.get_time_for_pid().

JIRA: https://gem5.atlassian.net/browse/GEM5-548

Change-Id: I9ebe9ca1241a4f28c90ad31f672f32ac52786664
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32652
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
4 years agomisc: Merge branch 'release-staging-v20.1.0.0' into develop
Bobby R. Bruce [Fri, 25 Sep 2020 05:28:11 +0000 (22:28 -0700)]
misc: Merge branch 'release-staging-v20.1.0.0' into develop

Change-Id: I656a2d9512b1822a7e8d82606da7a0a5504d6820

4 years agobase: Minor cleanup of the ChunkGenerator.
Gabe Black [Mon, 7 Sep 2020 07:50:44 +0000 (00:50 -0700)]
base: Minor cleanup of the ChunkGenerator.

Minor style fixes, switched to Addr for some types so they'll definitely
be large enough.

Change-Id: I985004116c48ce6fb236c04e04fe54ed49a68277
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34177
Reviewed-by: Steve Reinhardt <stever@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agofastmodel: Update the IRIS ThreadContext base class.
Gabe Black [Thu, 24 Sep 2020 07:36:21 +0000 (00:36 -0700)]
fastmodel: Update the IRIS ThreadContext base class.

The syscall() method has been removed, and HTM related methods have
been added.

Change-Id: I796c1a554bfd4b1ee01a62c9c7ad403dd699cc0f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35038
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarm,fastmodel: Update the VExpressFastModel to use ArmInterruptPins.
Gabe Black [Thu, 24 Sep 2020 07:37:04 +0000 (00:37 -0700)]
arm,fastmodel: Update the VExpressFastModel to use ArmInterruptPins.

The HDLCD device now uses an ArmInterruptPin instead of a GIC and
interrupt number parameter.

Change-Id: I31122e66a1c18f61592f3dca214ee057baad8f88
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35039
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agofastmodel: Update for the isa_traits.hh changes.
Gabe Black [Thu, 24 Sep 2020 07:34:54 +0000 (00:34 -0700)]
fastmodel: Update for the isa_traits.hh changes.

arch/arm/isa_traits.hh no longer has using namespace ArmISA, and also
no longer directly or indirectly provides interrupt number related
constants.

Change-Id: Ieda31d1db4f85632a555b2f72ee8bff0aa159eee
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35037
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agogpu-compute: set exec_mask for permute,bpermute instructions
Kyle Roarty [Thu, 24 Sep 2020 03:25:02 +0000 (22:25 -0500)]
gpu-compute: set exec_mask for permute,bpermute instructions

This change sets gpuDynInst->exec_mask for permute and bpermute
instructions, fixing a bug where they would never write their data.

permute and bpermute instructions are load instructions that write
to a VGPR. Because of that, they use gpuDynInst->exec_mask when
checking what lanes should write to the VGPR.

gpuDynInst->exec_mask gets set to wf->execMask() as that is what other
load instructions that write to VGPRs do.

Change-Id: Ie443283488cbd2ab9c17fc255e7cc44418353419
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35036
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agogpu-compute: replace uint32_t* casts with bits API calls
Kyle Roarty [Wed, 16 Sep 2020 21:58:05 +0000 (16:58 -0500)]
gpu-compute: replace uint32_t* casts with bits API calls

The uint32_t* casting was challenging to fully understand what was
being done at a glance. Replaced with calls to various bits functions
as it's functionally equivalent and much more clear.

This also fixes a segfault in GPUInitAbi DPRINTFs from a mis-typed
uint32_t* cast.

Change-Id: Id5d1863942848dd7a9e5e17e8180c33adbc72f15
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34677
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agodev-arm: FVPBasePwrCtrl, fix vector resizing
Adrian Herrera [Wed, 8 Jul 2020 16:03:34 +0000 (17:03 +0100)]
dev-arm: FVPBasePwrCtrl, fix vector resizing

(1) ThreadContexts are registered into System in BaseCPU::init.
(2) FVPBasePwrCtrl state is resized based on registered ThreadContexts
in FVPBasePwrCtrl::init.

FVPBasePwrCtrl::init may be called before BaseCPU::init based on the
model names alphabetical order, leading to segmentation faults.
To fix this, (2) is now carried out in FVPBasePwrCtrl::startup.

Change-Id: Ica6c5b7448da556d61aee53f8777a709fcad2212
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35075
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu: Use cprintf and C++ type magic to get rid of a THE_ISA.
Gabe Black [Sat, 19 Sep 2020 06:28:40 +0000 (23:28 -0700)]
cpu: Use cprintf and C++ type magic to get rid of a THE_ISA.

It should be fine to let operator overloading take care of figuring out
how to print the ExtMachInst type for a given ISA.

Change-Id: I173fd9f49013d92191118775d20344219a69337e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34822
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons: Adjust the version of C++ to C++14.
Gabe Black [Fri, 18 Sep 2020 05:33:37 +0000 (22:33 -0700)]
scons: Adjust the version of C++ to C++14.

Change-Id: I318d337fc61bca0ae40413c23ee36d59d45a79bc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34820
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
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 agosystemc: avoid mutex lock in non async cases
Earl Ou [Thu, 17 Sep 2020 06:31:44 +0000 (14:31 +0800)]
systemc: avoid mutex lock in non async cases

Avoid acquiring a mutex lock in case there is no async update in the
scheduler. This helps increasing simulation speed by about 4%.

Change-Id: I971c7bf1a1eeb46208eeee6e5da6385c907092b3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34695
Reviewed-by: Earl Ou <shunhsingou@google.com>
Maintainer: Earl Ou <shunhsingou@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agodev-arm: Implement GICv4.1 GICD_TYPER2 as RES0
Giacomo Travaglini [Fri, 18 Sep 2020 08:01:34 +0000 (09:01 +0100)]
dev-arm: Implement GICv4.1 GICD_TYPER2 as RES0

If GICv4.1 is not implemented (our case) the register should be
treated as RES0

Change-Id: Ia60f6dce9741c34bf167805f60c3fc8bf0897510
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34875
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: TLBI ALLE2IS should broadcast to the IS domain
Giacomo Travaglini [Thu, 17 Sep 2020 15:46:27 +0000 (16:46 +0100)]
arch-arm: TLBI ALLE2IS should broadcast to the IS domain

This was implemented as a normal ALLE2 hence affecting the
current PE only

Change-Id: Ib369dd5a4b738daf96a01b5535d7481a97bb3730
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/+/34795
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil: add pkg-config to ubuntu all-dependencies Dockerfiles
Ciro Santilli [Fri, 18 Sep 2020 11:12:54 +0000 (12:12 +0100)]
util: add pkg-config to ubuntu all-dependencies Dockerfiles

Without this, HDF5 is not built, e.g. a run such as
http://jenkins.gem5.org/job/Nightly/68/console contains:

Checking for hdf5-serial using pkg-config... pkg-config not found
Checking for hdf5 using pkg-config... pkg-config not found
Checking for H5Fcreate("", 0, 0, 0) in C library hdf5... (cached) no
Warning: Couldn't find any HDF5 C++ libraries. Disabling
         HDF5 support.

This is done to increase coverage a bit, and serve as dependency
documentation to users.

Change-Id: Ibf820a3aa76c29eeee1201646924ee181615a162
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34777
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: Merge branch 'release-staging-v20.1.0.0' into develop
Bobby R. Bruce [Tue, 22 Sep 2020 01:48:12 +0000 (18:48 -0700)]
misc: Merge branch 'release-staging-v20.1.0.0' into develop

Change-Id: I1b33eeda67e7641ab71935e140fd24d4735be596

4 years agotests,base: Fixed unittests for .fast
Bobby R. Bruce [Mon, 21 Sep 2020 19:13:08 +0000 (12:13 -0700)]
tests,base: Fixed unittests for .fast

unittests.fast, unittests.prof, and unittests.perf had failing tests due
to the stripping of asserts via compiler optimization. This patch alters
the unittests to skip these tests when TRACING_ON == 0.

Change-Id: I2d4ab795ecfc2c4556b5eb1877635409d0836ec6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34898
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,cpu,sim: Route system calls through the workload.
Gabe Black [Sun, 23 Aug 2020 08:33:22 +0000 (01:33 -0700)]
arch,cpu,sim: Route system calls through the workload.

System calls should now be requested from the workload directly and not
routed through ExecContext or ThreadContext interfaces. That removes a
major special case for SE mode from those interfaces.

For now, when the SE workload gets a request for a system call, it
dispatches it to the appropriate Process object. In the future, the
ISA specific Workload subclasses will be responsible for handling system
calls and not the Process classes.

For simplicity, the Workload syscall() method is defined in the base
class but will panic everywhere except when SEWorkload overrides it. In
the future, this mechanism will turn into a way to request generic
services from the workload which are not necessarily system calls. For
instance, it could be a way to request handling of a page fault without
having to have another PseudoInst just for that purpose.

Change-Id: I18d36d64c54adf4f4f17a62e7e006ff2fc0b22f1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33282
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosim: Create a Workload object for SE mode.
Gabe Black [Sun, 23 Aug 2020 06:33:10 +0000 (23:33 -0700)]
sim: Create a Workload object for SE mode.

The workload object is still optional for the sake of compatibility,
even though it probably shouldn't be in the long term. If a simulation
is just a collection of components with nothing in particular running on
it, for instance driven by a traffic generator, should it even have a
System object in the first place?

Change-Id: I8bcda72bdfa3730248226fb62f0bba9a83243d95
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33278
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agodev: Stop using the OS page size in the IDE controller.
Gabe Black [Mon, 7 Sep 2020 07:51:54 +0000 (00:51 -0700)]
dev: Stop using the OS page size in the IDE controller.

This size was used to break up DMA transactions so that a single
transaction would not cross a page boundary. This was because on Alpha,
there was an actual page table which translated between PCI and DMA
address spaces. On all currently implemented systems, the mapping is
simply to add a scalar offset, so it's not possible for a legal region
of memory to be contiguous in one space but not in the other.

Additionally, if it *was* possible for there to be a mismatch, it was
only coincidence that Alpha used a page table which had the same sized
pages as it normally used. There is no requirement that there even would
be fixed sized pages in the first place.

To avoid this artificial dependency between the IDE controller and the
ISA, this change simply changes the chunk size for DMA accesses to 4K.
That's the page size at least on x86 and probably other architectures,
and will be a pretty close approximation of the previous behavior.

It's possible that even having this chunking in the first place is
unnecessary and functionally useless, but there are some checks which
happen between chunks, and changing how big they are would change the
frequency of those checks. For instance, the controller/disk may not
notice in the same amount of time if a DMA was cancelled somehow.

Change-Id: I1ec840d1f158c3faa31ba0184458b69bf654c252
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34178
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoscons: Increase the minimum clang version to 3.9.
Gabe Black [Fri, 18 Sep 2020 05:31:50 +0000 (22:31 -0700)]
scons: Increase the minimum clang version to 3.9.

This matches what's documented elsewhere. We *need* version 3.4 to
support c++14, but we support only as far back as 3.9. Also, the
argument to set c++14 as the standard is different in 3.4 and earlier
(-std=c++1y), so it makes life slightly easier to move past it to 3.9.

Change-Id: I66fa578dd3222c62907496a888f8068ed0918c7b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34819
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: Use M5_UNLIKELY with conditional DPRINTF family functions.
Gabe Black [Fri, 18 Sep 2020 03:50:27 +0000 (20:50 -0700)]
base: Use M5_UNLIKELY with conditional DPRINTF family functions.

Most DPRINTFs will be skipped over most of the time, and when they
aren't they'll already have overhead from string handling, output to the
console and/or a file, etc, which will drown out the behavior of a
branch.

Change-Id: I5475d7b5add63b44f60c0a1d46b4b14e6bf30fd3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34818
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: Use M5_UNLIKELY for conditional panic, etc., macros.
Gabe Black [Fri, 18 Sep 2020 03:46:19 +0000 (20:46 -0700)]
base: Use M5_UNLIKELY for conditional panic, etc., macros.

panic_if and fail_if should happen at most once in any given simulation,
and warn_if, etc., should still not happen most of the time.

Change-Id: Iaa6cb03c11b86d84f51cc4738efb8f203de4201c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34817
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 M5_LIKELY and M5_UNLIKELY macros to compiler.hh.
Gabe Black [Fri, 18 Sep 2020 03:44:47 +0000 (20:44 -0700)]
base: Add M5_LIKELY and M5_UNLIKELY macros to compiler.hh.

The clang/gcc implementation uses the nonstandard __builtin_expect(). In
C++20, new standard attributes can be used instead. We can't use those
yet though.

Change-Id: Idd2541a7eca0d97ac6c643abbf2910cbc343d7e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34816
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: Clear out some unnecessary ISA dependence in thread_context.hh.
Gabe Black [Sat, 19 Sep 2020 06:27:27 +0000 (23:27 -0700)]
cpu: Clear out some unnecessary ISA dependence in thread_context.hh.

The ISA version of the ISA class isn't used any more. Neither is
TheISA::MachInst.

Change-Id: I9085ad2b51ba19bf6e5bb17769dd048ac6384fec
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34821
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 agogpu: Stop using TheISA in the GPU TLB.
Gabe Black [Mon, 7 Sep 2020 07:08:58 +0000 (00:08 -0700)]
gpu: Stop using TheISA in the GPU TLB.

This class is defined inside the X86ISA namespace, so there's no point
in pretending it's generic. Remove TheISA and let the code access what
it needs from X86ISA naturally since it's there already.

Change-Id: I21b5d2d2b9af6aa0c10ddbb5b3ddca1692188dcc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34173
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>

4 years agotests: cleanup all SE tests previously moved to gem5-resources
Ciro Santilli [Mon, 14 Sep 2020 15:57:50 +0000 (16:57 +0100)]
tests: cleanup all SE tests previously moved to gem5-resources

The move was done at:
https://gem5-review.googlesource.com/c/public/gem5-resources/+/32074

All files keep exact same name, or are obvious renames like underscore to
-. threads/ is the only non obvious and remaps to src/simple/std_thread.cpp

Only m5-exit is left because it does squashfs generation which wasn't yet
moved.

Change-Id: I72ad104c9311c2f81af49458bdd44e24a6bafc0a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34476
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosystemc: Add a missing override.
Gabe Black [Fri, 18 Sep 2020 03:39:53 +0000 (20:39 -0700)]
systemc: Add a missing override.

A recent change accidentally left off the override, upsetting gcc.

Change-Id: I78cf1969aa6ac462539a2793a8a91dea32002f3a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34756
Maintainer: Gabe Black <gabeblack@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agogpu-compute: Fix deadlock in fetch_unit after branch instruction
Kyle Roarty [Tue, 15 Sep 2020 13:57:39 +0000 (08:57 -0500)]
gpu-compute: Fix deadlock in fetch_unit after branch instruction

The following deadlock was occuring in fetch_unit w/timingSim:
1. exec() is called, a wave is ready to fetch, so it sets pendingFetch
2. A packet is sent to ITLB to fetch for that wave
3. The wave executes a branch, causing the fetch buffer to be cleared
4. The packet is handled, and fetch() is called. However, because the
fetch buffer was cleared, it returns doing nothing.
5. exec() gets called again, but the wave will never be scheduled to
fetch, as pendingFetch is still set to true.

This patch clears pendingFetch (and dropFetch) before returning in fetch()
when the fetch buffer has been cleared.

dropFetch needed to be cleared otherwise gem5 would crash.

Change-Id: Iccbac7defc4849c19e8b17aa2492da641defb772
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34555
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
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 agoutil: Removed libelf-dev dep from Dockerfiles
Bobby R. Bruce [Wed, 16 Sep 2020 16:45:13 +0000 (09:45 -0700)]
util: Removed libelf-dev dep from Dockerfiles

The libelf-dev dependency is no longer required in our Dockerfiles.

This reverts commit 0cf67fb36281b17956d4dc10f05054bf711b4ba3,
https://gem5-review.googlesource.com/c/public/gem5/+/33596.

The libelf-dev dependency has been kept for the "all_dependencies"
Dockerfiles.

The corresponding Docker images have been built and uploaded to:
https://gcr.io/gem5-test.

Change-Id: Iacbd8240f69d476ad3a649baaccb6b85fec2487c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34676
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 an unmap_m5_mem() function to the m5 util's m5_mmap.*.
Gabe Black [Sat, 11 Apr 2020 06:06:16 +0000 (23:06 -0700)]
util: Add an unmap_m5_mem() function to the m5 util's m5_mmap.*.

This cleans up the mmap-ing. This is primarily used for testing since
the tests may end up mmap-ing the backing file many times, and we don't
want all those earlier mappings lying around.

This change also makes the original mmap-ing function close the file it
opens, since the man page for mmap explicitly says you can do that and
not lose the mapping. That means we don't have to keep track of the file
descriptor which corresponds to the mmap-ed file when we do the
unmapping, and it's slightly cleaner in general.

Change-Id: I90e3e755cebf3d03e2bf644adf8ef3e157236172
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27750
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Pouya Fotouhi <pfotouhi@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoutil: Add a "semi" call type unit test to the m5 utility.
Gabe Black [Fri, 10 Apr 2020 09:46:33 +0000 (02:46 -0700)]
util: Add a "semi" call type unit test to the m5 utility.

This is largely similar to the "inst" call type test since it's also
another form of illegal instruction, but there's more checking to do
since the way arguments are passed is more complex.

Change-Id: Ie61bb4da8befab579c3044fd2ddee753926de174
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27749
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: self-manage TimeSlot in Scheduler
Earl Ou [Wed, 16 Sep 2020 07:17:26 +0000 (15:17 +0800)]
systemc: self-manage TimeSlot in Scheduler

TimeSlot is new and deleted frequently. Having a recycling memory
manager can help saving the time spent new and delete. Tested and see
about 4% improvement in simulation speed.

Change-Id: I0ab173168336a883b85f768d7fdf07a936a14d69
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34615
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agosystemc: use list instead of map in scheduler
Earl Ou [Tue, 15 Sep 2020 05:07:25 +0000 (13:07 +0800)]
systemc: use list instead of map in scheduler

The queue in systemC scheduler is implemented as a std::map. This provides
the best big-O solution. However, most of simulation usecases has very
small number of pending events. This is expected as we usually only trigger a
few new events after some events are processed. In such scenario, we
should optimize for insert/erase instead of search. This change use
std::list instead of std::map.

As a proof, we can find that gem5's original event_queue is also
implemented as a list instead of tree.

We see 5% speed improvement with the example provided by Matthias Jung:
https://gist.github.com/myzinsky/557200aa04556de44a317e0a10f51840

Change-Id: I75c30df9134e94df42fd778115cf923488ff5886
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34515
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Merge branch 'release-staging-v20.1.0.0' into develop
Bobby R. Bruce [Thu, 17 Sep 2020 00:16:17 +0000 (17:16 -0700)]
misc: Merge branch 'release-staging-v20.1.0.0' into develop

Change-Id: I8c3277af7903f0b055b26e497139455a03678524

4 years agomisc: Add Matt Poremba as GPU maintainer
Jason Lowe-Power [Wed, 16 Sep 2020 17:12:37 +0000 (10:12 -0700)]
misc: Add Matt Poremba as GPU maintainer

Change-Id: I90494955b6db628695ef8a42111977decba27618
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34655
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoconfigs: Add special case in MemConfig
Jason Lowe-Power [Wed, 16 Sep 2020 00:59:51 +0000 (17:59 -0700)]
configs: Add special case in MemConfig

SimpleMemory doesn't implement a full MemCtrl interface. Thus, like the
NVM and HMC memories, we need to add a special case to MemConfig.py. The
--mem-type command line option now works for SimpleMemory and all of the
DRAM interfaces (it does not work for the NVM interfaces, though).

Issue-on: https://gem5.atlassian.net/browse/GEM5-777

Change-Id: I6d60649215be324bdd2a104b1976752f936c960e
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34595
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch,cpu: Get rid of the IsMemRef StaticInst flag.
Gabe Black [Sun, 30 Aug 2020 09:40:21 +0000 (02:40 -0700)]
arch,cpu: Get rid of the IsMemRef StaticInst flag.

A comment at the top of StaticInstFlags.py says that if IsMemRef is set,
exactly one of IsStore or IsLoad will be set. That's not strictly true
since IsAtomic may be set as well, in which case neither IsStore or
IsLoad will be set (in one example I found).

The isMemRef accessor still exists, and now just ors the IsStore,
IsLoad, and IsAtomic flags.

Change-Id: Ic5ff104da68978273977a6eff2abab5dd0ae7fda
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33744
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agobase: Create a SConscript for the loader subdirectory.
Gabe Black [Wed, 26 Aug 2020 04:48:04 +0000 (21:48 -0700)]
base: Create a SConscript for the loader subdirectory.

These files had been handled in base/SConscript, but there are enough of
them that they deserve their own.

Change-Id: I0c4166d8ff3c761c25940d2af5d7f0a9a6c874fa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33898
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

4 years agoarch,cpu: Rearrange StaticInst flags for memory barriers.
Gabe Black [Sun, 30 Aug 2020 09:28:33 +0000 (02:28 -0700)]
arch,cpu: Rearrange StaticInst flags for memory barriers.

There were three different StaticInst flags for memory barriers,
IsMemBarrier, IsReadBarrier, and IsWriteBarrier. IsReadBarrier was never
used, and IsMemBarrier was for both loads and stores, so a composite of
IsReadBarrier and IsWriteBarrier.

This change gets rid of IsMemBarrier and replaces by setting
IsReadBarrier and IsWriteBarrier at the same time. An isMemBarrier
accessor is left, but is now implemented by checking if both of the
other flags are set, and renamed to isFullMemBarrier to make it clear
that it's checking both for both types of barrier, not one or the other.

Change-Id: I702633a047f4777be4b180b42d62438ca69f52ea
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33743
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agobase: use setjmp to speed up fiber
Earl Ou [Fri, 11 Sep 2020 01:21:52 +0000 (09:21 +0800)]
base: use setjmp to speed up fiber

ucontext is an order of magnitude slower compared to most of the fiber
implementation, mainly due to the additional signal mask operation.

This change applies the trick provided in
http://www.1024cores.net/home/lock-free-algorithms/tricks/fibers,
which uses _setjmp/_longjmp to switch between contexts created by
ucontext.

Combine with NodeList improvement, we see 81% speed improvement with the
example provided by Matthias Jung:
https://gist.github.com/myzinsky/557200aa04556de44a317e0a10f51840

Compared with Accellera's SystemC, gem5 SystemC was originally 10x
slower, and with this change it's about 1.8x.

Change-Id: I0ffb6978e83dc8be049b750dc1baebb3d251601c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34356
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-ruby: Remove conditional includes based on THE_ISA in ruby.
Gabe Black [Tue, 15 Sep 2020 02:46:47 +0000 (19:46 -0700)]
mem-ruby: Remove conditional includes based on THE_ISA in ruby.

These were including instruction class definitions from x86 for some
reason. There was no code in those .cc files which actually used
anything from them, as evidenced by the fact that the GCN3_X86 build
still works. No other code in the file was conditionally compiled as of
today.

Change-Id: I3cef8348fb601dd7af67665cf64bbf514c91c3db
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34577
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agogpu: Fix a syntax error in X86GPUTLB.py.
Gabe Black [Tue, 15 Sep 2020 02:45:13 +0000 (19:45 -0700)]
gpu: Fix a syntax error in X86GPUTLB.py.

The recent changes which removed master/slave terminology also
accidentally deleted an "=", making the syntax in that file illegal.

Change-Id: I50aa945f0f66765db36775380b98a88caff23c13
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34576
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarm: Use zero initialization for the BigRegVect types.
Gabe Black [Tue, 15 Sep 2020 02:40:42 +0000 (19:40 -0700)]
arm: Use zero initialization for the BigRegVect types.

These were being initialized with BigRegVect brv = {0}, which made the
compiler complain because there is internal structure. The first element
of the union is actually an array, and this was telling it to initialize
that array to scalar 0. It was warning about this which was breaking the
build.

Instead, use zero initlization like BigRegVect brv = {}. This
initializes the first element of the union to all zeroes, with all
padding bits initialized to zero as well.

This satisfies the compiler and avoids a build error.

Change-Id: I31e7a8730c538637ff2e0c7fb00a4e12ed05e074
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34575
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomips,cpu: Eliminate the unused IsIndexed StaticInst flag.
Gabe Black [Sun, 30 Aug 2020 08:24:50 +0000 (01:24 -0700)]
mips,cpu: Eliminate the unused IsIndexed StaticInst flag.

It's set by some MIPS instructions, but does not have an accessor in
StaticInst and is not used by anything.

Change-Id: I3466f7d2723fb1b0ac195064867e3840e3a8f21b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33735
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem: Remove #if THE_ISA in the AbstractMemory class.
Gabe Black [Tue, 15 Sep 2020 03:15:37 +0000 (20:15 -0700)]
mem: Remove #if THE_ISA in the AbstractMemory class.

This used to guard the extraction of the endianness when tracing memory
accesses. Since that's now always possible even in NULL_ISA, we don't
need conditional compilation.

Change-Id: Ie5ec76f5b0f27dd4123bc0f0a4c02438bed629ad
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34499
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

4 years agocpu: Get rid of the unused IsMicroBranch StaticInst flag.
Gabe Black [Sun, 30 Aug 2020 09:51:21 +0000 (02:51 -0700)]
cpu: Get rid of the unused IsMicroBranch StaticInst flag.

This flag was never set, nor read.

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

4 years agox86,cpu: Get rid of the unused IsCC StaticInst flag.
Gabe Black [Sun, 30 Aug 2020 09:48:37 +0000 (02:48 -0700)]
x86,cpu: Get rid of the unused IsCC StaticInst flag.

This flag was set when some registers were used in x86, but never
actually checked by anything.

Change-Id: Id0f9847aeca5017455929ab4bbf28210288a3553
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33741
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

4 years agomips,cpu: Get rid of the IsDpsOp StaticInst flag.
Gabe Black [Sun, 30 Aug 2020 08:46:31 +0000 (01:46 -0700)]
mips,cpu: Get rid of the IsDpsOp StaticInst flag.

This flag was set by MIPS for a few instructions, but didn't have an
accessor in StaticInst and was never used for anything.

Change-Id: I153cedde0d16cb1d78b2705bd7340ebfd10e4fb6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33740
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Merge branch 'release-staging-v20.1.0.0' into develop
Bobby R. Bruce [Tue, 15 Sep 2020 16:03:55 +0000 (09:03 -0700)]
misc: Merge branch 'release-staging-v20.1.0.0' into develop

Change-Id: I1eacbc5719aa85c5a7650ec33fd99f673fdf443d

4 years agocpu,misc: Revert problematic terminology renames in BaseCPU
Bobby R. Bruce [Tue, 15 Sep 2020 03:29:24 +0000 (20:29 -0700)]
cpu,misc: Revert problematic terminology renames in BaseCPU

Due to gem5's use of duck-typing, we must termorarly revert the
terminology in BaseCPU back to master/slave to avoid issues.

This fixes https://gem5.atlassian.net/browse/GEM5-775.

Change-Id: Idf1cb99aa9568ee70943ebec96f27394d8167f8c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34495
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
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 agosystemc: avoid dynamic_cast in the critical path
Earl Ou [Fri, 11 Sep 2020 01:03:04 +0000 (09:03 +0800)]
systemc: avoid dynamic_cast in the critical path

NodeList is in the critical path of the systemc scheduler in gem5. A
unnecessary dynamic_cast in the NodeList slow down the event process by
about 15%. Fix the issue by avoiding dynamic_cast.

We see about 15% speed improvement on the example provided by Matthias Jung:
https://gist.github.com/myzinsky/557200aa04556de44a317e0a10f51840

Compare with Accellera implementation, gem5 version is originally 10x
slower and now it's about 8.5x slower.

Change-Id: I3b4ddca31e58e1d4e96144a4021b0a5bb956fda4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34355
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomips,cpu: Get rid of the IsIprAccess StaticInst flag.
Gabe Black [Sun, 30 Aug 2020 08:38:47 +0000 (01:38 -0700)]
mips,cpu: Get rid of the IsIprAccess StaticInst flag.

This was set by MIPS in two places, I think largely just because it was
available. This flag refers to IPRs which are an Alpha concept. In the
O3 CPU, IsIprAccess was used as a possible indicator to determine if an
instruction IsSerializeBefore, but we've already got a flag for that. In
the minor CPU, which hasn't been made to work with MIPS as far as I
know, it was used in a condition but not mentioned in the comment
alongside the condition. I think there it was added for the sake of
Alpha.

This change eliminates that flag and removes it from the O3 and minor
CPUs. In the MIPS ISA description, the instructions that were marked as
IsIprAccess have now been marked as IsSerializeBefore since, if there
was a real reason for them to be marked as IsIprAccess, it would have
been to get it them to work in O3, and there IsSerializeBefore gets
equivalent behavior.

Change-Id: Ia874cde12fa70b998d3e638458f13d69798d40b7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33739
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
4 years agomips,cpu: Get rid of the IsERET StaticInst flag.
Gabe Black [Sun, 30 Aug 2020 08:32:43 +0000 (01:32 -0700)]
mips,cpu: Get rid of the IsERET StaticInst flag.

This is set by MIPS but doesn't have an accessor in StaticInst, and
isn't used by anything.

Change-Id: Ie28d2df134dcf264bca17c9c66dd32515a240492
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33738
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
4 years agocpu: Get rid of the IsThreadSync StaticInst flag.
Gabe Black [Sun, 30 Aug 2020 08:31:20 +0000 (01:31 -0700)]
cpu: Get rid of the IsThreadSync StaticInst flag.

This flag was never set and only checked in one place. If it was set, it
would have triggered a panic there.

Change-Id: I934a0346837c66bae8ce06f50027003bfd47083d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33737
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomips,cpu: Get rid of the IsCondDelaySlot StaticInst flag.
Gabe Black [Sun, 30 Aug 2020 08:29:18 +0000 (01:29 -0700)]
mips,cpu: Get rid of the IsCondDelaySlot StaticInst flag.

This is set by MIPS in a few places, but not actually used by anything.

Change-Id: Iaf3b29b2c14bb1de3ffd6a0035f12f238591cb60
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33736
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
4 years agosparc,sim: Remove special handling of SPARC in the clone system call.
Gabe Black [Mon, 7 Sep 2020 02:03:12 +0000 (19:03 -0700)]
sparc,sim: Remove special handling of SPARC in the clone system call.

We can set the extra syscall return values in the ISA specific archClone
function. We don't need a special #ifdef to handle them.

Change-Id: I82904b3d4bdf211c89d271d7277a60151191cdfc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34167
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
4 years agomem-ruby: Update port names in Ruby
Jason Lowe-Power [Fri, 11 Sep 2020 20:26:29 +0000 (13:26 -0700)]
mem-ruby: Update port names in Ruby

After the terminology update commit there were still many confusing
names in the Ruby ports. This changeset is a proposal for updating these
names.

For an example use case, see the following resources changeset.
https://gem5-review.googlesource.com/c/public/gem5-resources/+/34416

Change-Id: I01d4f24a70b300e39438ee147dfab7a8d674d5c7
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34417
Reviewed-by: Ayaz Akram <yazakram@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agotests: Remove MIPS from Learning gem5 tests
Jason Lowe-Power [Fri, 11 Sep 2020 18:32:05 +0000 (11:32 -0700)]
tests: Remove MIPS from Learning gem5 tests

Change-Id: Iffd9f5da188cac26ac75a8109886c36789956959
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34415
Reviewed-by: mike upton <michaelupton@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agodev: Fix port name in x86 device
Jason Lowe-Power [Fri, 11 Sep 2020 20:32:06 +0000 (13:32 -0700)]
dev: Fix port name in x86 device

Change-Id: I7704109287b9a1a09e51da3c62c29720631ce87e
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34435
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agostats: Move global CPU stats to BaseCPU
Andreas Sandberg [Fri, 11 Sep 2020 18:01:44 +0000 (19:01 +0100)]
stats: Move global CPU stats to BaseCPU

We currently register global CPU statistics such as sim_insts and
sim_ops from stat_control.cc. This adds an undesriable dependency on
BaseCPU from stats_contro.cc. Move the CPU-specific stats to a global
stat group in BaseCPU. This group is merged with the Root object's
stats which means that they appear as global stats in a typical stat
dump.

Care has been taken to keep the old stat names. However, the order of
the stats.txt will be slightly different due to the way legacy stats
and new-style stats are serialised.

Change-Id: I5410bc432f1a8cf3de58b08ca54a1aa2711d9c76
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34395
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agobase, sim, mem, arch: Remove the dummy CPU in NULL
Andreas Sandberg [Mon, 7 Sep 2020 11:34:02 +0000 (12:34 +0100)]
base, sim, mem, arch: Remove the dummy CPU in NULL

The NULL ISA target has a dummy BaseCPU class that doesn't seem to be
needed anymore. Remove this class and the some unnecessary includes.

Change-Id: I031c999b3c0bb8dec036ad087a3edb2c1c723501
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34236
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: Fix ArmISA namespace requirement for Arm KVM
Giacomo Travaglini [Fri, 11 Sep 2020 20:40:54 +0000 (21:40 +0100)]
arch-arm: Fix ArmISA namespace requirement for Arm KVM

This is needed after:

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

Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I614b908a48145d8c2f5e8b8177448e3269f8dac9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34418
Reviewed-by: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomisc: Update documentation of SimObject related APIs
Muhammad Sarmad Saeed [Fri, 24 Jul 2020 22:08:27 +0000 (22:08 +0000)]
misc: Update documentation of SimObject related APIs

Updated documentation of Drain, Serialize, Evnet queue and Simobject
APIs. Made some corrections to where the documentation was available
in the code but did not appear in the documentation.

Change-Id: I5254e87eb5663232e824bcd5592da0a04eba673b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31814
Reviewed-by: Ayaz Akram <yazakram@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-garnet: Upgrade garnet version to 3.0
Srikant Bharadwaj [Thu, 10 Sep 2020 07:39:45 +0000 (03:39 -0400)]
mem-garnet: Upgrade garnet version to 3.0

This version of garnet includes HeteroGarnet which
supports heterogenous interconnect systems, flexible
router and link configurations, and better debugging
resources.
This patch changes the garnet directory structure
to not include the version number. The user will be
informed about the garnet version being used.

Change-Id: Id4763421528305193ae0cd10c159b385a9513553
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34259
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: Initialize some cases of destReg
Jason Lowe-Power [Thu, 10 Sep 2020 21:58:15 +0000 (14:58 -0700)]
arch-arm: Initialize some cases of destReg

Some compilers complained that this variable may be uninitialized. This
change initializes it to 0.

Change-Id: I201d75ba05ce49d13bbaf4d67e1c728ef704fdf0
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34335
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: mike upton <michaelupton@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agotests: Update x86 system.py for MemCtrl interface
Jason Lowe-Power [Thu, 10 Sep 2020 19:06:56 +0000 (12:06 -0700)]
tests: Update x86 system.py for MemCtrl interface

Change-Id: If4103b197720f74df70d0a24602e2b3715936826
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34315
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: mike upton <michaelupton@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agomem-garnet: Allow empty vnet list for garnet network links
Srikant Bharadwaj [Thu, 10 Sep 2020 06:33:51 +0000 (02:33 -0400)]
mem-garnet: Allow empty vnet list for garnet network links

An empty supporting_vnet list is the default and implies that
all vnets are supported. This removes the assert which requires
the list to have a minimum list size of 1.

Change-Id: I6710ba06041164bbd597d98e75374a26a1aa5655
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34258
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 agomem-garnet: Fix default value of network bridge
Srikant Bharadwaj [Thu, 10 Sep 2020 06:31:43 +0000 (02:31 -0400)]
mem-garnet: Fix default value of network bridge

Initializing the network bridge with NULL causes it to have
an class error when instatiating a link. The bridge is only
needed whne either a CDC or SerDes is enabled. This is handled
later during construction of the GarnetLink.

Change-Id: If19a21a6d9bf49449b9c390467d08d3422ae991a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34257
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: Replaced master/slave terminology
Shivani Parekh [Mon, 24 Aug 2020 18:47:44 +0000 (11:47 -0700)]
misc: Replaced master/slave terminology

Change-Id: I4df2557c71e38cc4e3a485b0e590e85eb45de8b6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33553
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoconfigs,python: Fixes an issue with python3 and the config scripts when restoring...
Dimitrios Chasapis [Thu, 10 Sep 2020 11:53:35 +0000 (13:53 +0200)]
configs,python: Fixes an issue with python3 and the config scripts when restoring a checkpoint

Fixes a compatibility issue with the configuration scripts when trying to restore a checkpoint.  Since python2.4 list.sort has an updated interface.  The older one has been dropped in python3.

Jira Issue: https://gem5.atlassian.net/browse/GEM5-754

Change-Id: I09f819057d510e477d6ceae0356fafad40f4280d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34295
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: cross-compiling hello binaries for hello_se tests.
Mahyar Samani [Sat, 2 May 2020 02:19:19 +0000 (02:19 +0000)]
tests: cross-compiling hello binaries for hello_se tests.

Some of the hello_se tests fail due to different syntax of the string
for different isas. This patch adds makefiles for cross-compiling the
hello.c file located at tests/test-progs/hello/src/.

Change-Id: I8ccfc0487020df9da722a97e57310db2d2e8882c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28528
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu: Fixed unused var error when with fast builds
Bobby R. Bruce [Thu, 10 Sep 2020 05:26:29 +0000 (22:26 -0700)]
cpu: Fixed unused var error when with fast builds

As `is_htm_speculative` is only used in assert statements, it is
considered unused during the `.fast` compilation. This commit adds the
`M5_USED_VAR` macro.

This caused our compiler tests to fail:
https://www.mail-archive.com/gem5-dev@gem5.org/msg35913.html

Change-Id: I00d187d1a31d065c236ac29a657bd479ad4b03bc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34256
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarch-arm: just return the fault in twoEqualRegInst{,Fp}
Iru Cai [Thu, 10 Sep 2020 06:18:19 +0000 (14:18 +0800)]
arch-arm: just return the fault in twoEqualRegInst{,Fp}

This prevents the code from using the uninitialized destReg when
running the ``if (imm >= eCount)`` branch, which will make GCC 10.2
report a -Werror=maybe-uninitialized error when building gem5.opt.

Change-Id: Ie6e7d3d47a1b65b840b2106263ecfc21eb6af26b
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34275
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: Fix build errors with gcc 10.2
Iru Cai [Fri, 21 Aug 2020 07:11:39 +0000 (15:11 +0800)]
arch-arm: Fix build errors with gcc 10.2

The "-Werror=type-limits" flag in GCC 10.2 reports these errors,
because ``imm`` in neon.isa, and ``imm`` and ``count`` in sve.isa are
unsigned, and they're used to do ``imm < 0`` and ``imm * count >= 0``
comparison.

Change-Id: I33934357f578a9fc1040a6d9c08ea929fb36eb47
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33154
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agodev: Use the new ByteOrder param type in VirtIO devices
Andreas Sandberg [Mon, 24 Aug 2020 17:00:57 +0000 (18:00 +0100)]
dev: Use the new ByteOrder param type in VirtIO devices

VirtIO devices currently request their endianness from the System
object. Instead of explicitly querying the system for its endianness,
expose the device's endianness as a param. This param defaults to the
endianness of a parent object using the Parent proxy (in practice the
system).

Change-Id: If4f84ff61f4d064bdd015a881790f5af03de6535
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33296
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
4 years agodev: Use the new ByteOrder param type in SimpleUart
Andreas Sandberg [Mon, 24 Aug 2020 16:55:45 +0000 (17:55 +0100)]
dev: Use the new ByteOrder param type in SimpleUart

Use the new ByteOrder param type in SimpleUart. The default value is
currently little endian. However, it is expected that most users of
this device will use single-byte accesses which aren't affected by
endianness.

Change-Id: I3f5d4ea566e5127474cff976332bd53c5b49b9e2
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33295
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
4 years agofastmodel: Add an ISA class which defers to IRIS.
Gabe Black [Mon, 18 May 2020 13:10:15 +0000 (06:10 -0700)]
fastmodel: Add an ISA class which defers to IRIS.

This class is just to enable checkpointing of "ISA" state, aka the
MiscRegs.

Change-Id: I45315b8aaa09aaf6230f44665c13597400efd780
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29822
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agofastmodel: Create a fake "Interrupts" object for fast model CPUs.
Gabe Black [Tue, 5 May 2020 05:44:02 +0000 (22:44 -0700)]
fastmodel: Create a fake "Interrupts" object for fast model CPUs.

This object doesn't actually manage interrupts since the fast model
CPUs do that on their own, it just checkpoints interrupt related state.

Change-Id: I9d3a6354b02e4ae7bfd032c50e51a3a841b81388
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29821
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-mips: Replaced `BigEndianByteOrder` in MIPS
Bobby R. Bruce [Thu, 10 Sep 2020 00:24:05 +0000 (17:24 -0700)]
arch-mips: Replaced `BigEndianByteOrder` in MIPS

The following change removed the `BigEndianByteOrder` enum and replaced
it with `ByteOrder:big`:
https://gem5-review.googlesource.com/c/public/gem5/+/33174

This change was not propogated to `src/arch/mips/isa/decoder.isa` and
`src/arch/mips/isa/formats/mem.isa`, and therefore caused compilation
errors. This caused the Nightly Build to fail:
https://www.mail-archive.com/gem5-dev@gem5.org/msg35900.html

This commit fixes this error.

Change-Id: I3967eb9e9236a7a95318c17ca410b613b8473eed
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34255
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-arm: Fix ArmISA namespace requirement for TME instructions
Giacomo Travaglini [Wed, 9 Sep 2020 09:33:58 +0000 (10:33 +0100)]
arch-arm: Fix ArmISA namespace requirement for TME instructions

This is needed after:

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

Change-Id: I8ef0b5ce9cd5ae5224331e1c9347fdd9e884a536
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34235
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu-o3: convert rename to new style stats
Emily Brickey [Tue, 25 Aug 2020 21:11:47 +0000 (14:11 -0700)]
cpu-o3: convert rename to new style stats

Change-Id: Id34a85e40ad7e83d5805a034df6e0c5ad9b9af82
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33397
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-o3: convert rob to new style stats
Emily Brickey [Tue, 25 Aug 2020 21:42:27 +0000 (14:42 -0700)]
cpu-o3: convert rob to new style stats

Change-Id: I84430d50c49742cd536dd75ce25184c2316dce51
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33398
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu-o3: convert lsq_unit to new style stats
Emily Brickey [Tue, 25 Aug 2020 16:39:48 +0000 (09:39 -0700)]
cpu-o3: convert lsq_unit to new style stats

Removes unused stats: invAddrLoads, invAddrSwpfs, lsqBlockedLoads

Change-Id: Icd7fc6d8a040f4a1f9b190409b7cdb0a57fd68cf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33394
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-o3: convert decode to new style stats
Emily Brickey [Mon, 24 Aug 2020 16:58:30 +0000 (09:58 -0700)]
cpu-o3: convert decode to new style stats

Change-Id: Ia67a51f3b2c2d40d8bf09f1636c721550f5e9a23
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33316
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>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agocpu-o3: convert commit to new style stats
Emily Brickey [Wed, 19 Aug 2020 19:20:25 +0000 (12:20 -0700)]
cpu-o3: convert commit to new style stats

Change-Id: I859fe753d1a2ec2da8a4209d1db122f1014af5d6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33315
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 agosim: Expose the system's byte order as a param
Andreas Sandberg [Fri, 21 Aug 2020 10:55:00 +0000 (11:55 +0100)]
sim: Expose the system's byte order as a param

There are cases where a system's byte order isn't well-defined from an
ISA. For example, Arm implementations can be either big or little
endian, sometimes depending on a boot parameter. Decouple the CPU byte
order from the System's default byte order by exposing the System's
byte order as a parameter that defaults to big endian for SPARC and
POWER and little endian for everything else.

Change-Id: I24f87ea3a61b05042ede20dea6bb056af071d2c0
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33175
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
4 years agomem: Remove the unused nvm private member from NVMInterface::Rank.
Gabe Black [Wed, 9 Sep 2020 00:49:46 +0000 (17:49 -0700)]
mem: Remove the unused nvm private member from NVMInterface::Rank.

This unused (and otherwise unusable) member caused a compiler warning
and broke the build for me. It can be reintroduced if used in the
future.

Change-Id: I48181f6bca60c059e74727290950adfb9a194680
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34217
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: Fix style and add overrides to bas_dyn_inst.hh.
Gabe Black [Wed, 9 Sep 2020 00:46:39 +0000 (17:46 -0700)]
cpu: Fix style and add overrides to bas_dyn_inst.hh.

Either return types, brackets and the function body should all be on
their own line, or the entire function should be on a single line.

Consistently place the * or & up against the variable name and not the
type name. There isn't an official rule for which to use, but the
majority of existing uses were this way.

Add overrides for overridden virtual methods.

These fixes get rid of compiler warnings which are breaking the build
for me.

Change-Id: Ifc6ace4794a66ffd031ee686f6b6ef888004d786
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34216
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: Add a virtual destructor to BaseHTMCheckpoint.
Gabe Black [Wed, 9 Sep 2020 00:45:16 +0000 (17:45 -0700)]
arch: Add a virtual destructor to BaseHTMCheckpoint.

Since it has virtual methods, it should also have a virtual destructor.
My compiler complains otherwise, which breaks my build.

Change-Id: I44bba97b76931bab6e3511fcdee79831080c12d4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34215
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-minor: convert fetch2 to new style stats
eavivi [Wed, 2 Sep 2020 17:35:27 +0000 (10:35 -0700)]
cpu-minor: convert fetch2 to new style stats

Change-Id: Idfe0f1f256c93209fe51140b9cab3b454153c597
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33975
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 agoarm: Remove "using namespace ArmISA" from arch/arm/isa_traits.hh.
Gabe Black [Sun, 6 Sep 2020 12:01:48 +0000 (05:01 -0700)]
arm: Remove "using namespace ArmISA" from arch/arm/isa_traits.hh.

This has been in this file since it was created in 2009. No global "using
namespace ${NAMESPACE}" should ever appear in a .hh file since then that
namespace is "used" in all files that include the .hh, even if they
aren't aware of it or even actively don't want to.

Change-Id: Idb7d7c5b959077eb4905fbb2044aa55959b8f37f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34155
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-arm: Transactional Memory Extension (TME)
Timothy Hayes [Fri, 25 Oct 2019 14:33:18 +0000 (15:33 +0100)]
arch-arm: Transactional Memory Extension (TME)

This patch extends the generic hardware transactional memory support in
Ruby and the O3/TimingSimpleCPU cores with the Arm-specific hardware
transactional memory architectural extensions (TME).

JIRA: https://gem5.atlassian.net/browse/GEM5-588

Change-Id: I8c663da977ed3e8c94635fcb11834bd001e92054
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30329
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

4 years agobase,misc: Add group definitions for newly tagged API in src/base
Hoa Nguyen [Thu, 20 Aug 2020 18:48:02 +0000 (11:48 -0700)]
base,misc: Add group definitions for newly tagged API in src/base

Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Change-Id: If2f5ce3bc4f5d0a8cc31def17702223a27e6970e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33034
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 agomem-ruby: Check number of vnets when creating links
Michael Boyer [Tue, 28 Apr 2020 18:02:41 +0000 (14:02 -0400)]
mem-ruby: Check number of vnets when creating links

Added error checking to ensure that the system has sufficient virtual
networks when setting latency and weight values.

Change-Id: I1b28144bbe9fefab0c0a6227f1fdf4ea10403061
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32603
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

4 years agodev,arm: Use the ArmSystem::PageBytes constant in the generic timer.
Gabe Black [Mon, 7 Sep 2020 06:21:48 +0000 (23:21 -0700)]
dev,arm: Use the ArmSystem::PageBytes constant in the generic timer.

This component very specific to ARM, and so there's no reason to use
generic interfaces to get the page size.

Change-Id: Id757b5742c807c5f616a6dc8df94a7709932d071
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34171
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
4 years agoarm: Replicate the PageBytes constant in the ArmSystem class.
Gabe Black [Mon, 7 Sep 2020 06:20:17 +0000 (23:20 -0700)]
arm: Replicate the PageBytes constant in the ArmSystem class.

When isa_traits.hh hopefully goes away in the not too distant future,
this constant will need somewhere to live so ARM components can find it.
There are valid arguments that this should not be a constant in the
first place, but that's outside the scope of this change.

Change-Id: Ic5bd046dc1cc196b3cf6b6c36878fdbf5eb4c0bf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34170
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>