Commit Graph

17885 Commits

Author SHA1 Message Date
Gabe Black
98b50f3f2b scons: Generalize the Executable class to cover libraries too.
This way the shared and static gem5 libraries can be treated like other
top level build targets.

Change-Id: I04dd82f9be86df0a5cabd2e4934077c33235911c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48369
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
2021-09-14 22:12:25 +00:00
Austin Harris
0703c968ca scons: Setup the m4 tool for libelf
This resolves an error that SConsEnvironment has no attribute 'm4' on
some systems.

Change-Id: I9dfce277308d1939c3bd392f83dc49937884660e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50259
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-14 15:20:58 +00:00
Austin Harris
5eff9b5e9b python: Fix switchable processor event queues
This fixes the event queues added to the switchable processor in
ade8c08 to only be added to the KVM cores.

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

Change-Id: I74ebc4aa52a44662602b9512c23c8fb8a40101d0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50229
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-13 22:34:59 +00:00
Bobby R. Bruce
235dbd3dd0 tests: Fix incorrect ref path for insttest
This is part of the fix for the following nightly build error:
https://www.mail-archive.com/gem5-dev@gem5.org/msg40426.html

Change-Id: I60d9052b5d6dc812892b3d90baf19b8fd396f47b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50228
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-12 01:21:53 +00:00
Bobby R. Bruce
8c1f06b146 tests: Fix verifier to ignore downloader stdout
This part of the fix for the following nightly build error:
https://www.mail-archive.com/gem5-dev@gem5.org/msg40426.html.

The new resource downloader outputs messages to stdout informing the
user of the download status. For tests which compare the stdout to some
reference, these lines need ignored.

Change-Id: Ic209c37a6511f8eebf5a940dd01c769d0eb971fc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50227
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-12 01:21:53 +00:00
Bobby R. Bruce
22126f952b Merge "misc: Merge branch v21.1.0.1 into develop" into develop 2021-09-10 16:02:07 +00:00
Samuel Stark
2c457d2a9f cpu: Fix TME for dyn_o3_cpu
Commit c417b76 changed the behaviour of addRequest(),
but did not update documentation or the HTM-related logic that used it.

Updates documentation for addRequest() in light of c417b76,
refactors request class to be idiomatic and use assigned byteEnable,
made HTM cmds pass in a correct byteEnable.

Change-Id: I7aa8c127df896e81caf915fbfea93e7b4bcc53b7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50147
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-10 08:13:59 +00:00
Gabe Black
f4d8200178 scons: Pull some python related mechanisms out of USE_PYTHON guards.
We don't want to build certain files if USE_PYTHON is disabled, but we
can still tell scons how to.

Change-Id: I38c7c93f609cfcedc350f8270f0b239b69c4f101
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48367
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-10 04:19:24 +00:00
Gabe Black
e20e3cf47e scons: Change how the test object file suffix is applied.
This had been done by prepending the letter "t" to the suffix, with the
intention of turning a suffix like ".o" to ".to". Unfortunately SCons
stores both the actual suffix and the "." in that variable, so what we
ended up with was ".o" => "t.o", so test.o would become testt.o.

This change updates that logic to prepend a ".t" in front of the
existing suffix, skipping over it's first character which is assumed to
be a ".".

Change-Id: Id8c5f893413284868c2dc2a1a5e879b86790ed76
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50067
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-10 04:19:24 +00:00
Bobby R. Bruce
0041ecb741 tests,gpu-compute: Add GCN3 Square test to Nightly
Change-Id: I734a470d481f4012148820f62fdc3f535ea3d8f8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50167
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-10 00:03:27 +00:00
Bobby R. Bruce
01ff91991b tests: Fix x86-boot-tests nightly tests
The nightly tests were failing as reported here:
https://www.mail-archive.com/gem5-dev@gem5.org/msg40394.html.

This was due to the tests trying to run our MI_Example test against
GCN3_X86 instead of the X86 ISA target. This patch fixes the issue.

Change-Id: I8ea692ffc06e3d7c4150074ed22e16096b3dbb5e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50128
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-09 16:29:28 +00:00
Gabe Black
abf6b8b7b6 cpu: Generalize the vec reg types out of InstResult.
Use templates to delegate knowing what these types are to whatever is using
InstResult. This will need to be even more generalized at these call
sights so that we don't just push around the dependencies, but that will
have to be handled later.

Change-Id: I45915d70ea06caed06f0ccf356f9e2e1acbd6c61
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49131
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-09 16:03:18 +00:00
Jason Lowe-Power
a1fa9f94b8 arch-riscv: Remove unused stats
These stats were unused and caused a warning about legacy stats. From
what I can tell looking at the blame, they were never used.

