Commit Graph

18399 Commits

Author SHA1 Message Date
Bobby R. Bruce
73b59bccd0 configs: Fix terminology to 'ticks' in NPB configs
Instructions was not the correct terminolgy here. It should be ticks.

Change-Id: I08c125049e8dc2cc8c488a820530c6c6a45d7367
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53847
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-12-11 03:58:15 +00:00
Bobby R. Bruce
35f18c4c50 stdlib,configs: Set SPEC examples partition param to optional
The SPEC2006 and SPEC2017 example configs require the passing of SPEC
disk image to function correctly. Prior to this commit a root partition
parameter was required. However, disk images don't necessarily have
partitions. In this case an empty string needed passed.

This patch makes the root partition parameter optional. If a disk image
does not have a root partition, it does not need specified.

Change-Id: Ic0093c70c72ab83ffaca54c8ad24245d84a5e5ba
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53846
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-12-11 03:58:15 +00:00
Bobby R. Bruce
5622560ce9 stdlib: Add CustomDiskImageResource
This CustomResource can be used to specify a custom, local disk image.
It allows the user to specify the disk root partition parameter
considerably easier than when setting a disk image through a
CustomResource.

Change-Id: I8189ad065124d028aea9fab1c7f07108aa4ce6d5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53844
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-12-10 20:08:11 +00:00
Bobby R. Bruce
69255abeb0 stdlib: Fix CustomResource metadata
CustomResource's base class, AbstractResource, must be constructed with
a dictionary for the 'metadata' field. However, if the user did not
specify any metadata for the CustomResource, None is passed. This is
not permitted and can cause error. This patch ensures the metadata is
set to an empty dictionary by default

Change-Id: I358725ee6982dc9c6410eac3ad8194fa676dd326
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53843
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-12-10 20:08:11 +00:00
Giacomo Travaglini
ef34cd0a00 arch-arm: Add partial param to TlbEntry
The boolean will flag a partial translation

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

Change-Id: Ia27e321cd5c4b062cafcfd0dc39a208a4d5e3247
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52123
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-10 16:09:09 +00:00
Giacomo Travaglini
db05eb9d89 arch-arm: Use ArmRelease in MMU and TableWalker
Change-Id: I210c73e0e66390f702dad6e7d737c8271b119091
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51408
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 19:21:03 +00:00
Matthew Poremba
c028af111a arch-gcn3,gpu-compute: Move TLB to common folder in amdgpu
This TLB is more of an "APU" TLB than anything GCN3 specific. It can be
used with either GCN3 or Vega. With this change, VEGA_X86 builds and one
can run binaries with Vega ISA code using the same steps as GCN3 but
building the Vega ISA instead.

Change-Id: I0c92bcd0379a18628dc05cb5af070bdc7e692c7c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53803
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 17:26:15 +00:00
Giacomo Travaglini
7f2079f662 ext: Avoid content duplication in gem5-SST docs
A brief guide on how to run the gem5 SST example scripts
is already provided in the README file, so there is no need
to copy-paste it in the INSTALL file, which should cover
the building phase only.

Change-Id: I49c677f54450d97a1c8508764e45ab23b4b5fe33
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53629
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 10:49:08 +00:00
Giacomo Travaglini
5e89f1f679 ext: Add an Arm section for gem5-SST README.md
Change-Id: Ia10948a836797855219aef406bf38f52d28d8e26
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53628
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 10:49:08 +00:00
Giacomo Travaglini
12502d2529 ext, configs: Add example Arm gem5 SST platform
JIRA: https://gem5.atlassian.net/browse/GEM5-1121

Change-Id: I7544823710d9a63146d18d4fe9b7c969312ad4d7
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53627
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 10:49:08 +00:00
Giacomo Travaglini
85dc34ebf8 ext: Make gem5-SST support CMOs
Change-Id: I45047702018512dfef5a93a633871821f3c69820
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53626
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 10:49:08 +00:00
Giacomo Travaglini
d421e7acd0 ext: Fix segfault in simulate_limit_event shortcut
In the SST integration the top of the main queue is checked
for an event before starting the simulation.

