gem5.git
6 years agotests: Move the trietest unit test into base.
Gabe Black [Sun, 3 Dec 2017 09:59:39 +0000 (01:59 -0800)]
tests: Move the trietest unit test into base.

This puts it alongside trie.hh, the header file it tests.

Change-Id: Id8ca0c1d68bdc01807c5ba4b51c0142b1221385d
Reviewed-on: https://gem5-review.googlesource.com/6281
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
6 years agotests: Plumb dumps of the test trie into the gtest macros.
Gabe Black [Sun, 3 Dec 2017 09:53:18 +0000 (01:53 -0800)]
tests: Plumb dumps of the test trie into the gtest macros.

With this change, when one of the tests fails, it will output a dump
of the trie data structure, making it a little easier to tell what
happened.

Change-Id: I0816ed727ef0b50fefd7ec485356b4fe8790bfe1
Reviewed-on: https://gem5-review.googlesource.com/6267
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
6 years agotests: Convert the trie unit test into a gtest.
Gabe Black [Sun, 3 Dec 2017 09:42:22 +0000 (01:42 -0800)]
tests: Convert the trie unit test into a gtest.

Change-Id: Idcf60260d9bda1b8ef5b6f5d59b74ca218395f0c
Reviewed-on: https://gem5-review.googlesource.com/6265
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
6 years agotests: Add an implementation of the Logger interface for use gtests.
Gabe Black [Sun, 3 Dec 2017 09:39:41 +0000 (01:39 -0800)]
tests: Add an implementation of the Logger interface for use gtests.

On exiting log types (panic and fatal), the message is set to an
ADD_FAILURE_AT macro, and the test is exited by throwing an otherwise
unexpected exception. On non-exiting log types, the message is sent to
the SUCCEEDED macro which currently doesn't output anything.

Change-Id: I1bb569e6cb8308dbc4c3e04eea7a962bd2b1ddd8
Reviewed-on: https://gem5-review.googlesource.com/6264
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
6 years agomisc: Rework the logging functions.
Gabe Black [Sun, 3 Dec 2017 09:22:38 +0000 (01:22 -0800)]
misc: Rework the logging functions.

Removed the "verbose" switch which wasn't used.

Replaced the "get(LogLevel)" function with a get for each level. The
parameter was always constant, so we can just call the right function
at the right time.

Made the "exit" behavior of panic/fatal a part of the logging
implementation so that it can be overridden, and corrected a comment
which said that both fatal and panic called ::abort().

Got rid of the printEpilogue function by reworking the print() methods.
The subclasses of Logger can now override a "log" function which takes
a composed message, letting the Logger class centralize how the message
is put together and leaving the actual output mechanism to the
subclass.

Unfortunately there wasn't a way to tell gcc that the panic/fatal
macros wouldn't return, so there needed to be an exit_helper wrapper
function which calls the actual logger exit function. That can be
marked as noreturn, unlike the virtual exit function. If the exit
function does return, the wrapper will call ::abort(), placating gcc
and ensuring that even if exit isn't implemented properly, exit_helper
will still not return. That also provides a handy default
implementation.

Change-Id: I66d0cebd59f1127db980f3b565dbdf60687d8862
Reviewed-on: https://gem5-review.googlesource.com/6263
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoconfig: Fix need to set ISA of switch cpus.
Austin Harris [Sat, 2 Dec 2017 23:03:28 +0000 (17:03 -0600)]
config: Fix need to set ISA of switch cpus.

Since BaseCPU.createThreads() no longer overrides the BaseCPU.isa
parameter, switch_cpus should have the ISA copied. This fixes a
fatal error in BaseCPU when restoring from a checkpoint.

Change-Id: I4fdcacb76da46bdbe1ce37dcf05c5a6a8a9e5237
Signed-off-by: Austin Harris <austinharris@utexas.edu>
Reviewed-on: https://gem5-review.googlesource.com/6241
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agoarm: Change access permission in TPIDRURO and TPIDRURW
Giacomo Travaglini [Thu, 30 Nov 2017 13:35:05 +0000 (13:35 +0000)]
arm: Change access permission in TPIDRURO and TPIDRURW

This patch corrects the TPIDRURO and TPIDRURW access flags: TPIDRURO is
now readable in secure user mode, an TPIDRURW is readable and writable
in secure user mode.

Change-Id: I6293d9a3bcc7adc0f655bf98d29aca51eca5a002
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Chuan Zhu <chuan.zhu@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6381
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agox86,misc: add additional info on faulting X86 instruction, fetched PC
Matt Sinclair [Thu, 7 Dec 2017 01:29:11 +0000 (20:29 -0500)]
x86,misc: add additional info on faulting X86 instruction, fetched PC

Print faulting instruction for unmapped address panic in faults.cc
and print extra info about corresponding fetched PC in base.cc.

Change-Id: Id9e15d3e88df2ad6b809fb3cf9f6ae97e9e97e0f
Reviewed-on: https://gem5-review.googlesource.com/6461
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agotests: Accept SourceFilters as sources for GTest.
Gabe Black [Sun, 3 Dec 2017 09:20:12 +0000 (01:20 -0800)]
tests: Accept SourceFilters as sources for GTest.

This change introduces the idea of a SourceFilter which is an object
that can filter a SourceList and which can be composed with other
SourceFilters using | and & operators. This means a filter can be
constructed ahead of time, possibly before all sources have been
discovered, and then later applied to any SourceList necessary.

This change also modifies GTest so that it accepts SourceFilters in
addition to normal source files. These filters will be applied to the
final list of all sources, and the result included in the build for
that test.

By default, gtests will build in all sources tagged with 'gtest lib'.
This change also introduces the keyword argument "skip_lib" which will
exclude those files. They can then be left out entirely, or they can be
re-included as part of a more elaborate filter. That would be useful if
someone wanted to write a unit test for, for instance, the warn, etc.
macros which rely on the gtest logging support. Those classes could
be replaced by something under the control of the unit test, while
still including the rest of the gtest library.

Change-Id: I13a846dc884b86b9fdcaf809edefd57bb4168b8e
Reviewed-on: https://gem5-review.googlesource.com/6262
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: Add a pseudo target to run all the unit tests for build/variant.
Gabe Black [Sun, 3 Dec 2017 10:10:42 +0000 (02:10 -0800)]
tests: Add a pseudo target to run all the unit tests for build/variant.

Telling scons to build build/${BUILD_OPTS}/unittests.${VARIANT} will
get it to build and run all googletest based unit tests under the
${BUILD_OPTS} build options (ARM, ALPHA, X86, etc.), and compiled with
the flags, etc., for the ${VARIANT} variant (ie. opt, debug, etc.).

This will make it easy to run the unit tests without having to actually
know where they are, what tests are available, etc.

This target is called unittests* and not something based on gtest or
googletest since it's my intention for all unit tests to be based on
googletest, making the distinction unnecessary. Since the target is
essentially part of the external interface for scons, I wanted to name
it something general so it'll be less likely that we have to change it.