Change-Id: If2886e91dd776c34354a79a4cbc447ffe5988982
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50068
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-09 15:01:38 +00:00
Austin Harris
ade8c08e7a python: Update switchable processor to support KVM
Change-Id: Ie843e2b4ab6e506bb195bfcef33cead9a6273901
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50127
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-09 06:54:44 +00:00
Bobby R. Bruce
6ab4d09cd1 tests: Add weekly.sh for Weekly tests
This script is to be run by our Jenkins instance on weekly basis. At the
time of this commit, this is running benchmarks.

Change-Id: Id6ca1adf74690d3112fb9f1b18077c76a78b2ce2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49615
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 22:44:31 +00:00
Bobby R. Bruce
5ae5340487 tests: Add memory traffic generation tests
These test the gem5 components memory components via a traffic
generator.

Change-Id: Ifba78a6f4a062102da72c88f4df70b2e7fee0888
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49559
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 22:44:31 +00:00
Bobby R. Bruce
c99fbbf073 configs,python: Fix test_board 'setup_memory_ranges()' call
Change-Id: I8e02b8bfbfa4b0efdb173dd3ab39bb458a169a57
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49612
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 22:44:31 +00:00
Bobby R. Bruce
5d68d32532 configs,test: Move components-lib scripts to tests
Previously these scripts were in `configs/example/components-library`
though they are now used purely for testing purposes and have therefore
been moved to `tests/gem5/configs/example/components-library`.

There should be example scripts for usage of the components library, but
these scripts are no longer suitable since being made more flexible for
the purposes of testing.

Change-Id: I7c4d5bb86fe94898f006220dd962841344b1868e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49558
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 22:44:31 +00:00
Bobby R. Bruce
964e2c0601 tests: Update test_exit.py to run with simple_binary_run.py
In addition, Python black has been run on simple_binary_run.py

Change-Id: I6e7580f7bbdf249a081302dd46a14df95d7d53bb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49557
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 22:44:31 +00:00
Bobby R. Bruce
520b775b32 tests: Updates test_hdf5.py to use simple_binary_run.py
In addition, python black has been run on test_hdf5.py

Change-Id: Ib39ed8cf71354fe07519a68d39468b8b3a5caf1b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49556
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-08 22:44:31 +00:00
Bobby R. Bruce
5c949b0c01 tests: Update the insttest to use simple_binary_run.py
In addition, test.py has been formatted with Python black.

Change-Id: If813c80e15a019502c60ab09fb62484fc2cdf0c6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49555
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 22:44:31 +00:00
Bobby R. Bruce
86d16db5dd tests: Update hello_se to use simple_binary_run.py
Additionally: test_hello_se.py has been formatted with Python black.

Change-Id: I14235c74dae2d98be78aadfe4bf825ea881c5300
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49554
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 22:44:31 +00:00
Bobby R. Bruce
949c12e0d5 configs,python: Update simple_binary_run.py for testing
This allows us to test the running of bare-metal binaries on gem5. The
current design assumes the binaries to run are part of gem5 Resources.

Change-Id: I4f0f40a4628fd5f5951d89079824369a219d6e91
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49553
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 22:44:31 +00:00
Bobby R. Bruce
1b7c9f0edb misc: Merge branch v21.1.0.1 into develop
Change-Id: Ia1df6f9bce23633a2fef5c818d26a043f8d8e39d
2021-09-08 10:50:17 -07:00
Bobby R. Bruce
082f0835b0 misc: Update the version to v21.1.0.1
Change-Id: I64055b88bc3ba3f1e104ad796abec6ff4a4b3b11
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50031
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-08 17:26:12 +00:00
Bobby R. Bruce
94a8afc843 misc: Update release notes for v21.1.0.1 Hotfix
Change-Id: I8a99b2602b1fce566006a4e07aee8c3b574a6ae1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50030
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-08 17:26:12 +00:00
Tom Rollet
fc045f9a6b scons: fix hook for 'deprecated' attribute
On the new release, the compilation is polluted by the same warning:
    > ''deprecated' attribute directive ignored

It seems that the hook added in this patch does not work:
https://gem5-review.googlesource.com/c/public/gem5/+/45246/1..7

The snippet of code compile with TryCompile on g++{8,9}.
It probably comes from the fact that the compilation
only creates a warning and not an error.

By adding temporarily '-Werror' for this compilation test,
it filters the faulty gcc versions.

Change-Id: I2b8b7a1a7e06df437b76e98d212947f4f9452311
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48843
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
(cherry picked from commit a366e66272)
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50028
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2021-09-08 17:26:12 +00:00
Bobby R. Bruce
590daeb901 learning-gem5,tests: Move Learning gem5 Part 3 to run nightly
The Learning gem5 part 3 tests require the building of the X86_MSI
binary. These are the only tests that require this protocol. Building
this is not worth it to just run these tests. They've therefore been
moved to be run nightly rather than as a pre-submit/kokoro test.