If the first event is scheduled after the ending tick, we are
just returning the simulate_limit_event without entering
the simulation loop.

If the method is called with an empty queue, the following
line will segfault (getHead() == nullptr):

gem5::mainEventQueue[0]->getHead()->when()

With this patch we are covering the case where we have
an empty event queue

Change-Id: I04463b45b269361172a9dd2fe1ba6e9428ac64f5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53723
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 10:48:44 +00:00
Bobby R. Bruce
c96409f301 dev: Remove unused private variable in lupio_tmr.hh
This was causing the compiler-checks to fail:
https://jenkins.gem5.org/job/compiler-checks/71

Clang-11 complained of an unused private variable. This variable is
removed in this commit.

Change-Id: I4a43d3cae0fe4ffed4e1df3d94849ac7dc24cc0b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53823
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-09 00:39:10 +00:00
Kaustav Goswami
99c56f95a6 stdlib,configs: Config added for SPEC CPU2017 using stdlib.
This change adds a config file to execute SPEC CPU 2017 benchmarks
using gem5 stdlib.

Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Change-Id: I1c4e7cb56e18db44eac5549f9c7ca7379e377e04
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53166
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 19:34:00 +00:00
Kaustav Goswami
0830b273cb stdlib,configs: Config added for SPEC CPU2006 using stdlib.
This change adds a config file to execute SPEC CPU 2006 benchmarks
using gem5 stdlib.

Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Change-Id: I4287433717e4a3d05136b27554accd577275e1be
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53165
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 19:34:00 +00:00
Kaustav Goswami
e2eb6ae20f stdlib,configs: Config added for RISCV boot-test using stdlib.
This change adds a config file to boot Ubuntu-20.04 using RISCV ISA
using gem5 stdlib. It also adds a new test for the same.

Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Change-Id: Id2b5e46e7ba9e3c4701c97330406537dffa44479
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53024
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 19:34:00 +00:00
Kaustav Goswami
23910fb2d0 stdlib,configs: Adding a config to run GAPBS using stdlib.
This change adds a config file to execute GAPBS benchmarks using
gem5 stdlib. It also adds a new test for the same.

Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Change-Id: I10326cace4e6fa160e02e479fb4443277af3966f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53023
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 19:34:00 +00:00
Kaustav Goswami
84cd82f139 stdlib,configs: Adding a config to run NPB using stdlib.
This change adds a config file to execute NPB benchmarks using
gem5 stdlib. Also, it adds a new test for the same.

Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Change-Id: I527b7d12be7ab43e61dde507095ebf9fa4b44867
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52964
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 19:34:00 +00:00
Kaustav Goswami
1f88d699f1 stdlib,configs: Adding a config to run PARSEC using stdlib.
This change adds a config file to execute PARSEC benchmarks using
gem5 stdlib. It also adds a new test for the same.

Change-Id: I2dfaae388f4a697911ef7894b35f7bfccd7e4761
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52943
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 19:34:00 +00:00
Matthew Poremba
85eaf9c799 arch-gcn3: Delete extraneous registers header
This file is a duplicate of arch/amdgpu/gcn3/gpu_registers.hh and is in
the wrong location. It should be removed to avoid mistakenly editing the
wrong file.

Change-Id: Ie96e22fe8f78fda954af788b472ec2df4782e4a5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53743
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2021-12-08 14:59:53 +00:00
Gabriel Busnot
a9beed3a03 python: Define deprecated and callOnce decorators
Change-Id: I85d52a65308b9d5068a9aaa46597e5eaf8175064
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53523
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:21:14 +00:00
Gabe Black
4c1422e3ba scons: Also build param struct .cc files using a helper script.
There was a comment in the SConscript talking about building a single
.cc file for all the param structs, but that's not what the code was
actually doing. This change drops that misleading comment.