Change-Id: I8fdec768d821974309c92a2ce4c96dce7df24fa5
Reviewed-on: https://gem5-review.googlesource.com/6282
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agoarch-riscv: Move compressed ops out of ISA
Alec Roelke [Fri, 10 Nov 2017 20:46:11 +0000 (15:46 -0500)]
arch-riscv: Move compressed ops out of ISA

This patch moves static portions of the compressed instruction
definitions out of the ISA generated code.

Change-Id: I61daae8b8c03a9e0f012790a132aa4d34a6ec296
Reviewed-on: https://gem5-review.googlesource.com/6026
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agox86: Split apart x87's FSW and TOP, and add a missing break.
Gabe Black [Wed, 6 Dec 2017 01:49:51 +0000 (17:49 -0800)]
x86: Split apart x87's FSW and TOP, and add a missing break.

The FSW and TOP values are technically part of the same register, but
they have very different behaviors. One of them can be renamed and
float along without affecting global state, while the other requires
serialization. They just need to *look* like the same register when
read by the user.

Also, there was a missing break in setMiscRegNoEffect.

Change-Id: If58de0f566f65068208240f4001209fb9e1826d6
Reviewed-on: https://gem5-review.googlesource.com/6441
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agomisc: Update MAINTAINERS with learning-gem5 tag
Jason Lowe-Power [Tue, 5 Dec 2017 17:18:44 +0000 (09:18 -0800)]
misc: Update MAINTAINERS with learning-gem5 tag

Change-Id: Ic91fb1d9b2c3c42946cb84c1ec52d9376d4e50b4
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/6422
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
6 years agobase: Split out the pixel class in framebuffer.(cc|hh).
Gabe Black [Tue, 5 Dec 2017 04:22:43 +0000 (20:22 -0800)]
base: Split out the pixel class in framebuffer.(cc|hh).

These are really two separate things. Also, while it's realitively
straightforward to write a unit test for the pixel conversion code, the
framebuffer object is serializable and brings in more dependencies.

Change-Id: If954caeb0bfedb1002cfb1a7a115a00c90d56d19
Reviewed-on: https://gem5-review.googlesource.com/6341
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agobase: Handle zero fill in cprintf when printing floats.
Gabe Black [Tue, 5 Dec 2017 03:42:41 +0000 (19:42 -0800)]
base: Handle zero fill in cprintf when printing floats.

The fill_zero flag was being followed for ints, but not for floats.
This makes the cprintf unit test pass.

Change-Id: I4d17a3c9327aea05e0a3c81be1886c0c9256f03c
Reviewed-on: https://gem5-review.googlesource.com/6322
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: Fix the source file for the cprintftime test.
Gabe Black [Tue, 5 Dec 2017 03:10:28 +0000 (19:10 -0800)]
tests: Fix the source file for the cprintftime test.

It was using the source file for the cprintftest unit test.

Change-Id: I534798e892ad55cef2f48be2ba9d732aa1993819
Reviewed-on: https://gem5-review.googlesource.com/6321
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Several fixes having to do with tags and sets.
Gabe Black [Sun, 3 Dec 2017 08:56:36 +0000 (00:56 -0800)]
scons: Several fixes having to do with tags and sets.

There were a few places where tags weren't being converted to sets
correctly which unfortunately only manifested when called in certain
ways. This would be a pretty reasonable place to add some python unit
tests...

Change-Id: I87509369b4ec6f702b7521e52bf63701a87ec436
Reviewed-on: https://gem5-review.googlesource.com/6261
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agoscons: Track and reuse object nodes for a given source file.
Gabe Black [Fri, 1 Dec 2017 00:09:29 +0000 (16:09 -0800)]
scons: Track and reuse object nodes for a given source file.

scons gets upset if two different environments are used to set up a
particular object file. This change adds two dicts to the SourceFile
class, one for static and one for shared object files, which are keyed
off of the appropriate suffix. If a suffix hasn't been set up yet,
a new node of the appropriate type is set up and stored in the cache,
and then whatever is in the cache (new or old) is returned.

Change-Id: Ice4b4fc728b438a4d3316c3ff6667c0480d2a6d7
Reviewed-on: https://gem5-review.googlesource.com/6224
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agox86: LOOP's operand size defaults to 64 bits in 64 bit mode.
Gabe Black [Tue, 5 Dec 2017 02:30:41 +0000 (18:30 -0800)]
x86: LOOP's operand size defaults to 64 bits in 64 bit mode.

The microcode for those instructions needs a directive which overrides
that setting in the instructions emulation environment.

Reported-by: Matt Sinclair <mattdsinclair@gmail.com>
Change-Id: I474d938c0b3cf01da92ec817a58b08de783f1967
Reviewed-on: https://gem5-review.googlesource.com/6301
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agolearning-gem5: Fix missing misc.hh in hello_object.cc
Hanhwi Jang [Tue, 5 Dec 2017 07:39:32 +0000 (16:39 +0900)]
learning-gem5: Fix missing misc.hh in hello_object.cc

misc.hh has been renamed in
commit 1088f0c4ac3999fc3c363cc51daef4cfb360a2bd

Change-Id: Ic4f8c6423e6a5466f8d924e793a24f62bb4eca9c
Reviewed-on: https://gem5-review.googlesource.com/6361
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agoarm: Add support for the dc {civac, cvac, cvau, ivac} instr
Nikos Nikoleris [Thu, 12 Jan 2017 17:59:44 +0000 (17:59 +0000)]
arm: Add support for the dc {civac, cvac, cvau, ivac} instr

This patch adds support for decoding and executing the following ARMv8
cache maintenance instructions by Virtual Address:
* dc civac: Clean and Invalidate by Virtual Address to the Point
            of Coherency
* dc cvac: Clean by Virtual Address to the Point of Coherency
* dc cvau: Clean by Virtual Address to the Point of Unification
* dc ivac: Invalidate by Virtual Addrsess to the Point of Coherency

Change-Id: I58cabda37f9636105fda1b1e84a0a04965fb5670
Reviewed-by: Sudhanshu Jha <sudhanshu.jha@arm.com>
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5060
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
6 years agoarm: Add support for the mcr dc{ic,i,c}mvac, dccmvau instructions
Nikos Nikoleris [Tue, 7 Feb 2017 11:35:10 +0000 (11:35 +0000)]
arm: Add support for the mcr dc{ic,i,c}mvac, dccmvau instructions

This patch adds support for the ARMv7 cache maintenance
intructions:
* mcr dccmvac cleans a VA to the PoC
* mcr dcimvac invalidates a VA to the PoC
* mcr dccimvac cleans and invalidates a VA to the PoC
* mcr dccmvau cleans a VA to the PoU

Change-Id: I6511f203039ca145cc9128ddf61d09d6d7e40c10
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5059
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem-ruby: Prevent ruby from crashing on CMOs
Nikos Nikoleris [Sat, 7 Oct 2017 10:19:54 +0000 (11:19 +0100)]
mem-ruby: Prevent ruby from crashing on CMOs

Ruby has no support for cache maintenace operations. As a workaround,
after printing a warning, we treat them as no-ops in the memory system
and respond immediately without handling them. There should be
workarounds in the memory system already that allow execution to
proceed without the requirement for cache maintenance operations.

