Commit Graph

17970 Commits

Author SHA1 Message Date
Gabe Black
750a809169 python,scons: Break slicc's dependence on m5.util.
The only dependence remaining was a small utility function makeDir which
was only used by slicc. This change moves it to where it's used, and
cleans up the additions to sys.path a little.

Change-Id: I7415b53ea2e9c378b6dbf342b8b3a966f48e117c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49397
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-24 21:23:41 +00:00
Gabe Black
cc75a47b84 python,scons: Move grammar.py and code_formatter.py into build_tools.
These are only used in a build, and so don't need to be built into gem5.
grammar.py is used by slicc and the fast model project file parser, and
code_formatter.py is only used by SConscripts.

Change-Id: Id43e62459d69f07fdb2ed125548a83e38bbb7590
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49396
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-09-24 21:23:27 +00:00
Gabe Black
6cc3b4f6c1 scons,python: Move the marshal.py script into build_tools.
It's really a part of the build system and not part of gem5, and so it
should probably live outside of the main tree. It would be confusing to
have a bunch of python scripts which don't end up inside gem5 alongside
a bunch of ones that do in src/python.

The directory is called build_tools instead of build so it doesn't get
confused with an actual build output directory.

Change-Id: Ie12475a15517508dc2044f0ca4db71a601b7ab6d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49393
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-09-24 21:23:11 +00:00
Gabe Black
dfec508976 scons,python: Split the marshal binary into a c++ wrapper and script.
The new c++ wrapper is called gem5py, and will run any python script
using gem5's embedded python interpreter. The "marshal" functionality is
split out into a separate python script gem5py can run.

The command line for gem5py should look like this:

gem5py ${SCRIPT TO RUN} ${ARGS TO THE SCRIPT}

So, for instance, to marshal a file called foo.py, the command line
might look like this:

gem5py python/marshal.py foo.py

Also, this change reorders the sources for the python embedding action
and limits the max_sources for Transform() to 1, so that it just shows
the python file being embedded and not gem5py or the marshal.py script.
Those are still sources so dependency tracking works correctly, but they
are also implied and just add visual noise to the build output.

Change-Id: I7ae6bd114973ae44c3b634884b6dafc6577e0788
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49392
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-09-24 18:49:53 +00:00
Gabe Black
de05063ea7 misc: Update gem5's README file.
Remove references to alpha and SWIG. Change the list of configs to be a
list of configs and not ISAs even though they are frequently named after
the ISA, say that the options are in build_opts, add in missing top
level directories, update and generalize the description of full system,
re-wrap some text.

Change-Id: Id2fb9323dcb9d8bf8e86c78fb5e9aa6afed1c5b8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50755
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-23 23:14:55 +00:00
Bobby R. Bruce
a9cb8de7a4 Merge "misc: Merge branch v21.1.0.2 hotfix branch into develop" into develop 2021-09-23 19:57:47 +00:00
Bobby R. Bruce
b35f2c777a tests: Fix broken compiler-tests.sh
Change-Id: I4ab0f91fe42249acc973be20201a1bd54e582d16
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50829
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>
2021-09-23 17:29:28 +00:00
Kyle Roarty
2ff2a22b55 util-docker: Fix building gcn-gpu image
In the gcn-gpu image, rocBLAS wasn't able to be installed. This was
due to us not installing rocm-cmake, as rocBLAS is dependent on it
and will download the most recent version of rocm-cmake if it
isn't installed. The most recent version of rocm-cmake wasn't
compatible with the version of ROCm we're using.

This patch installs rocm-cmake before building and installing
rocBLAS instead of after.

Change-Id: Iaaa34d5e0d6594fddd0d1a7d147f43405163ca89
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50847
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 23:33:27 +00:00
Bobby R. Bruce
b0c2b278a9 misc: Merge branch v21.1.0.2 hotfix branch into develop
Change-Id: I225dddd6ec1399528f4759a3c5c5e306d8c7a38c
2021-09-22 11:43:57 -07:00
Bobby R. Bruce
4666a4f9e3 misc: Update RELEASE-NOTES.md for v21.1.0.2
Change-Id: Ib573775b9ef7de7663893f18980bb34b3d412210
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50751
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 18:37:48 +00:00
Bobby R. Bruce
ca921387ae misc: Update the version to v21.1.0.2
Change-Id: I4013ed678b367f95bb0f69e4a827ad04995cc3c0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50750
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 18:37:48 +00:00
CHEN Meng
59c4fd07cb base-stats: fix storage initializing
Commit (70194795c3) introduced std::vector with resize() to initializing all storages. This method caused data duplication in statistics. Storage is now initialized using loops.