Change-Id: I3a5e4424e1021d6dfbdeafcef7709dae988747a4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49425
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-12-08 08:01:23 +00:00
Gabe Black
61b7268b2e scons: Use an external script to generate param struct headers.
Change-Id: I633537f2b7542350895e50fe79dd80c88a811a41
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49424
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-12-08 08:01:23 +00:00
Gabe Black
da057512b9 scons: Record the sim_objects and enums passed into SimObject().
We'll use those to tell SCons what params headers, etc, to generate.

Change-Id: Iedc9c6a8cdfc2201e85bc7ba1d420dfa08b90cab
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49423
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-12-08 08:01:23 +00:00
Gabe Black
6106301957 scons: Ensure the gem5py_env always has embedded python.
Even if the gem5 binary itself won't.

Change-Id: I825e2cbed35a3dcc4fb4bec6f2fd71e78164e7c0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49422
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:01:23 +00:00
Gabe Black
5f6021a354 python,scons: Add a gem5py_m5 program which supports the m5 module.
Like gem5py which uses the same main source file, this program will run
arbitrary python scripts. Unlike the other program, it will include
support for the m5 module. That will make it capable of generating
SimObject param, enum, etc c++ files.

Change-Id: I15fd7545f6b1ea6559cbe27cef30c778867ebe70
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49421
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-12-08 08:01:23 +00:00
Gabe Black
dc4daa010a python: Remove python/embedded.cc's dependence on the rest of gem5.
If embedded python modules are going to be built into other binaries,
then they can't depend on other parts of gem5.

Change-Id: I4e12f1962cb6330e70866a40388689102c23693a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49420
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:01:23 +00:00
Gabe Black
e9c833a959 scons: Remove a workaround for a very old SCons bug.
I can't conclusively verify that this issue has been fixed because I
can't find any information about it on the internet. It's "SCons bug
2006" and "gem5 bug 308" but neither project still uses whatever bug
tracking mechanism those numbers correspond to. The change was mentioned
in the gem5 code base at least as early as 2008, and so hopefully has
been fixed in the last 13 years. I did a clean build without this
workaround, and things seem to work.

Change-Id: I155f0e72cb720fb5d35d8098375a45a69ea02263
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49419
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:01:23 +00:00
Gabe Black
1799526954 python,sim,util: Move EmbeddedPython into it's own file.
By separating out this utility class, we make it possible to build
embedded python modules into other binarys without dragging along lots
of other, unrelated gem5 dependencies.

Also, move the class from sim/init.hh (which is a largely unrelated
name) to python/embedded.hh which much more directly describes what that
file contains.

Change-Id: Ia83439144893ad8401a5d51003e2686d9c9b2d7b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49418
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:01:23 +00:00
Gabe Black
2af584096f sim: Collapse gem5Main into main.
gem5Main is short and simple and only calls into python's m5.main()
function. It's also only called from one place and only makes sense to
call from one place, so lets just put it there inline and keep
everything together.

Change-Id: I17e303e3a29d5473f0f31cd51d7fb367f6c81f9e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49417
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:01:23 +00:00
Gabe Black
ff802f4e27 sim,misc: Move protobuf housekeeping out of gem5Main.
Put that code into a singleton class in src/proto, so that it gets
called during initialization and teardown of gem5 without cluttering up
gem5Main. This also removes the need to use #ifdefs to guard for
actualling having protobuf support.

Change-Id: I93b5d994eee478a9c159a3f3d02b3e996af02a3e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49416
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:01:23 +00:00
Gabe Black
619e443700 sim: Clean up and simplify main().
Use pybind11 to simplify the python parts, update some inaccurate
comments, rename m5Main to gem5Main, remove code which supported python
versions less than 3.

Change-Id: I139af7d3d1052cfbce779a87e34d7ce997876a60
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49414
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:01:23 +00:00
Gabe Black
203c835c7e python: Insert gem5's m5 importer at the front of sys.meta_path.
This is equivalent to putting a path first in $PATH, ie it will make
sure that m5.foo resolves to gem5's internal m5 package, and not
whatever directory named m5 happens to be nearby.