Change-Id: I125ee4fa37b674c636d87f2d9205bbc1a74da101
Reviewed-on: https://gem5-review.googlesource.com/5057
Reviewed-by: Jieming Yin <bjm419@gmail.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agoarm: Add CMO support for Non-Cacheable memory
Nikos Nikoleris [Tue, 21 Feb 2017 12:06:37 +0000 (12:06 +0000)]
arm: Add CMO support for Non-Cacheable memory

Cache Maintainance operations to the point of coherence are treated as
normal cahceable requests and clean and/or invalidate the caches of
all PEs.

Change-Id: Ia4a749c2318fe29c8601848b034b8315c4186c8a
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5056
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agocpu: Add support for CMOs in the cpu models
Nikos Nikoleris [Tue, 7 Feb 2017 11:35:48 +0000 (11:35 +0000)]
cpu: Add support for CMOs in the cpu models

Cache maintenance operations go through the write channel of the
cpu. This changes makes sure that the cpu does not try to fill in the
packet with data.

Change-Id: Ic83205bb1cda7967636d88f15adcb475eb38d158
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5055
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Ignore clean requests in the abstract memory
Nikos Nikoleris [Wed, 13 Sep 2017 11:23:25 +0000 (12:23 +0100)]
mem: Ignore clean requests in the abstract memory

Systems with atomic cores and the fastmem option enabled bypass the
whole memory system and access the abstract memory directly. Cache
maintenance operations which would be normally handled before the
point of unification/coherence should be ignored by the abstract
memory.

Change-Id: I696cdd158222e5fd67f670cddbcf2efbbfd5eca4
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5054
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agomem: Handle CMO responses in the snoop filter
Nikos Nikoleris [Mon, 26 Sep 2016 15:43:59 +0000 (16:43 +0100)]
mem: Handle CMO responses in the snoop filter

Previously responses would either transfer the ownership of the line
or the actual data to the cache that send out the original request.
Cache clean operations are different since they bring neither data nor
ownership. When they are also invalidating the cache that send out the
original request will invalidate any existing copies. This patch
makes the snoop filter handle the cache clean responses accordingly.

Change-Id: I27165cb45b9dc57882526329c62db35f100d23df
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Reviewed-by: Sudhanshu Jha <sudhanshu.jha@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5053
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Allow CMOs as snooping requests in the snoop filter
Nikos Nikoleris [Thu, 22 Sep 2016 12:56:02 +0000 (13:56 +0100)]
mem: Allow CMOs as snooping requests in the snoop filter

The snoop filter performs sanity checks of the type of packets that
are expected to snoop caches above. Cache maintenace operations are
expected to perform a clean and or invalidate on all caches down to
the specified point of reference and therefore could also generate
snoops.

Change-Id: I7f8fef246a85faa87ccd289c28b49686ed7caa08
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5052
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Co-ordination of CMOs in the xbar
Nikos Nikoleris [Thu, 22 Sep 2016 11:02:29 +0000 (12:02 +0100)]
mem: Co-ordination of CMOs in the xbar

A clean packet request serving a cache maintenance operation (CMO)
visits all memories down to the specified xbar. The visited caches
invalidate their copy (if the CMO is invalidating) and if a dirty copy
is found a write packet writes the dirty data to the memory level
below the specified xbar. A response is send back when all the caches
are clean and/or invalidated and the specified xbar has seen the write
packet.

This patch adds the following functionality in the xbar:
1) Accounts for the cache clean requests that go through the xbar
2) Generates the cache clean response when both the cache clean
request and the corresponding writeclean packet has crossed the
destination xbar.

Previously transactions in the xbar were identified using the pointer
of the original request. Cache clean transactions comprise of two
different packets, the clean request and the writeclean, and therefore
have different request pointers. This patch adds support for custom
transaction IDs that by default take the value of the request pointer
but can be overriden by the contructor. This allows the clean request
and writeclean share the same id which the coherent xbar uses to
co-ordinate them and send the response in a timely manner.

Change-Id: I80db76386a1caded38dc66e6e18f930c3bb800ff
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5051
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Add support for handling CMOs in the MSHRs
Nikos Nikoleris [Thu, 22 Sep 2016 12:34:17 +0000 (13:34 +0100)]
mem: Add support for handling CMOs in the MSHRs

To add support for cache maintenance operations (CMOs) in the MSHRs,
this change adds the following functionality:
- If a CMO request hits in the MSHRs, we deferred as we can't
  coalesce it with any other requests.
- When we promote any deferred targets, we promote them in order and
  stop if we encounter a CMO request. If the CMO request is at the
  beginning of the deferred targets list it will be the only promoted
  target.

Change-Id: I10d1f7e16bd6d522d917279c5d408a3f0cee4286
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5050
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Add support for CMOs in the cache
Nikos Nikoleris [Wed, 1 Jun 2016 12:29:04 +0000 (13:29 +0100)]
mem: Add support for CMOs in the cache

This change adds support for maintenance operations (CMOs) in the
cache. The supported memory operations clean and/or invalidate a cache
block as specified by its VA to the specified xbar (PoU, PoC).

A cache maintenance packet visits all memories down to the specified
xbar. Caches need to invalidate their copy if it is an invalidating
CMO. If it is (additionally) a cleaning CMO and a dirty copy exists,
the cache cleans it with a WriteClean request.

Change-Id: Ibf31daa7213925898f3408738b11b1dd76c90b79
Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5049
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Promote deferred targets only when the block is valid
Nikos Nikoleris [Thu, 8 Sep 2016 11:02:47 +0000 (12:02 +0100)]
mem: Promote deferred targets only when the block is valid

When a response indicates that there are no other sharers of the
block, the cache can promote its copy of the block to writable and
potential service deferred targets even if the request didn't ask for
a writable copy.

Previously, a response would guarantee the presence of the block in
the cache. A response could either be filling, upgrading or a response
to an invalidation due to a pending whole line write. Responses to
cache maintenance invalidations break this assumption. This change
adds an extra check to make sure that the block was already valid or
that the response is filling before promoting the block.

Change-Id: I6839f683a05d4dad4205c23f365a925b7b05e366
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5048
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Add support for cache maintenance operation requests
Nikos Nikoleris [Thu, 22 Sep 2016 09:18:24 +0000 (10:18 +0100)]
mem: Add support for cache maintenance operation requests

This change adds new packet cmds and request flags for cache
maintenance operations.

1) A cache clean operation writes dirty data in the first memory below
the specified xbar and updates any old copies in the memories above
it.
2) A cache invalidate operation invalidates all copies of the
specified block in the memories above the specified xbar
3) A clean and invalidate operation is a combination of the two
operations above

Change-Id: If45702848bdd568de532cd57cba58499e5e4354c
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5047
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Support for specifying the destination of a WriteClean
Nikos Nikoleris [Thu, 22 Sep 2016 09:07:11 +0000 (10:07 +0100)]
mem: Support for specifying the destination of a WriteClean

Previously, WriteClean packets would always write to the first memory
below unless the memory was unable to allocate in which case it would
be forwarded further below.