Change-Id: I4350863a83671fc10cc02b5cb7d3b38e6cf4f565
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50747
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 18:37:48 +00:00
Bobby R. Bruce
c10982e441 tests: Update x86 boot tests to use x86-ubuntu-img
The x86-boot-exit resource is being deprecated for the more versatile
x86-ubuntu-img resource. The latter attempts to run `m5 readfile`,
allowing a user to specify a script to be run. If no script is specified
`m5 exit` is run. Therefore it can be used in the x86-boot-exit tests.

Change-Id: I7fecb314bd0e1d4be4f1181e57046e4621199b64
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50647
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Harris <mail@austin-harris.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-22 17:22:33 +00:00
Bobby R. Bruce
6d9f603142 tests: Add KVM CPU switch tests
These test switching from KVM cores to other, more detailed cores using
the x86-ubuntu-img resource.

Change-Id: Ief5d09084a88726fc3944e0c56f3a61a5d04ec1b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50487
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Harris <mail@austin-harris.com>
2021-09-22 17:22:33 +00:00
Daniel R. Carvalho
96c9d03fa6 base,tests: Add unit test for SymbolTable
Add a unit test for base/loader/symtab.*.

Change-Id: I81c14826ab629439897235cbaaf79047e603ff8d
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/43250
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 15:47:37 +00:00
Giacomo Travaglini
ee95d0f04d arch-arm: SCTLR.WXN not used in S2AP
Change-Id: I141f7088fce0e7eed01491920f84774394143b4a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50667
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 13:22:58 +00:00
Giacomo Travaglini
17a5422bec arch-arm: Implement Armv8.2 FEAT_UAO
Change-Id: I87b25a65e706ed6486347806a540b1dbf25231cb
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50390
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 13:22:58 +00:00
Giacomo Travaglini
ee0e92a432 arch-arm: Remove SPSR write mask
We are currently masking out the PAN and UAO field when writing
to the SPSR_ELx register.
This is not needed and we should treat them as RES0 instead if
FEAT_PAN and FEAT_UAO are not implemented

Change-Id: Ib65e3744f365825d2414b8092b3a79324be461b4
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50389
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-09-22 13:22:58 +00:00
Daniel R. Carvalho
cbffe30e64 sim,tests: Add unit test for sim/serialize.hh
Add a unit test for sim/serialize.hh.

==Bugs==
arrayParamIn cannot parse strings with spaces. Since spaces
are used as delimiters, strings containing spaces are parsed
as multiple entries of the array. The test that checks for
this has been disabled.

==Unexpected Behavior==
Serialization has an unexpected behavior when returning to
previous scopes. For example,

  ...
  SCS scs(cpt, "S1")
  paramOut(cpt, "param1", integer1)
  {
    SCS scs_2(cpt, "S2")
    paramOut(cpt, "param2", integer2)
  }
  paramOut(cpt, "param3", integer3)

will generate the output:
  ...
  [S1]
    param1=1
  [S2]
    param2=2
    param3=3

But the user might expect:
  ...
  [S1]
    param1=1
  [S2]
    param2=2
  [S1]
    param3=3

==Incovenient Behavior==
arrayParamIn with a std::array parameter is slightly
incovenient, since the raw data pointer must be extracted.
It may be worth it to add a template specialization.

==Not Tested==
paramInImpl is not being directly tested because it should
not be used as an external API - paramIn and optParamIn
should be used instead.

arrayParamIn with an InsertIterator parameter is not being
directly tested because the other versions should be used
instead.

Change-Id: If0c8f045aa317790d5fcb32e48629b113b62efc5
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41337
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 05:31:01 +00:00
Daniel R. Carvalho
df928b36f8 sim,tests: Add unit test for sim/serialize_handlers
Add a GTest for the functionality of sim/serialize_handlers.hh.