Change-Id: I762d47da8ed8e4cfdf03e412d7dd7cc91a691b58
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49415
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:01:23 +00:00
Gabe Black
4cffd1e721 sim: Use pybind11 consistently in sim/init.(hh|cc).
Use pybind11 to avoid having to use the python C API directly, which is
simpler, easier to read, and less error prone. Also, use its
PYBIND11_EMBEDDED_MODULE macro to set up the _m5 module instead of a
callback which has to be proactively called from main().

Change-Id: I9c8bcebea934844d16a1fdd88f66a5e66ef0486f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49413
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:01:23 +00:00
Gabe Black
7cee5a02d5 sim: Eliminate m5MainCommands and simplify calling m5.main.
m5MainCommands had been a way to override the python code which would
get the python side of gem5 started, used by some "unit" tests which
were really tests of all of gem5 but focus on a particular area. Those
tests have either been converted into real unit tests or eliminated,
and so that mechanism is no longer needed.

This change eliminates that mechanism, and also uses pybind11 to
significantly simplify the code that calls m5.main().

Change-Id: I553ae17074cd5389708f1b7313630a13a6946d76
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49412
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:01:23 +00:00
Gabe Black
15157710f8 python,sim: Change how the m5.* importer code is integrated.
Previously, the importer module was built into gem5 as a compressed
bytecode blob like all the other code, and it had to be singled out and
installed manually so that it could help bring in all the other modules.
That adds some amount of complexity since it has to be identified and
treated as a special case.

Instead, this change builds it into gem5 using pybind11's
PYBIND11_EMBEDDED_MODULE macro, and a string that gets evaluated into
the new module's __dict__. This means the importer module is
automatically available just by building in that .cc, and it can just be
imported to start using it.

Theoretically all the embedded python could be handled this way, but
that would mean building it into gem5 as raw strings which wouldn't even
be compiled into byte code until run time. That would take more space in
the binary, and also delay catching simple errors.

Change-Id: Ic600bf6bce41a53289a2833484a655dd5a226e03
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49410
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-12-08 08:01:23 +00:00
Gabe Black
2a348ccd6c python,scons: Add a dummy m5/objects/SimObject.py.
This serves two purposes. First, it's a way to declare the base
SimObject class and params using the SimObject() SCons mechanism, while
the actual class still lives at m5/SimObject.py.

Second, it alleviates a very old inconsistency where *most* SimObjects
are imported using the m5.objects.Foo path, except SimObject itself
which lives under m5.SimObject. With this change, it will live under
both, more or less.

It may be possible to remove the inconsistency entirely in the future
and move m5.SimObject entirely to m5.objects.SimObject and only declare
it with SCons's SimObject(), but that won't quite work during this
transitional period, and it wouldn't give users a chance to move over to
the new name.

Change-Id: Ic714bacfaef73d1116ab7ff716cf19b7ce4b67e1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49408
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-12-08 08:01:23 +00:00
Gabe Black
25bfa81ea8 scons: When importing SimObjects, use a copy of globals().
Use a copy of globals when importing SimObjects, instead of the real
deal that the SConscript runs under. This avoids polluting the
SConscript namespace.

Change-Id: I689d693d93cc8998be0967ec2b0c58f5851d39cf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49407
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-12-08 08:01:23 +00:00
Gabe Black
1c233ee9d2 scons: Add sim_object and enums arguments to SimObject().
This will explicitly declare what SimObject and Enum types need to be set
up in C++, which will make importing all the SimObject modules during
the setup phase of SCons uneccessary.