This change adds support for specifying the destination of a
WriteClean packet. The cache annotates the request with the specified
destination and marks the packet as write-through upon its
creation. The coherent xbar checks packets for their destination and
resets the write-through flag when necessary e.g., the coherent xbar
that is set as the PoC will reset the write-through flag for packets
to the PoC.

Change-Id: I84b653f5cb6e46e97e09508649a3725d72d94606
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5046
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Add support for WriteClean packets in the memory system
Nikos Nikoleris [Tue, 31 May 2016 17:03:42 +0000 (18:03 +0100)]
mem: Add support for WriteClean packets in the memory system

This change adds support for creating and handling WriteClean
packets. The WriteClean operation is almost identical to a
WritebackDirty with the exception that the cache generating a
WriteClean retains a copy of the block.

Change-Id: I63c8de62919fad0f9547d412f8266aa4292ebecd
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5045
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

6 years agomem: Add a WriteClean command to the packet class
Nikos Nikoleris [Thu, 26 May 2016 08:49:52 +0000 (09:49 +0100)]
mem: Add a WriteClean command to the packet class

A WriteClean packet allows a cache to write a block to a memory below
without evicting its copy. A typical usecase for a WriteClean packet
is a cache clean operation.

Change-Id: If356cb067da5ddf3210c135f41ef0891fb811568
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5044
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem-cache: Add support for checking whether a cache is busy
Nikos Nikoleris [Fri, 29 Sep 2017 14:24:13 +0000 (15:24 +0100)]
mem-cache: Add support for checking whether a cache is busy

This changeset adds support for checking whether the cache is
currently busy and a timing request would be rejected.

Change-Id: I5e37b011b2387b1fa1c9e687b9be545f06ffb5f5
Reviewed-on: https://gem5-review.googlesource.com/5042
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

6 years agomem: Add function to check if the slave can receive a timing req
Nikos Nikoleris [Fri, 29 Sep 2017 14:00:55 +0000 (15:00 +0100)]
mem: Add function to check if the slave can receive a timing req

This changeset adds support for tryTiming, an interface that allows a
master to check if the slave is busy or otherwise if it can accept a
timing request.

Change-Id: Idc7c2337ae9ccf5dec54f308e488660591419a63
Reviewed-on: https://gem5-review.googlesource.com/5041
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Christian Menard <christian.menard@tu-dresden.de>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agomem: Add the notion of point of unification in the coherent xbar
Nikos Nikoleris [Tue, 31 May 2016 12:43:50 +0000 (13:43 +0100)]
mem: Add the notion of point of unification in the coherent xbar

The point of unification is the first crossbar at which the
instruction cache, the data cache and the translation table walks of
the core are guaranteed to see the same copy of a memory location.

Change-Id: Ica79b34c8ed4f1a8f2379748e8520a8f8afffa90
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5040
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

6 years agoconfig, mem, hmc: fix HMC test script
Éder F. Zulian [Wed, 22 Nov 2017 16:03:29 +0000 (17:03 +0100)]
config, mem, hmc: fix HMC test script

This patch keeps the logic behind the HMC model implementation untouched.

Additional changes:
- simple hello world script using HMC (SE simulation)

Usage examples:

./build/ARM/gem5.opt configs/example/hmctest.py
./build/ARM/gem5.opt configs/example/hmctest.py --enable-global-monitor --enable-link-monitor --arch=same
./build/ARM/gem5.opt configs/example/hmctest.py --enable-global-monitor --enable-link-monitor --arch=mixed
./build/ARM/gem5.opt configs/example/hmc_hello.py
./build/ARM/gem5.opt configs/example/hmc_hello.py --enable-global-monitor --enable-link-monitor

Change-Id: I64eb6c9abb45376b6ed72722926acddd50765394
Reviewed-on: https://gem5-review.googlesource.com/6061
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agolearning_gem5: Adding code for SimpleCache
Jason Lowe-Power [Fri, 6 Oct 2017 21:54:02 +0000 (14:54 -0700)]
learning_gem5: Adding code for SimpleCache

This is the rest of the code for part 2.

See http://learning.gem5.org/book/part2/simplecache.html

Change-Id: I5db099266a1196914656be3858fdd5fb4f8eab48
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/5023
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
6 years agolearning_gem5: Adds the simple MemObject code
Jason Lowe-Power [Fri, 6 Oct 2017 21:43:09 +0000 (14:43 -0700)]
learning_gem5: Adds the simple MemObject code

Adding more code from Learning gem5 Part II

See http://learning.gem5.org/book/part2/memoryobject.html

Change-Id: Iaa9480c5cdbe4090364f02e81dc1d0a0ddac392a
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/5022
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
6 years agolearning_gem5: Add code for hello-goodbye example
Jason Lowe-Power [Fri, 6 Oct 2017 21:27:37 +0000 (14:27 -0700)]
learning_gem5: Add code for hello-goodbye example

Adding more code from Learning gem5 Part II

See http://learning.gem5.org/book/part2/parameters.html

Change-Id: I9fe5655239e011c718c5cf5fd62bebcda66ea966
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/5021
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
6 years agolearning_gem5: Add code for simple SimObject
Jason Lowe-Power [Fri, 6 Oct 2017 21:26:22 +0000 (14:26 -0700)]
learning_gem5: Add code for simple SimObject

This adds code from Learning gem5 Part II.

See http://learning.gem5.org/book/part2/helloobject.html

Change-Id: Ic2caa07876ca57f937729c27ce29b2cd8bf2380c
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/5020
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
6 years agobase: Rework the trie dump function to accept a different ostream.
Gabe Black [Sun, 3 Dec 2017 09:51:53 +0000 (01:51 -0800)]
base: Rework the trie dump function to accept a different ostream.

It might often be useful to write output to cout when dumping a trie,
but sometimes it might be useful to dump ot to something else like a
string stream instead.

Change-Id: Iaa4ae772c902b7dbc753f320d1a7eb5fcd4a3db3
Reviewed-on: https://gem5-review.googlesource.com/6266
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agomisc: Rename misc.(hh|cc) to logging.(hh|cc)
Gabe Black [Fri, 1 Dec 2017 01:36:53 +0000 (17:36 -0800)]
misc: Rename misc.(hh|cc) to logging.(hh|cc)

These files aren't a collection of miscellaneous stuff, they're the
definition of the Logger interface, and a few utility macros for
calling into that interface (panic, warn, etc.).

Change-Id: I84267ac3f45896a83c0ef027f8f19c5e9a5667d1
Reviewed-on: https://gem5-review.googlesource.com/6226
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agomisc: Move the ExitLogger class definition into misc.cc
Gabe Black [Fri, 1 Dec 2017 00:17:06 +0000 (16:17 -0800)]
misc: Move the ExitLogger class definition into misc.cc

This class isn't referred to outside of misc.hh, and isn't necessarily
useful outside of the particular logging setup implemented in misc.cc.
The Logger class itself is different since it provides a generic
interface that can be used with different logging schemes.

Change-Id: Ibae926fea039d9e3d75a43d97348bc4a3c5d555e
Reviewed-on: https://gem5-review.googlesource.com/6225
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agotests: Remove trietest's dependence on cprintf.
Gabe Black [Thu, 30 Nov 2017 01:58:59 +0000 (17:58 -0800)]
tests: Remove trietest's dependence on cprintf.