Change-Id: If0cdd9c30a160a01cef5fcda8a5433ab2d6ac882
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50027
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-08 04:19:05 +00:00
Bobby R. Bruce
f1a56c1f5a tests: Add PARSEC tests
Change-Id: I74adbe25c34a21963ff3252cff13cec8203b191c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49552
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
df3601b265 configs: Fix SimpleCore for connect_interrupt() case
Something needs done if interrupt_requestor or interrupt_responce is not
set. This patch does not set the interrupts on the cores.

Change-Id: I96aefeec83ff72cb93640c11b2ee60e76f5f32fe
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49611
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
7d9cf53e78 configs: Fix AbstractGeneratorCore connect_interrupt sig
`interrupt_requestor` and `interrupt_responce` are not manditory, they
should be defaulted to None. Without this errors occur when attempting
to call `connect_interrupt`.

Change-Id: I9401132df681b9a19eede8808a9a68d435cc5bbe
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49610
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
51094b206b configs: Update the parsec_disk_run.py for testing
This update exposes arguments, allowing users to specify which parsec
benchmark application to run, which size, and which CPU/memory model to
use. This makes it suitable for use in testing.

Change-Id: I7ce4be260081203f62e2119275e4c80d3e4d726e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49551
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
2d82333afe tests: Update the x86-boot-tests to use boot_exit_disk_run.py
This change makes three improvements:

1. It uses the gem5 components library
`config/example/components-library/boot_exit_disk_run.py` example. This
test therefore doubles-up as a test for this example and the gem5
components library, as well as full-system x86 booting of Linux.

2. It includes 'very-long' tests to be run weekly. These are a full
cross-product of x86 boot tests and will help identify gem5 failures
more quickly.

3. Quick tests are added to boot the linux OS to a certain tick.

Change-Id: Ie52c267f3382e37912b8ae41dc92b1ee8d06f9f9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49325
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
b12381bbe4 configs,python: Update components library to support KVM
Issue-on: https://gem5.atlassian.net/browse/GEM5-1024
Change-Id: Ic3340e77ab0f9a72752924b9dee89bb5e220615f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49613
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
091ba116ee ext,tests: Add 'very-long' tag for test length
This new tag will be used to specify tests to run Weekly (with the
'long' tests for Nightly, and the 'quick' tests for Kokoro/presubmit).

Change-Id: I088c2ef36cb14746e581eac5b1771f82250f2b98
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49326
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
af839c4f4e python: Add requires to gem5 components lib
This `requires` function allows a simple way to specify ISA, KVM, and
cache coherence protocol requirments within the library and scripts.
An exception will be thrown if the gem5 binary does not meet these
requirements.

The `requires` function may be expanded with other requirements as
needed. At present we only check ISA, KVM, and cache coherence
protocols.

Change-Id: I5c8ff3766ebb9f3292aa553b02781b43d6752775
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49324
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
ef441d3f41 python: Run Black on configs/example/components-library
Change-Id: Id0c2151a624737f3e035fd3ae14602c144219675
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49307
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
f272a112fd python: Update boot_exit_disk_run.py for testing
This updates `configs/example/components-library/boot_exit_disk_run.py`
to be used for the gem5 boot tests by exposing arguments thus making the
run configurable.

Change-Id: I4e1c77e522ffca4bac2f328a1bc2306a4cd1402f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49306
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
f2b3a5a7b0 python: Add optional 'kernel_args' to x86's set_workload
This optional argument allows a user to pass additional arguments to the
kernel.

Change-Id: Icbc36ab265e5acf6323fd340c0036c2acd35b3a6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49323
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
cb5f676ea0 python: Add a PrivateL1CacheHierarchy to the gem5 components
This adds a private L1 classic cache hierarchy to the gem5 components.

Change-Id: I78b038e2a4031d6df78ac9908f7baf9cb5920f47
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49305
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
2ef2f11955 python,configs: Add Resource class to gem5 components
The `Resource` class can be used to obtain a gem5 resource. The
`Resource` class, via the `downloader` package, parses the gem5
resources `resources.json` file:
https://gem5.googlesource.com/public/gem5-resources/+/refs/heads/develop/resources.json
From this it can determine the available resources and where to download
them. This allows for automatic retrieval of resources.

The `CustomResource` can be used to specify a local resource not part of
gem5 resources.

The board's `set_workload` function has been updated to use the
resources.

The components library example scripts have been updated to demonstrate
the `Resource`/`CustomResource` class usage.