Change-Id: Id2d7603daf33b236ceaa0789e2f089f589d34e62
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49406
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 08:01:23 +00:00
Yu-hsin Wang
60e55ecef8 fastmodel: CortexR52 implements setResetAddr interface
Change-Id: I45da1c1538430061cc89f666cb02aa5fe77abcba
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53328
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Earl Ou <shunhsingou@google.com>
2021-12-08 03:12:36 +00:00
Yu-hsin Wang
0e48a05ed1 fastmodel: CortexA76 implements setResetAddr interface
Change-Id: I3612a62e2145d3442f01a69b21954fc00dd5ade9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53327
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Earl Ou <shunhsingou@google.com>
2021-12-08 03:12:36 +00:00
Yu-hsin Wang
869d225e51 fastmodel: add setResetAddr interface
setResetAddr interface allows us to change the reset addr of fastmodel
cores. This will enable us to simulate hard reset or even complicated
boot sequence.

Change-Id: I0de828a4cd693119c0b44c74866efc1fffa81ace
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53326
Reviewed-by: Earl Ou <shunhsingou@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-08 03:12:36 +00:00
Gabe Black
7bd668217b arch-x86: Hook up the newfstatat system call for 64 bit Linux.
Jira Issue: https://gem5.atlassian.net/browse/GEM5-1117

Change-Id: I711fc7d7009621bb317981293725416ae74d1d3d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53206
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2021-12-07 22:58:40 +00:00
Gabe Black
a8e9258f99 arch-x86: Hook up system calls for 64 bit processes.
These system calls already exist, they just weren't hooked up yet.

Change-Id: I5c2c66d34d0286aafe686e6511948ed4a6719672
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53203
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2021-12-07 22:58:40 +00:00
Gabe Black
8ea2101b0e sim-se: Implement the newfstatat system call.
Jira Issue: https://gem5.atlassian.net/browse/GEM5-1117

Change-Id: Id611bc7d6369b7d94ce27f33aff74a61879ce900
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53205
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2021-12-07 22:58:40 +00:00
Gabe Black
1808da8f97 sim-se: Handle empty paths when resolving an "at" path.
When the "path" argument is empty, use the file name of the node
referred to by the fd file descriptor. This matches the behavior of
"at" system calls when the TGT_AT_EMPTY_PATH flag is set. The system
calls themselves are responsible for checking for that flag, and
returning an error if an empty "path" is not allowed.

Change-Id: Ib48d91ff983b3edb6f65e83686b90d79d74f3471
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53683
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-07 22:58:40 +00:00
Melissa Jost
954357d1ff configs: Added LupV script to configs
This commit adds run_lupv.py, the script to run the LupVBoard, as well
as a README that details how to set up your system in order to run
the LupIO devices.

Change-Id: Ibea098f0409819b4c79063ab0be01518c7c6a61f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53046
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2021-12-07 21:39:57 +00:00
Bobby R. Bruce
61d824b78e stdlib: Update the LupvBoard to use KernelDiskWorkload
Change-Id: I5857f70e6ca61b8916792e634d20cdf827b21bd0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53085
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2021-12-07 21:39:57 +00:00
Bobby R. Bruce
05878dc581 stdlib: Update the LupvBoard to use 'requires'
Usage of this function was previously avoided due to a bug which has
since been fixed:
https://gem5-review.googlesource.com/c/public/gem5/+/53003

Change-Id: Idc76ca26d02dcfbb290cebcca297e50e905d8e6d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53084
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2021-12-07 21:39:57 +00:00
Bobby R. Bruce
d05145c5cb stdlib: Update the LupvBoard to account for stdlib changes
This patch updates the board to account for the following changes:

* https://gem5-review.googlesource.com/c/public/gem5/+/51790
* https://gem5-review.googlesource.com/c/public/gem5/+/52184
* https://gem5-review.googlesource.com/c/public/gem5/+/52183

These changes, broadly speaking, remove the SimpeBoard as a superclass
and instead have all the boards inherit directly from the AbstractBoard.
It also fixes the order of operations (the order in which components are
incorporated and the board it setup).

Change-Id: I829ed515da28163cafbd292a9c141be4d350636e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53083
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2021-12-07 21:39:57 +00:00