Dumping the structure of the tries being constructed was useful for
debugging when the trie data structure was being developed, but the
output can't be automatically verified easily, and what's considered
correct depends on the specific implementation of the trie itself.

To make some of the earlier tests more meaningful, additional lookups
were added which verified that the correct values were returned when
the nodes of the trie were in particular arrangements.

Change-Id: Ib464ad1804d13fe40882da2190d7bf452da83818
Reviewed-on: https://gem5-review.googlesource.com/6223
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agotests: Add a ptr helper function trietest.
Gabe Black [Thu, 30 Nov 2017 01:29:22 +0000 (17:29 -0800)]
tests: Add a ptr helper function trietest.

This function casts an integer constant into a uint32_t * to make the
actual test lines a bit less verbose.

Change-Id: I9307dfd3d5861ddb9c0f6dcf4b28c846004f0a8d
Reviewed-on: https://gem5-review.googlesource.com/6222
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agotests: Get rid of the bitvectest unit test.
Gabe Black [Tue, 28 Nov 2017 03:11:53 +0000 (19:11 -0800)]
tests: Get rid of the bitvectest unit test.

This test doesn't really test anything other than the STL vector
implementation.

Change-Id: I1b932640b1be4fb92a44d314d0b51a94a6a324a2
Reviewed-on: https://gem5-review.googlesource.com/6221
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agoarm: Enable ns registers access in secure mode
Giacomo Travaglini [Thu, 16 Nov 2017 17:44:12 +0000 (17:44 +0000)]
arm: Enable ns registers access in secure mode

Arm security extension introduced register banking between secure and
non-secure mode. This has been removed in armv8 using AArch64 in EL3,
where the decoded register is by default the non-secure version. Using
non-secure register infos(flags) was preventing secure execution to
access the register with the MRC/MCR at EL1.
The patch updates the following banked registers' flags so that their
non-secure version can be accessed in secure mode:

MISCREG_CSSELR, MISCREG_SCTLR, MISCREG_ACTLR, MISCREG_TTBR0,
MISCREG_TTBR1, MISCREG_TTBCR, MISCREG_DACR, MISCREG_DFSR, MISCREG_IFSR,
MISCREG_ADFSR, MISCREG_AIFSR, MISCREG_DFAR, MISCREG_IFAR, MISCREG_PAR,
MISCREG_PRRR, MISCREG_MAIR0, MISCREG_NMRR, MISCREG_MAIR1,
MISCREG_AMAIR0, MISCREG_AMAIR1, MISCREG_VBAR, MISCREG_CONTEXTIDR,
MISCREG_TPIDRURW, MISCREG_TPIDRURO, MISCREG_TPIDRPRW, MISCREG_CNTP_TVAL,
MISCREG_CNTP_CTL, MISCREG_CNTP_CVAL

For those registers the following permission bits have been set:

MISCREG_PRI_S_RD
MISCREG_PRI_S_WR

Change-Id: Ib881c526e75d69e313f8ef66eb78fc704de6bf59
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6201
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-riscv: use sext rather than manual masks
Alec Roelke [Wed, 29 Nov 2017 19:04:11 +0000 (14:04 -0500)]
arch-riscv: use sext rather than manual masks

Replace manual creation of masks for sign extension of immediates with
the sext<N> function.

Change-Id: Ief2df91a25500c64f5bcae0dcd437c1e3bb95e6c
Reviewed-on: https://gem5-review.googlesource.com/6182
Reviewed-by: Alec Roelke <ar4jc@virginia.edu>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agoarch-riscv: Remove spaces around ea_code
Alec Roelke [Wed, 29 Nov 2017 17:12:53 +0000 (12:12 -0500)]
arch-riscv: Remove spaces around ea_code

This patch makes mem.isa conform to style guidelines better by removing
spaces around the "ea_code" argument default value assignment of the
Load format.

Change-Id: I1c62b99de3617a3734b128b00fb421773e021317
Reviewed-on: https://gem5-review.googlesource.com/6181
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agoarch-riscv: Add missing license paragraphs
Alec Roelke [Wed, 29 Nov 2017 19:20:47 +0000 (14:20 -0500)]
arch-riscv: Add missing license paragraphs

Some of the files in earlier patches rearranging instruction definitions
were missing copyright and license information.  This patch adds them.

Change-Id: I2ac4910a415de6032fc0b7d4422904c682e0ad87
Reviewed-on: https://gem5-review.googlesource.com/6183
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agocpu: Don't override ISA if provided by user
Andreas Sandberg [Fri, 24 Nov 2017 18:38:06 +0000 (18:38 +0000)]
cpu: Don't override ISA if provided by user

The BaseCPU.createThreads() method currently overrides the BaseCPU.isa
parameter. This is sometimes undesirable. Change the behavior so that
the default value for the isa parameter is the empty list and teach
createThreads() to only override the ISA if none has been specified.

Change-Id: I2ac5535e55fc57057e294d3c6a93088b33bf7b84
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jack Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Sudhanshu Jha <sudhanshu.jha@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6121
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agocpu-minor: Add missing instruction stats
David Guillen Fandos [Thu, 16 Jun 2016 10:45:11 +0000 (11:45 +0100)]
cpu-minor: Add missing instruction stats

Change-Id: I811b552989caf3601ac65a128dbee6b7bb405d7f
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
[ Updated to use IsVector instruction flag. ]
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5732
Reviewed-by: Gabe Black <gabeblack@google.com>
6 years agoarch-riscv: Remove static parts of AMOs out of ISA
Alec Roelke [Fri, 10 Nov 2017 17:23:43 +0000 (12:23 -0500)]
arch-riscv: Remove static parts of AMOs out of ISA

This patch removes the static parts of the RISC-V atomic memory
instructions out of the ISA generated code and into arch/riscv/insts. It
also makes the LR and SC instructions subclasses of MemInst from
arch/riscv/insts/mem.hh.

Change-Id: I6591f3d171045c4f1b457eb1264bbb7bd62b3e51
Reviewed-on: https://gem5-review.googlesource.com/6025
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agoarch-riscv: Move parts of mem insts out of ISA
Alec Roelke [Tue, 7 Nov 2017 20:19:56 +0000 (15:19 -0500)]
arch-riscv: Move parts of mem insts out of ISA

This patch moves static portions of the memory instructions out of the
ISA generated code and puts them into arch/riscv/insts.  It also
simplifies the definitions of load and store instructions by giving
them a common base class.

Change-Id: Ic6930cbfc6bb02e4b3477521e57b093eac0c8803
Reviewed-on: https://gem5-review.googlesource.com/6024
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agoarch-riscv: Move unknown out of ISA description
Alec Roelke [Tue, 7 Nov 2017 17:11:11 +0000 (12:11 -0500)]
arch-riscv: Move unknown out of ISA description

This patch removes the Unknown instruction type out of the ISA generated
code and puts it into arch/riscv/insts.  Since there isn't any dynamic
behavior to it, all that's left behind is a template for creating a new
Unknown instruction.