Change-Id: I1128c7adb12a3c7d091e26db13733ba45e1e61fe
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38776
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 05:31:01 +00:00
Daniel R. Carvalho
7a144c5d59 arch-arm: Fix memory leak of PMU events
Memory of PMU events was never being released.

Change-Id: I3cd9583103333008799f0873af3a490f847a21b5
Issued-on: https://gem5.atlassian.net/browse/GEM5-857
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38703
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 05:31:01 +00:00
Austin Harris
15924e1bff tests: Fix gem5 resources import in parsec test
Change-Id: I271cf89130f31777ef43b00e0c15cf44835977e3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50787
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 02:52:12 +00:00
Bobby R. Bruce
6090a43b93 tests: Add GCC-11 to the compiler tests
Change-Id: I3701e850433b597fb0d6d06e058a21607e4efc88
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50749
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 00:25:57 +00:00
Bobby R. Bruce
cbb58ae5d1 util-docker: Add a GCC-11 Dockerfile
This can be built to create an image that uses the GCC-11 compiler. At
present GCC-11 cannot be installed using APT by default. This
Dockerfile uses a special APT repository to do this and is therefore a
separate Dockerfile to the other GCC version targets.

Change-Id: Iafee92415d9047eedf3586c78722f973010f6050
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50748
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-22 00:25:57 +00:00
Gabe Black
6e23be0693 python: Get rid of ipython 0.10 and older support code.
Version 0.11 was actually the first version of ipython which even
supported python 3 at all, as far as I can tell. Because we have a
requirement to use at least python 3 (and not just 3.0 at that), we can
assume that the user must be using at least version 0.11 of ipython.
That means we can remove code which supported older versions.

Change-Id: I7f88aae9f64f6c6f027be52741cda0686f5ca5be
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50709
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 20:45:07 +00:00
Gabe Black
95cee873ed python: Get rid of version arg in OptionParser constructor.
This will report that gem5 is version 2.0, which is WILDLY out of date.
There are other ways of reporting the version of gem5 which are actually
kept up to date.

Change-Id: Ie09cdc8f3ef59696fe197c3491db102bda41ade0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50708
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 20:45:07 +00:00
Gabe Black
011dc236d3 python: Get rid of some unused cruft in main.py.
There was some code at the end of main.py which would let you run it
directly. This would parse options passed to the script, and show you
what they equaled.

Also, the "main" function would optionally let you pass in options to
override whatever it would find with parse_arguments. This is no longer
used.

Change-Id: Ib0effa7ac2b4a51b68994372a7c7fcf1c9b4dc13
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50707
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 20:45:07 +00:00
Austin Harris
f42ce27065 sim: Fix hang while terminating threads with fork
It is possible that gem5 is forked multiple times before the threads are
re-created, so don't wait for the barrier if the threads were already
terminated.

Change-Id: Ia04db2f3b1341c4d432178a37812fd882e148ec2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50710
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 15:08:15 +00:00
Gabe Black
bec16fbc31 misc: Move MemPool based calls to the SEWorkload.
These currently proxy to the System object, but this is one step towards
moving the MemPool-s out of the System and into the SEWorkload where
they really should have been from the start.

Change-Id: Id27e7b874c283abf07bd892c8467a9cc52e2fdff
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50342
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 02:05:32 +00:00
Gabe Black
9da405ce96 sim: Set up an SEWorkload pointer in the base Process class.
This will make it easier for the process object to access shared SE
level functionality and info.

Change-Id: I2cbddcabdf7264fde492b0566791d909ce2b10be
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50341
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 02:04:57 +00:00
Gabe Black
a024c9f19e arch-arm: Modify the AAPCS32 ABI implementation to use VecElems.
Use the VecElem register file when using the 32 bit ARM ABI. This is not
only consistent with an upcoming change which will make the 64 bit
vector registers and the 32 bit vector elements no longer act as views
into the same data, it also simplifies the implementation a little.

Change-Id: Ie8f17b764402a6331012f13b7605520512c2d5c9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50207
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 01:33:34 +00:00
Gabe Black
4d398302c4 sim: Make the page shift a member of the MemPool class.
Pass it in through the constructor, rather than have the MemPool call
into the System object every time it needs the page shift. This is
simpler, more efficient, and removes a dependency between the MemPool
class and the System class.