Issue-on: https://gem5.atlassian.net/browse/GEM5-1022
Change-Id: I59cfe81d5ec9c64576c0dab55af52aede96976fb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49304
Reviewed-by: Austin Harris <austin.dane.harris@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-08 04:16:59 +00:00
Bobby R. Bruce
ec91492feb python: Add MI_Example cache hierarchy to the components lib
Change-Id: If8c2e08779f4be59112fe130ab651dfce7065111
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49303
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-08 04:16:59 +00:00
Nicolas Boichat
729eea73a4 base: Remove SOCK_CLOEXEC from socketCloexec.
63c53e21fe ("base: Add SOCK_CLOEXEC when creating/accepting sockets")
accidentally left SOCK_CLOEXEC as socketCloexec parameter, remove
it as socketCloexec will add that parameter, and it'll not compile
on platforms that do not provide the flag.

Change-Id: I30e6fa1824b0258a325b53422585a9a362de4dff
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49947
Reviewed-by: Yu-hsin Wang <yuhsingw@google.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-06 23:58:56 +00:00
Gabe Black
77a0372fe9 scons,debug: Implement the "All" flag in C++ and not scons.
Create an AllFlagsFlag class which inherits from the CompoundFlag class.
This class is a singleton, and the SimpleFlags install themselves in it
instead of having SCons collect them.

The allFlagsVersion global variable was supposed to be for debugging
according to a comment, but was actually an important part of the "All"
flags inner workings. It was not exposed in the header, but was
redefined/pulled through in src/python/pybind11/debug.cc. The
AllFlagsFlag class now tracks that value, and it can be accessed without
reaching behind the curtain.

This also somewhat decentralizes the debug flag building process in
SCons. The debug/flags.cc still includes all flags at once which
centralizes them, but at least now the "All" flag won't also.

Change-Id: I8430e0fe9022846aade028fb46c80777169a2007
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48370
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@huawei.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-09-05 17:13:53 +00:00
Gabe Black
269258831e scons: Eliminate the "Arch" enum.
This is not the one from the object file loader, it's another one which
was only used by the System class. That use has been eliminated, so this
enum can be as well.

Change-Id: I476d7c1ef1bc1e34cbf904fc33c6735038e999c9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48712
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
2021-09-05 17:12:48 +00:00
Gabe Black
99e01f900d sim: Eliminate the now unused System::getArch().
Change-Id: Ia36c9c3779719faba30105cd15f4495c8b6141c8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48711
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
2021-09-05 05:29:47 +00:00
Gabe Black
00187b7bc3 x86,mem: Replace the x86 StoreCheck flag with READ_MODIFY_WRITE.
X86 had a private/arch specific request flag called StoreCheck which it
used to signal to the TLB that it should fault on a load if it would
have faulted had it been a store. That way, you can detect whether a
read-modify-write type of operation is going to fail due to a
translation problem during the read, and don't have to worry about not
doing anything architecturally visible until the store had succeeded,
while also making sure not to do the store part if the modify part
could fail.

It seems that Ruby had hijacked that flag and had an architecture
specific check which was looking for a load which was going to be
followed by a store. The x86 flag was never intended to communicate that
beyond the TLB, and this nominally architecture agnostic component
shouldn't be reaching into the ISA specific flags to try to get that
information.

Instead, this change introduces a new Request flag called
READ_MODIFY_WRITE which is used for the same purpose in x86, but in
general means that a load will be followed by a write in the near
future.

With this new globally applicable flag, the ruby Sequencer class no
longer needs to check what the arch is, nor does it need to access ISA
private data in the request flags. Always doing this check should be no
less efficient than before, because checking the arch involved calling
into the system object, while checking the flag only requires masking a
bit on the flags which the compiler probably already has floating around
for other logic in this function.

Change-Id: Ied5b744d31e7aa8bf25e399b6b321f9d2020a92f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48710
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-09-05 05:29:27 +00:00
Gabe Black
1253c15ebe scons,python,sim: Eliminate a redundant member of EmbeddedPython.
The filename member was just a less specific version of the abspath
member, and can be replaced by it to simplify things a little.

Change-Id: I61b312f2c356045e03462159e3232ac717954669
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48365
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-09-05 04:22:26 +00:00
Gabe Black
95f9017c2e configs,python: Clean some cruft out of m5.objects.
SimObject is already available as m5.SimObject, and it doesn't make a
lot of sense to expose m5.internal.params, part of the internals of
gem5's python interface, as a peer to all the SimObject types.

Change-Id: I3030c1eb261877fd9648c9d3d73b7dbbd4c24345
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48364
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-09-05 04:21:56 +00:00
Gabe Black
9db4c91510 scons: Update the special module importer API.
In the SConscript, there is a special importer which enables importing
embedded code using various m5.* paths. This was implemented using an
API which has been deprecated and replaced in more recent versions of
python.

Change-Id: I5900f269af48befbcedcb9d25353f04f6297ce9d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48363
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-09-05 04:21:28 +00:00