Change-Id: If7c3258a24ecadd3e00ab74586e1740e14f028db
Reviewed-on: https://gem5-review.googlesource.com/6023
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agoarch-riscv: Move standard ops out of ISA
Alec Roelke [Tue, 7 Nov 2017 19:15:41 +0000 (14:15 -0500)]
arch-riscv: Move standard ops out of ISA

This patch removes static portions of the standard instruction types
from the generated ISA code and puts them into arch/riscv/insts. Some
dynamically-generated content is left behind for each individual
instruction's implementation. Also, BranchOp is removed due to its
similarity with ImmOp and ImmOp and UImmOp are joined into a single
templated class, ImmOp<T>.

Change-Id: I1bf47c8b8a92a5be74a50909fcc51d8551185a2a
Reviewed-on: https://gem5-review.googlesource.com/6022
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agocpu-o3: Add missing vector stat initializers
Andreas Sandberg [Thu, 23 Nov 2017 14:31:36 +0000 (14:31 +0000)]
cpu-o3: Add missing vector stat initializers

All of the O3 vector stats added by 'arch: ISA parser additions of
vector registers' are currently missing their stat initializers. Add
the missing stat initialization to InstructionQueue::regStats.

Change-Id: Idc4b8e2824120a2542d8a604340a1b41bde6aa28
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6101
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agoarch-arm: Add haveEL pseudocode function
Giacomo Travaglini [Mon, 27 Nov 2017 18:10:17 +0000 (18:10 +0000)]
arch-arm: Add haveEL pseudocode function

This patch introduces the ARM pseudocode haveEL function
into gem5.

Change-Id: I0d96070959e8e13773eb7fa9964894ec0ff2cac2
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6162
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Add assertions when extracting an ArmSystem from a TC
Giacomo Travaglini [Mon, 27 Nov 2017 18:17:25 +0000 (18:17 +0000)]
arch-arm: Add assertions when extracting an ArmSystem from a TC

We sometimes need to cast the System pointer stored in a
ThreadContext to an ArmSystem pointer to query global
system setting.
Add an assertion to make sure that the cast resulted in a
valid pointer.

Change-Id: Id382d0c1dceefee8f74d070c205c7b43b83ab215
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/6161
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: Move the bituniontest to be alongside the bitunion header.
Gabe Black [Tue, 28 Nov 2017 03:04:15 +0000 (19:04 -0800)]
tests: Move the bituniontest to be alongside the bitunion header.

Change-Id: I7c1a49c41672a1108fcf67c5505b0441f90588ef
Reviewed-on: https://gem5-review.googlesource.com/6142
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Build GTests in the directory they're declared.
Gabe Black [Tue, 28 Nov 2017 02:59:27 +0000 (18:59 -0800)]
scons: Build GTests in the directory they're declared.

This will let us move unit tests into the directory of the code they're
testing.

Change-Id: I611582eb00a06a848f3ce7da89f64e42660cb844
Reviewed-on: https://gem5-review.googlesource.com/6141
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: Reimplement the bituniontest as a googletest.
Gabe Black [Thu, 23 Nov 2017 02:11:58 +0000 (18:11 -0800)]
tests: Reimplement the bituniontest as a googletest.

The implementation is very similar to the old test structurally, and
should test all the same things.

Change-Id: I58f1559d0943f2494ef06ee1d7ee5314a3852a8c
Reviewed-on: https://gem5-review.googlesource.com/6085
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Add in a new type of unit test called GTest.
Gabe Black [Thu, 23 Nov 2017 02:10:06 +0000 (18:10 -0800)]
scons: Add in a new type of unit test called GTest.

This type of unit test is almost the same as UnitTest, except that
it builds in the googletest library with the appropriate flags, and
it also omits all the gem5 object files by default.

Change-Id: I230db7ede563a73a9da0ebeed44aca389f724465
Reviewed-on: https://gem5-review.googlesource.com/6084
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: scons: Integrate the googletest library into the build.
Gabe Black [Thu, 23 Nov 2017 02:06:14 +0000 (18:06 -0800)]
tests: scons: Integrate the googletest library into the build.

A static library is built using gtest-all.cc and includes the gtest
main function from gtest_main.cc. extra libraries to use when linking
are included in the main environment variable GTEST_LIBS, and extra
CPPFLAGS are in GTEST_CPPFLAGS. The library's path is added to the
library search path, and it's headers to the header search path.

Change-Id: I2bd6f705bd9fac5db9280996f574b168c11ff8ce
Reviewed-on: https://gem5-review.googlesource.com/6083
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: Import the googletest library, release version 1.8.0.
Gabe Black [Thu, 23 Nov 2017 02:05:33 +0000 (18:05 -0800)]
tests: Import the googletest library, release version 1.8.0.

Change-Id: Ic6c1391a19238011ff5cc97f513dbdc020dc6144
Reviewed-on: https://gem5-review.googlesource.com/6082
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Minor cleanup of how partial linking is handled in makeEnv.
Gabe Black [Tue, 21 Nov 2017 05:01:59 +0000 (21:01 -0800)]
scons: Minor cleanup of how partial linking is handled in makeEnv.

Git rid of the unused partial_objs variable, and change append to
extend since the result of builders is a list of nodes and not
individual nodes, even if there's only one target.

Change-Id: Ie51225d3ea699eb7da18199ac3bf3e868e3994a6
Reviewed-on: https://gem5-review.googlesource.com/5985
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-riscv: Move static_inst into a directory
Alec Roelke [Tue, 7 Nov 2017 16:45:47 +0000 (11:45 -0500)]
arch-riscv: Move static_inst into a directory

This patch creates an "insts" directory in src/arch/riscv to store
static portions of instruction definitions that aren't part of the code
generated by the ISA description.  It serves as a starting point for
future patches to simplify the ISA description.

Change-Id: I6700522143f6fa6c9b18a30e1fbdc8f80cdc7afa
Reviewed-on: https://gem5-review.googlesource.com/6021
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agotests: Build the input file into the initest unit test.
Gabe Black [Thu, 23 Nov 2017 02:02:13 +0000 (18:02 -0800)]
tests: Build the input file into the initest unit test.

This breaks an external dependency and makes the expected command line
conform to the other unit tests. Also get rid of some ancient tests
which test adding to the ini's contents based on command line
arguments.

This test still needs to be modified so that it actually checks whether
what happened was correct.

Change-Id: I2c9ea9fa79781bceb5cd3d1419870924e8bbd45f
Reviewed-on: https://gem5-review.googlesource.com/6081
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Break make_obj into make_static and make_shared functions.
Gabe Black [Tue, 21 Nov 2017 02:34:11 +0000 (18:34 -0800)]
scons: Break make_obj into make_static and make_shared functions.

The make_obj function took a boolean value which just selected which
of the two lines it in would actually do something. This change breaks
it into two lambdas, make_static and make_shared, which just do
whichever line would have been requested, making the funciton name more
self descriptive and getting rid of the generally unnamed and opaque
boolean argument.