Change-Id: I059bcb0db249251b32bff1beba3eadfe306d9081
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50339
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 01:07:26 +00:00
Gabe Black
6d9cbb9d6e sim: Exclude the m5opRange from the system mempools by construction.
Don't look for the m5opRange in the memory pools when allocating memory
so that it can be skipped, just exclude it from the memory pools
entirely when they are set up. This removes a dependence between the
memory pools and the system class.

Change-Id: I0d88c1bc2f889f32b234073cff8988319fb36ea5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50338
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-21 00:58:24 +00:00
Gabe Black
e7bf4db7bd sim: Squash a long standing warning from pybind11.
The module_ constructor which takes a module name and an optional
docstring is deprecated. This change replaces it with the
create_extension_module call that it would result in, which gets rid of
the warning.

Change-Id: I700b4afcf1e5e2548af18e2eb2a7b1214c989807
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50587
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 23:17:46 +00:00
Gabe Black
e9b7f08abb base,python: Expand AddrRange exclude and add subtraction operators.
Expand exclude to work with an AddrRange or AddrRangeList, define
versions to exclude both from an AddrRangeList, and make all available
through subtraction operators. Add -= operators for AddrRangeList with
another AddrRangeList or AddrRange.

Change-Id: Ic48f0c45a4809dbc51e1d3133e8319134aabe29e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50347
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
2021-09-20 20:52:05 +00:00
Gabe Black
416939c5c2 misc: Use AddrRangeList more consistently in the AddrRange class.
We go through the trouble of defining an AddrRangeList typedef, but then
we don't use it consistently and use std::vector<AddrRange> instead.

This change converts the exclude method from using
std::vector<AddrRange> to AddrRangeList, and also adds a constructor
which takes an AddrRangeList.

Because there is a lot of code which uses the std::vector based
constructor, this change does not remove that method.

Change-Id: I1a03b25990025688aa760a67d3e7a2e8141384ce
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50344
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 20:50:30 +00:00
Gabe Black
ef2aaf995d tests: Use --silent-redirect when running gem5 tests.
The redirects are to temp files which are going to be deleted at the end
of the test, and there's no reason to clutter up the output with nonsense
paths to non-existent files.

Change-Id: Id312b1f25f03d7c57318ca0c58902e4193bd1e91
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50589
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 19:20:20 +00:00
Gabe Black
0998e99131 python: Add a --silent-redirect option to gem5.
This complements the --redirect-stdout and --redirect-stderr options and
supresses the message about where those streams are being redirected
which print to the original stdout.

Usually this is very helpful since it lets you know where to look for
simulator output. If you're running gem5 in an automated environment
like our testing framework however, the file name is a random temp file
which will be deleted as soon as the test is finished running.

The --silent-redirect option can be used in these particular scenarios
to, for example, avoid lots and lots of useless lines in the test output
naming files that no longer exist.

Change-Id: If56b61567b3d98abd9cc9d9e9d661ea561be46f8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50588
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 19:19:59 +00:00
Bobby R. Bruce
b5ffa5418f python: Remove 'is_ruby' function
This function is not used and should not be used. It does not really
make any sense.

Change-Id: I79ee7283ddbc282b9b803df33ad266b7a88a9c67
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50168
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-20 18:44:40 +00:00
Bobby R. Bruce
958029328f python: Add has_dma_ports check to mesi_two_level
Previously the MesiTwoLevelCacheHierarchy assumed the board had dma
ports. This change adds a simple check and skips adding the
DMASequencers if the board does not have any.

Change-Id: I64ee68267d16c9d9a6096ba7fd660f04515b2b3c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49929
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-20 18:44:40 +00:00
Bobby R. Bruce
752394b243 python: Add connect_interrupt() to mesi_two_level for non-X86
The MESITwoLevelCacheHierarchy did not call `connect_interrupt()` on
CPUs if not ISA.X86. This patch fixes this.

Change-Id: I46ae19f588e2eadce60f145067e8a7cef0d44afd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49928
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-20 18:44:40 +00:00
Bobby R. Bruce
7b84d5f946 arch-riscv,tests: Add RISCV boot tests
This adds RISCV boot tests. Due to TODO items highlighted here:
https://gem5.atlassian.net/browse/GEM5-1080, these tests only run to a
tick as the RISCV disk image does not contain the necessary features to
run a proper "boot-exit" test as we do with the X86 boot tests.

Change-Id: I0744ff46f78e6ec83b7eabf53146397caad9b97a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49869
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 18:44:40 +00:00
Bobby R. Bruce
10af78d685 arch-x86,tests: Rename boot_exit_disk_run.py
Rename to 'x86_boot_exit_run.py'. It's X86 specific and the name should
make this obvious.

Change-Id: Iab124b166f16a3dfbe4f3a5a455166744c3b1a2d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49868
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-20 18:44:40 +00:00
Bobby R. Bruce
77b1338985 arch-riscv,configs,python: Update riscv_fs.py/riscv_board.py
This patch incoporates improvements to the riscv_fs.py and
riscv_board.py:

* Adds 'Resource' objects to download needed resources.
* Adds 'requires' function calls where necessary.

Change-Id: I2ae4f34221d781ed6d71c9f69d56833845f537c4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49867
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-20 18:44:40 +00:00
Bobby R. Bruce
e3d8af0f1a python: Rename 'components_library' to 'gem5.components'
The 'components_library' name was always a placeholder. A more accurate
name would be the 'gem5 library'. This is analogous to standard
libraries shipped as part of programming languages. Over time this will
begin to incorporate more commonly used code at the Python configuration
script level. Most of the former 'components_library' is now in
'gem5.components'.

Change-Id: I5927db7004c43b29c39e7767da3f779627081618
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49691
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 18:44:40 +00:00
Bobby R. Bruce
f775c4c4a7 python: Move the components lib to be compiled in the binary
There has been some debate on how best to distribute the components
library. This change builds the components library into the gem5 binary.
The components library will now function similar to the `m5` library.
There is no need for awkward imports or obtaining the library from some
third-party source.

Additional incorporated in this patch:
* Added `__init__.py` to the Python modules.
* Fixed a typo in the `abstract_ruby_cache_hierarchy.py` filename.
* Ensured that imports within the library are relative.

Issue-on: https://gem5.atlassian.net/browse/GEM5-1023
Change-Id: I3988c8710cda8dcf7b21109a2cf5c3f1608cc71a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49690
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Austin Harris <mail@austin-harris.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 18:44:40 +00:00
Giacomo Travaglini
136809cc45 arch-arm: Use EL0 permission logic when checking unpriv reference
An unprivileged memory reference (LDTR and STTR) executed at EL1
should be regarded as an EL0 memory access

Change-Id: Iae5e6e582f9c5a57340f27a84db463bcb8996922
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50388
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 15:40:05 +00:00
Giacomo Travaglini
fde9e46951 arch-arm: Refactor AArch64 MMU permission check
This refactor of the MMU::checkPermissions64 method is moving
the TLB entry access permission bits (AP,XN...) checking into
new separate stage1 and stage2 helpers

Change-Id: If7d42538f5ea1ec21e918cccaf469fcb6a36d82b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50387
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 15:40:05 +00:00
Giacomo Travaglini
6b2faf3723 arch-arm: Remove unused TLBType
The cached state is global now (per-MMU)

Change-Id: I70bc847813086f678b4ff32722b7f6e3ceaae6f5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50527
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 09:03:19 +00:00
Giacomo Travaglini
377155c10b arch-arm: Syncronize GIC CPU interface when changing EL
From the GIC architecture specification (ihi0069) [1]

"The assertion and de-assertion of IRQs and FIQs are affected by the
current Exception level and Security state of the PE. As part of the
Context Synchronization that occurs as the result of taking or returning
from an exception, the CPU interface ensures that IRQ and FIQ are both
appropriately asserted or deasserted for the Exception level and
Security state that the PE is entering."

Kudos to Quentin Forcioli for finding the bug

[1]: https://developer.arm.com/documentation/ihi0069/latest

Change-Id: I10444a3aad5c06aabc13e1cbd70a32192531a31d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50508
Reviewed-by: Quentin Forcioli <quentin.forcioli@telecom-paris.fr>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-20 09:03:19 +00:00