Change-Id: I457e40034b7e7f5a3e7294a8e1f15bbd42e0720e
Reviewed-on: https://gem5-review.googlesource.com/5984
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Remove the extra_deps option from the helper function make_obj.
Gabe Black [Tue, 21 Nov 2017 02:30:41 +0000 (18:30 -0800)]
scons: Remove the extra_deps option from the helper function make_obj.

This had only one use, and made the function more complicated than it
needed to be.

Change-Id: I22147a0c1239b457c577a6a24b423065e539833b
Reviewed-on: https://gem5-review.googlesource.com/5983
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Get rid of a flag which makes Werror optional.
Gabe Black [Tue, 21 Nov 2017 02:26:29 +0000 (18:26 -0800)]
scons: Get rid of a flag which makes Werror optional.

This flag wasn't being used. Also move the Werror code to the
SConstruct now that it's being applied universally.

Change-Id: I18b00d4b41bc1add9271ca299c020c14970a6926
Reviewed-on: https://gem5-review.googlesource.com/5982
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Move some compiler flag setting code to the SConstruct.
Gabe Black [Tue, 21 Nov 2017 02:21:19 +0000 (18:21 -0800)]
scons: Move some compiler flag setting code to the SConstruct.

These settings are invariant, so there's no reason to apply them over
and over again for the child environments used for various build
products.

Change-Id: Icb4053105e4f1c43008f2422ba30c7206b7ff365
Reviewed-on: https://gem5-review.googlesource.com/5981
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoscons: Get rid of SourceFile's done function.
Gabe Black [Sun, 19 Nov 2017 05:38:03 +0000 (21:38 -0800)]
scons: Get rid of SourceFile's done function.

This function doesn't seem to be used by anything. A similar one off
mechanism exists for SimObjects which is we might also be able to get
rid of.

Change-Id: I65038c3495fa69cf94042dc78f09876d5e9a557f
Reviewed-on: https://gem5-review.googlesource.com/5841
Maintainer: Gabe Black <gabeblack@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agoscons: Switch from "guards" to "tags" on source files.
Gabe Black [Sun, 19 Nov 2017 04:39:48 +0000 (20:39 -0800)]
scons: Switch from "guards" to "tags" on source files.

Tags are just arbitrary strings which are attached to source files
which mark them as having some property. By default, all source files
have the "gem5 lib" tag added to them which marks them as part of the
gem5 library, the primary component of the gem5 binary but also a
seperable component for use in, for example, system C.

The tags can be completely overridden by setting the "tags" parameter
on Source, etc., functions, and can be augmented by setting "add_tags"
which are tags that will be added, or alternatively additional tags.
It's possible to specify both, in which case the tags will be set to
the union of tags and add_tags. add_tags is supposed to be a way to
add extra tags to the default without actually overriding the default.
Both tags and add_tags can be a list/tuple/etc of tags, or a single
string which will be converted into a set internally.

Other existing tags include:
1. "python" for files that need or are used with python and are
   excluded when the --without-python option is set
2. "main" for the file(s) which implement the gem5 binary's main
   function.
3. The name of a unit test to group its files together.
4. Tags which group source files for partial linking.

By grouping the "tags" into a single parameter instead of taking all
extra parameters as tags, the extra parameters can, in the future, be
passed to the underlying scons environment. Also, the tags are either
present or not. With guards, they could be present and True, present
and False, or not present at all.

Change-Id: I6d0404211a393968df66f7eddfe019897b6573a2
Reviewed-on: https://gem5-review.googlesource.com/5822
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agotests: Resurrect initest input file(s).
Gabe Black [Wed, 22 Nov 2017 01:58:41 +0000 (17:58 -0800)]
tests: Resurrect initest input file(s).

Delete the current version of foo.ini which was modified, restore the
previous version, and initest.ini. Preprocess initest.ini which
includes foo.ini, and tidy up the resulting file. This file will
(mostly) get the initest unit test to work. Some other cleanups are
still necessary.

Change-Id: I4e46abc73ac89f88177eec92f572452f63ba8019
Reviewed-on: https://gem5-review.googlesource.com/6041
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agotests: Fix the stats unit test.
Gabe Black [Wed, 22 Nov 2017 00:52:48 +0000 (16:52 -0800)]
tests: Fix the stats unit test.

This has been broken since February. The interface for opening
initializing where the stats output should go was changed, but the
test wasn't updated.

Change-Id: I54bd8be15bf870352d5fcfad95ded28d87c7cc5a
Reviewed-on: https://gem5-review.googlesource.com/6001
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Add support for the brk instruction
Andreas Sandberg [Fri, 23 Jun 2017 13:49:56 +0000 (14:49 +0100)]
arch-arm: Add support for the brk instruction

Add support for software breakpoints as signalled by the aarch64 brk
instruction. This introduces a new SoftwareBreakpoint fault.

Change-Id: I93646c3298e09d7f7b0983108ba8937c7331297a
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5721
Reviewed-by: Giacomo Gabrielli <Giacomo.Gabrielli@arm.com>
6 years agoarch-arm: HVC instruction undefined in secure EL1
Giacomo Travaglini [Mon, 20 Nov 2017 17:02:11 +0000 (17:02 +0000)]
arch-arm: HVC instruction undefined in secure EL1

Since EL2 is not available in secure mode, any HVC call from secure mode
should be treated as undefined. This behaviour was implemented in
aarch32 HVC but not in 64 bit version

Change-Id: Ibaa4d8b1e8fe01d2ba3ef07494c09a4d3e7e87b0
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5921
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-riscv: Add missing system calls
Alec Roelke [Sat, 28 Oct 2017 16:35:20 +0000 (12:35 -0400)]
arch-riscv: Add missing system calls

This patch adds all system calls present in riscv-gnu-toolchain at
commit hash 65cb174. Many of them do not have implementations in gem5, so
they are just placeholders.

[Remove the variadic macro and replace it with a function that has
default arguments because variadic macros may not be portable across
compilers]
[Remove spaces around default arguments of createSyscall for better
style]
[Switch from using a loose function to using SyscallDesc's new
constructor]

Change-Id: Iff97c689109121b39df423c72d0e79c6366e31b9
Reviewed-on: https://gem5-review.googlesource.com/5322
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>

6 years agosim-se: Add default to SyscallDesc constructor
Alec Roelke [Tue, 7 Nov 2017 03:04:11 +0000 (22:04 -0500)]
sim-se: Add default to SyscallDesc constructor

This patch adds a default value of unimplementedFunc to SyscallDesc's
constructor's second argument, which makes adding system call
placeholders to SE mode cleaner.

Change-Id: I3e7efb3a887cc52d16d2095d3dd2e2a96fb882fb
Reviewed-on: https://gem5-review.googlesource.com/5501
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>

6 years agosparc: Move integer StaticInst base classes out of the ISA desc.
Gabe Black [Tue, 7 Nov 2017 07:30:42 +0000 (23:30 -0800)]
sparc: Move integer StaticInst base classes out of the ISA desc.

Change-Id: I24008c1e2a94ad8dc4cc13739214928eb846a496
Reviewed-on: https://gem5-review.googlesource.com/5483
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Move the mem base classes out of the ISA description.
Gabe Black [Tue, 7 Nov 2017 07:19:56 +0000 (23:19 -0800)]
sparc: Move the mem base classes out of the ISA description.

Change-Id: Ifbeee464e2d7f872e192f065ad3494f52d274596
Reviewed-on: https://gem5-review.googlesource.com/5482
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Move the microop/macroop base classes out of the ISA desc.
Gabe Black [Tue, 7 Nov 2017 07:01:03 +0000 (23:01 -0800)]
sparc: Move the microop/macroop base classes out of the ISA desc.

These were just raw C++ classes.

Change-Id: Id2101400d885c6938efb6b94f2949722cfbb94ae
Reviewed-on: https://gem5-review.googlesource.com/5481
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Return debug faults from unimplemented instructions.
Gabe Black [Tue, 7 Nov 2017 03:25:21 +0000 (19:25 -0800)]
sparc: Return debug faults from unimplemented instructions.

These had been marked as non-speculative so that their execute
functions would only be called if the instruction should really be
executed. Instead, we can return faults which will cause the same
behavior when the instruction is committed and let the instruction
execute as normal.

Change-Id: I39fa5073e93399424144724b99bdc12070e42286
Reviewed-on: https://gem5-review.googlesource.com/5465
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Pull the unimplemented formats out of the ISA description.
Gabe Black [Tue, 7 Nov 2017 03:14:51 +0000 (19:14 -0800)]
sparc: Pull the unimplemented formats out of the ISA description.

These are simple classes which don't need to be in the ISA description.

Change-Id: Ia0bb45f50c4da2536855efcb3c17c7780b431332
Reviewed-on: https://gem5-review.googlesource.com/5464
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Pull the "Uknown" StaticInst class out of the ISA description.
Gabe Black [Tue, 7 Nov 2017 02:57:27 +0000 (18:57 -0800)]
sparc: Pull the "Uknown" StaticInst class out of the ISA description.

The only thing the Unknown format does is return an instance of this
class, so there's no reason to have it in the ISA description.

Change-Id: I3f8187b1450a8622a974c030c0cb552b26f6b5f0
Reviewed-on: https://gem5-review.googlesource.com/5463
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Pull most of the Nop format out of the ISA description.
Gabe Black [Tue, 7 Nov 2017 02:38:32 +0000 (18:38 -0800)]
sparc: Pull most of the Nop format out of the ISA description.

The Nop format mostly just made instructions that inherited from the
Nop base class but with different mnemonics, so there doesn't need
to be very much dynamic content.

Change-Id: I1cf5e25ca8372f9b71f56d49756879c7545c9f6c
Reviewed-on: https://gem5-review.googlesource.com/5462
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Pull more StaticInst base classes out of the ISA desc.
Gabe Black [Tue, 7 Nov 2017 02:22:38 +0000 (18:22 -0800)]
sparc: Pull more StaticInst base classes out of the ISA desc.

These are for the trap and branch instructions.

Change-Id: Idedab6f3e6c6c954c1f8a36dae52976cf25ad394
Reviewed-on: https://gem5-review.googlesource.com/5461
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agosparc: Pull flat static instruction classes out of the ISA.
Gabe Black [Mon, 6 Nov 2017 01:58:56 +0000 (17:58 -0800)]
sparc: Pull flat static instruction classes out of the ISA.

These classes are just used as base classes for other instructions
and don't need to be part of the ISA definition. Pull them into
standard C++ files.

Change-Id: If3e0bd82b1e676f20459bc0293fbda49de66b554
Reviewed-on: https://gem5-review.googlesource.com/5422
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

6 years agoarch-arm: ArmPMU refactor
Jose Marinho [Tue, 26 Sep 2017 13:33:49 +0000 (14:33 +0100)]
arch-arm: ArmPMU refactor

Change the definition of PMU events in order to integrate events not
cannot easily be represented by probe points. The software
increment event is now defined as a special type with its separate
implementation in pmu.cc and pmu.hh.

Change-Id: I43874b9641bf38c54f6ba2c26386542b6a73e282
Signed-off-by: Jose Marinho <jose.marinho@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5764
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Do not increment PMU cycle event in WFI/WFE
Jose Marinho [Tue, 17 Oct 2017 14:34:56 +0000 (15:34 +0100)]
arch-arm: Do not increment PMU cycle event in WFI/WFE

Change-Id: I09531e9992e045254e5ee989dd11ccabbf84e4ce
Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5763
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agocpu, cpu, sim: move Cycle probe update
Jose Marinho [Thu, 20 Jul 2017 13:57:39 +0000 (14:57 +0100)]
cpu, cpu, sim: move Cycle probe update

Move the code responsible for performing the actual probe point notify
into BaseCPU. Use BaseCPU activateContext and suspendContext to keep
track of sleep cycles. Create a probe point (ppActiveCycles) that does
not count cycles where the processor was asleep. Rename ppCycles
to ppAllCycles to reflect its nature.

Change-Id: I1907ddd07d0ff9f2ef22cc9f61f5f46c630c9d66
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5762
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
6 years agosim: Fix need to save address space info during serialization.
Austin Harris [Mon, 20 Nov 2017 21:55:40 +0000 (15:55 -0600)]
sim: Fix need to save address space info during serialization.

This fixes a fatal already mapped error in
FuncPageTable::allocate that occurs in some cases
when restoring from a checkpoint.

Change-Id: Ib726a69358118626663e42b7f14889b0d3a98de0
Reported-by: Ruohuang Zheng <zhengruohuang@gmail.com>
Signed-off-by: Austin Harris <austinharris@utexas.edu>
Reviewed-on: https://gem5-review.googlesource.com/5901
Reviewed-by: Gabe Black <gabeblack@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

6 years agoscons: Build error introduced by site_tools/default.py
Giacomo Travaglini [Tue, 21 Nov 2017 11:08:12 +0000 (11:08 +0000)]
scons: Build error introduced by site_tools/default.py

One of the latest commits affecting the build system introduced a change
in the environment setting: rather than using the ENV dictionary,
environment key-val pairs were saved directly into the class. This
patch reverts that behaviour.

Change-Id: If206ba0a34ac8c35695a493cb90654b7ec81971b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5941
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Fix MCR/MRC disassemble
Giacomo Travaglini [Wed, 15 Nov 2017 15:27:35 +0000 (15:27 +0000)]
arch-arm: Fix MCR/MRC disassemble

This patch is fixing the Aarch32 MCR/MRC disassemble, which was
previously printing unexisting integer registers as source/destination
operands rather than the coprocessor register name

Change-Id: I1937938c43680200cf6c5c9558e835ce2b209adc
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5862
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

6 years agoarch-arm: Fix MSR/MRS disassemble
Giacomo Travaglini [Fri, 10 Nov 2017 15:35:26 +0000 (15:35 +0000)]
arch-arm: Fix MSR/MRS disassemble

This patch is fixing the Aarch64 MSR/MRS disassemble, which was
previously printing unexisting integer registers as source/destination
operands rather than the system register name

Change-Id: Iac9d5f2f2fea85abd9a398320ef7aa4844d43c0e
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5861
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>