Commit Graph

18482 Commits

Author SHA1 Message Date
Alistair Delva
791da53cf8 configs: Add support for initrd/initramfs
Allow the user to specify the path to an initrd/initramfs file which
will be loaded in memory after the DTB. The load address for this data
will be passed to Linux via DeviceTree.

Change-Id: I52e12b9b88ab415fe3b318a6359026651667f3c6
Signed-off-by: Alistair Delva <adelva@google.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54186
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-05 23:07:07 +00:00
Alistair Delva
75cd1ff764 dev-arm: Add RealView support for initrd/initramfs
Update the RealView bootloader simulator to set up the initrd_addr. The
load address is derived from the dtb_addr plus the maximum allowable DTB
blob size.

Change-Id: I2eaeb1ade38d24ad8e02230cc99d12873c2f56f9
Signed-off-by: Alistair Delva <adelva@google.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54185
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-05 23:07:07 +00:00
Alistair Delva
cb7799648b arch-arm: Add support for initrd/initramfs
Add initrd_filename and initrd_addr parameters to specify that an
initrd/initramfs should be loaded into memory from a file, just like the
DTB blob. The user must specify the initrd file, and they can specify
the initrd load address as well. However, in practice, it's expected
that the dev/machine backend will derive the initrd load address from
the dtb load address, which is how a bootloader would typically do it.

Change-Id: I6378927c2984b7ccdd1471486dd7803500ef5883
Signed-off-by: Alistair Delva <adelva@google.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54184
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-05 21:38:34 +00:00
Alistair Delva
5af49d03da base: Add support for DT initrd/initramfs
Add a new API function, addBootData(), which allows the ports to specify
the size and load address of the initrd/initramfs via DeviceTree. This
uses the standard chosen nodes for initrd-start/initrd-end.

Update the addBootCmdline() to call addBootData() with no
initrd/initramfs so as to maintain backwards compatibility.

Change-Id: I7b1d5cf2a0b18685eaadf1d881434f3d48c45d8b
Signed-off-by: Alistair Delva <adelva@google.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54183
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-05 21:38:34 +00:00
Eric Ye
f894de5486 scons: Try to fix build dependency bug when generating fastmodels
Bug: 201084562
Change-Id: I33cc9e09b1ce46f80864d75f088a2534949e55e1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55043
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-05 15:29:32 +00:00
Alex Richardson
5ac54aab7e misc: Generate StateMachine debug includes in deterministic order
Since 3454a4a36e the order of the debug/
includes is non-deterministic which can result in unnecessary rebuilds.

Change-Id: I583d2caf70632e08fa59ac85073786270991edbc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54983
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-05 10:15:55 +00:00
Luming Wang
1f155ffd90 arch-riscv,sim-se: Complements the system calls on RISC-V
There are many SE mode system calls that are implemented
in src/sim/syscall_emul.cc or src/sim/syscall_emul.hh.
And they work well under X86 and ARM platforms. However,
they are not supported in se_workload.cc under the RISC-V
platform. This patch adds support for all the system calls
already implemented in syscall_emul.hh/cc to the RISC-V
platform (in arch/riscv/linux/se_workload.cc).

Change-Id: Ia47c3c113767b50412b1c8ade3c1047c894376cf
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54803
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: Bobby Bruce <bbruce@ucdavis.edu>
2022-01-05 03:25:58 +00:00
Jiasen Huang
ec32f6c6f0 mem-cache: Add switch on/off duplicate entries into RMOB
Change-Id: I394d7c852a439be5315c4755b091c8741e671ea3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55083
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-05 01:18:14 +00:00
Jiasen Huang
66e6e59666 mem-cache: pstAddress should be inserted into PST in STeMS
Change-Id: Ib2c4c5fb0fec32e63947d3ee8dcb5c3d7e2555ab
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55084
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-05 01:14:48 +00:00
Daecheol You
ec58d9d7f3 mem-ruby: Fix message stall time calculation
Three changes below:
1. The m_stall_time was declared as statistics::Average, but
statistics::Average uses AvgStor as storage and this works as per-tick
average stat. In the case of m_stall_time, Scalar should be used to get
the calculation right.

2. The function used to get an enqueue time was changed since the
getTime() returns the time when the message was created.

3. Record the stall time only when the message is really dequeued
from the buffer (stall time is not evaluated when the message is moved
to stall map).

Change-Id: I090d19828b5c43f0843a8b735d3f00f312c436e9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54363
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-03 02:18:41 +00:00
Bobby R. Bruce
ee5b65955e python: Fix get_simstat func for non-Root SimObject case
The `get_simstat` function in `src/python/m5/stats/gem5stats.py` was
returning an error when a non-Root Simobject was passed:

```
AttributeError: object 'PyTrafficGen' has no attribute 'name'
At:
  build/NULL_MESI_Two_Level/python/m5/SimObject.py(1430): __getattr__
  build/NULL_MESI_Two_Level/python/m5/stats/gem5stats.py(279): get_simstat
```

The issue was an assumption that SimObjects have a field `name`. They
do not. To get a SimObject's name the `get_name()` function must be
used. This patch fixes this issue.

In addition to this fix, the documentation in this function has been
improved to state more clearly what can be passed  and what shall be
returned. Previously it was somewhat unclear.

Change-Id: I33538120015280bb6260ccf8eba6b75ff43d280e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54943
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-30 23:15:24 +00:00
Bobby R. Bruce
6a44472b1c mem: Add 'controller()' function to NVMInterface.py
As noted here: https://gem5.atlassian.net/browse/GEM5-1133,
NVMInterface.py does not have a `controller()` function, which is used
by `configs/common/MemConfig.py` to obtain a memory controller for a
specific memory type selected. This patch adds a `controller()`
function to `NVNInterface.py` to avoid the reported error.

It should be noted that we do not enforce a rule that a memory type
must include a `controller()` function. `se.py`, and other scrips
that use `configs/common/MemConfigs.py`, should not rely on this
false assumption.

Change-Id: Ieba62f803d3b9f9c5c3c863d5a8c4ca16c5e5e82
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54923
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-30 03:03:15 +00:00
Bobby R. Bruce
5e6a561a3f misc: Revert v21.2 specific commits for develop
These changes were made to the release staging branch for the v21.2
release. This commit reverts them for the develop branch.

Change-Id: I9f02470d00d5034a0797f32d4c1fe0e7055860a6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54904
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-28 21:30:21 +00:00
Gabe Black
dda149ecf8 scons: Add a --linker option.
There is currently a "--gold-linker" option, which tells SCons to use
the gold linker. This puts the gold linker in a special position where
it has its own command line option, and makes it impossible to
explicitly select any other linker.

This change adds a --linker option which can be set to "bfd" (the
default gnu linker), "gold" (the gnu gold linker), or "lld" which is the
clang linker. If none is specified, SCons will let the compiler fall
back to whatever its default is.

The --gold-linker option is modified so that it just sets the --linker
option for you. Because of how SCons handles adding command line
options, there isn't a good way to complain if both it and --linker is
used, nor is there a good way to warn that the user is using a
deprecated command line option. A warning is in the help text for that
option now, though.

If the gold linker is selected, this change also sets the --threads
option, and sets the --thread-count option. This tells the gold linker
to run multi-threaded to speed up linking. Apparently the gold linker
must have been built with an option that enables threading for these
options to have any effect. If threads and LTO are both enabled, the
gold linker segfaults. To avoid that problem, we don't add --threads if
LTO has been enabled.

This change also enables a new configuration, where lld, the clang
linker, can be used with gcc. Unfortunately the format of LTO
information gcc/g++ generates is not compatible with lld, and so if you
set the linker to lld and enable LTO, you'll probably get errors like
not being able to find the symbol "main".

This change also allows you to select the default gnu linker ("bfd")
when using clang, although it's not clear why you would want to do that.

Change-Id: Ib37030431527f5d0bc626e9594b2e1142df889be
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49003
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-12-28 05:28:32 +00:00
Bobby R. Bruce
065a7dbf1b misc: Merge branch release-staging-v21-2 into develop
Change-Id: I8200ac51c20117f63b51d555fa2f12e5dd35f22e
2021-12-26 23:59:41 -08:00
Bobby R. Bruce
515c89b860 util-docker: Update how rocBLAS is built in gcn-gpu Dockerfile
rocBLAS builds for all targets by default, but it requires we set the
HCC_AMDGPU_TARGET env variable to all the targets we want to build for.

This change explicitly sets all the gfx versions we intend to support in
gem5, and removes the extraneous "-a all" from the install command.

Additionally, doing this allowed for DNNMark to run on gfx902.

Change-Id: Id1a00433beaa23f6935c12073d5bddc38431886b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54623
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-27 06:43:52 +00:00
Jason Lowe-Power
f554b1a7b5 misc: Add release notes for v21.2
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Change-Id: Ia92440b3b2bcd777b75b0c65ab65252b27734ebb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54603
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2021-12-27 05:58:33 +00:00
Bobby R. Bruce
da5efee4fd ext,misc: Update ext/sst/README.md for v21.2 release
Change-Id: I2cd982c819074962182da43754399852f9e72174
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54703
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-27 05:58:04 +00:00
Bobby R. Bruce
b2ffa27f44 tests: Increase Kokoro test timeout to 7 hours
Change-Id: I5a334124cc14d7db3a6227981ed46ae0cc80e558
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54824
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-27 05:58:04 +00:00
Bobby R. Bruce
db921c890e scons: Fix 'CheckLinkFlag' so '-Werror' is not enabled
A small error in 'CheckLinkFlag' was resulting in `-Werror` being set
as a CXXFLAG after the function was run. This patch fixes this.

Change-Id: I786f81a4f94be0356573eb6d4673d04ee5aa844d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54863
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-27 05:58:04 +00:00
Jiasen Huang
398d4f9d07 mem-cache: Init lastTriggerCounter for STeMS Prefetcher
Change-Id: I43a0093e6d35a39799d724e7dee15c95dbc26343
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54643
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-23 01:40:09 +00:00
Cui Jin
2194aea053 arch-riscv: rvc instruction is mistaken as branch
Fetch in O3CPU mistakes the normal non-branching compressed
instructions, and regards it as a branch. This issue interrupts
the consecutive instruction stream, thus affecting performance
of cpu front-end.
This fix sets the compressed for PCState during decoding.

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

Change-Id: I7607d563bba8a08869e104877fc3c11c94cbe904
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54644
Reviewed-by: Jin Cui <cuijinbird@gmail.com>
Reviewed-by: Ayaz Akram <yazakram@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-22 23:51:50 +00:00
Jiasen Huang
7910926631 mem-cache: Set prefetch bit if the blk comes from Prefetch only.
Original logic setting prefetch inside serviceMSHRTargets
did not exclude the blks that both came from CORE and Prefetch

Change-Id: Iab56b9266eb64baf972b160774aca0823faea458
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54364
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-22 01:02:22 +00:00
Bobby R. Bruce
594145849c scons: Remove -Werror for the gem5 v21.2 release
While gem5 compiles on our supported compilers, removing the -Werror
flag on the stable branch ensures that, as new compilers are released
with stricter warnings, gem5 remains compilable.

Change-Id: I05989356997bc7f6606c43944d15da6c3958a3f5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54463
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-21 22:29:07 +00:00
Bobby R. Bruce
5cf00e5055 configs,tests: Update refs to deprecated 'x86-ubuntu-img'
This resource has been deprecated in favor of 'x86-ubuntu-18.04-img'. In
practise, these are the same resource (i.e., the same disk image), but
we deprecate 'x86-ubuntu-img' as 'x86-ubuntu-18.04-img' is more explicit
on what the disk image contains. Going forward we may want different
disk image resources with different Ubuntu versions, and we want it to
be clear what the user is retrieving.

Change-Id: I06b08e6b65cf431067ffda35ebd10d419068d073
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54583
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-21 22:28:42 +00:00
Bobby R. Bruce
c999905772 misc: Hardcode docker pulls to v21-2 versions
Change-Id: I404f2c881a00645302c0af5f22e8a59548426cac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54470
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-21 22:28:42 +00:00
Bobby R. Bruce
af07c64577 tests: Update the weekly and nightly tests to use v21.2
Note: There is an annoying work-around here for tests where we obtain
the gem5 resources repo directly to compile and run tests.

Change-Id: If8e7d3e7fd8dea9d0e1653e73360c295ad43e1ac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54469
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-21 22:28:42 +00:00
Bobby R. Bruce
eeccb4ad88 util: Fix gcn-gpu docker download to v21-2
Change-Id: Ibb64d080dc72c7208c97a5272d443a17122ab60b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54468
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-21 22:28:42 +00:00
Bobby R. Bruce
798d2ed15b ext,tests: Update the testlib download URL for v21.2
Change-Id: I36bb8208485536482f30ef77f6e509379481b5ee
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54467
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-21 22:28:42 +00:00
Bobby R. Bruce
b959fbac7b stdlib: Update the stdlib resource downloader for versions
The 'resources.json' file in gem5 resources is used to lookup resources.
The stdlib resource downloader was hardcoded to the 'resources.json'
stored in the gem5 resources stable branch. This change allows the gem5
downloader to obtain the specific resources.json.

Change-Id: Ie119ed9326b359055bf5bc347ca89336a5cc2e5d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54466
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-21 22:28:42 +00:00
Bobby R. Bruce
33a0d30a1a tests: Update the cpu_tests download URL
This new URL puts the binaries in the same directory structure as the
other test programs. This is part of a minor re-arrange of the Google
Cloud bucket.

Change-Id: Ibbd1385adf96bc63b54b717b5385c77a6b0c4dbb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54465
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-21 22:28:42 +00:00
Bobby R. Bruce
bf2740096e base: Update the version to v21.2.0.0
Change-Id: Ib4b3d0a370498c59d6b56701bfa5018d8c1cb709
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54464
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-21 22:28:42 +00:00
Gabe Black
2bc3f873a9 scons: Add werror explicitly when checking for compatible options.
When checking whether a given option is supported, we try to compile or
link a small test program and see if that succeeded or not. There are
some options which are not really supported, but if you use them the
compiler might produce an error instead of failing to build. An example
of that is clang (version 9 at least) which will warn if you try to
disabled a warning it doesn't know about.

On the develop branch, this is fine since we have werror enabled, and
even these warnings will prevent the options from being enabled. On the
release branches where we disable werror for better future
compatibility, this causes a problem because these options still pass
the test and end up being enabled. This doesn't break the build, but
can cause a bunch of annoying and unnecessary warnings which clutter
up the build output.

To remove this inconsistency, we can enable werror just for the test
compiles or links which decide whether or not an option is supported.
That won't necessarily differentiate *why* a warning was generated, so
if through some strange combination of circumstances something else
causes a warning pervasively through the build, then this may think
an option is to blame and not enable it even though it's fine. This
seems unlikely though, and not worth worrying about without a specific
example showing that it can/will actually happen.

Change-Id: I6a1e3273c0b646a5636dc9986c70dcd5332f6f64
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54624
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2021-12-21 22:09:11 +00:00
Giacomo Travaglini
d77407c0e4 configs: RubySequencer doesn't have "out_ports"
"out_ports" are actually called "interrupt_out_port"
This error has been introduced by [1]

[1]: https://gem5-review.googlesource.com/c/public/gem5/+/52584

Change-Id: If0a8d22b2cd1ef0d4240f37f8a0adcf5a826fb9d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54524
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-21 17:52:01 +00:00
Daniel R. Carvalho
0d1a40602f base: Finish deprecating SatCounter
SatCounter has been marked as deprecated for at least 2 versions,
so it can be removed.

Change-Id: Iffb75822cc0d09d8b7d9b86828b26198865ce407
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54523
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-20 21:55:01 +00:00
Kyle Roarty
f9deeea427 arch-gcn3,arch-vega: Select proper data on misaligned access
req1->getSize() returns the size in bytes, but because we're using it
in an array index, we need to scale it by the size of the data type.

This ensures we give the second request the proper data.

Change-Id: I578665406762d5d0c95f2ea8297c362e1cc0620b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54503
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
2021-12-20 18:28:08 +00:00
Matthew Poremba
c70403ed80 tests: Add GPU ISA parameter to nightly/weekly
GCN3_X86 and VEGA_X86 can use the same test binaries to run tests for
that build configuration. This adds an option to the nightly and weekly
test scripts to select which GPU ISA to test. By default the GCN3_X86
ISA is tested which was previously the only test. No behavior is changed
from current testing.

Change-Id: Ifedcdea5d7c1c8e9994559a20aea5e1954180772
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54083
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 18:55:03 +00:00
Bobby R. Bruce
123d5dbdf7 misc: Merge branch 'release-staging-v21-2' into develop
Change-Id: Icc03e585d87cf89ed844a0249c365cc296fa2d14
2021-12-16 23:07:43 -08:00
Hoa Nguyen
c7689b0ddb ext: Fix dumping stats error at the end of simulation
A missing comma causing two commands to be one, which resulted in
a Python interpreter syntax error.

Change-Id: Ieb0e3c620c175731084ff0e2040388b15364691e
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54343
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 06:58:46 +00:00
Gabe Black
f278b1ea36 systemc: Change how python initialization callbacks are handled.
Because the python environment may already be up and running by the time
static initializers are run, specifically when gem5 is built as a
library and loaded with dlopen, we can't rely on all of the objects
declaring python initialization callbacks having been constructed by the
time the code which would execute them runs.

To address that problem, this change keeps track of whether the
initialization has already happened when a callback is installed, and if
so, runs the callback immediately.

The original implementation also had users install callbacks by
overriding a virtual function in the PythonInitFunc class, and then
statically allocating an instance of that subclass so its constructor
would be called at initialization time. Calling the function manually if
initialization has already happened won't work in that case, because you
can't call a virtual function from a constructor and get the behavior
you'd want.

Instead, this change makes the PythonInitFunc wrap the actual callback
which is outside of the structure itself. Because the callback is not a
virtual function of PythonInitFunc, we can call it in the constructor
without issue.

Also, the Callback type has to be a bare function pointer and not a
std::function<...> because the argument it takes is a pybind11::module_
reference. Pybind11 sets the visibility of all of its code to hidden to
improve binary size, but unfortunately that causes problems when
accepting one as an argument in a publically accessible lambda in g++.
clang doesn't raise a warning, but g++ does which breaks the build. We
could potentially disable this warning, but accepting a function pointer
instead works just as well, since captureless lambdas can be trivially
converted into function pointers, and they don't seem to upset g++.

Change-Id: I3fb321b577090df67c7be3be0e677c2c2055d446
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54325
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 06:58:46 +00:00
Gabe Black
372601772c systemc: Update the testing framework to get it working again.
The systemc testing framework is not used regularly, and had bit rot and
stopped working. This change updates it so that it runs again, and all
previously passing tests pass again.

These changes were mostly in the related SConscript now that top level
targets are built a little differently and that the gem5 shared library
is no longer stored in a special construction environment variable.
verify.py also needed to be updated since warn() and info() lines now
have file and line number information in them, throwing off pre diff
filtering of gem5 outputs.

Change-Id: Ifdcbd92eab8b9b2168c449bfbcebf52dbe1f016a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54324
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 06:58:46 +00:00
Gabe Black
52c04aa517 systemc: Eliminate the unused PythonReadyFunc mechanism.
Change-Id: I8892e4d209901454f2ab923aa3fa9932d7963274
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54323
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 06:58:46 +00:00
Gabe Black
e35812f256 ext: In sst, set sys.argv up even when not initializing python.
pybind11 gives us a simple way to set up sys.argv when initializing the
python interpreter, but we need to set that up even if the python
interpreter is already running. We need to do that manually, which we do
like gem5's main() used to.

Change-Id: If9b79a80e05158226d13f68bf06a2a98a36c2602
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54310
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-17 06:58:46 +00:00
Gabe Black
2e4b7d9091 sim,python: Use scoped_interpreter_guard's argc and argv ctor arguments.
When pybind11's scoped_interpreter_guard is constructed, it can take
argc and argv parameters which it uses to intitialize the sys.argv list
in python. We can use that mechanism instead of setting that up manually
ourselves.

Change-Id: If34fac610d1f829aef313bb9ea4c9dfe6bc8fc0f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54309
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 06:58:46 +00:00
Gabe Black
539aaa4bc3 ext: In sst, don't assume existing imports in python blobs.
When executing blobs of python code in the gem5 sst integration, don't
assume previous blobs have already imported modules. Import them
explicitly instead.

Change-Id: I3aa008ffa092cf8ad82ad057eb73bc9de4bf77c5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54308
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 06:58:46 +00:00
Gabe Black
3e83208332 ext: Stop using the uninitialized pythonMain in sst.
Import the __main__ module when it's first used.

Change-Id: If800bd575398970faa8cb88072becd3d2b4218c0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54307
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 06:58:46 +00:00
Gabe Black
7f8bbe01be sim-se: (Re)add support for retrying system calls.
The previous incarnation of this support used faults to make the CPU
reexecute the system call instruction again and again to prevent
emulating/passing through blocking system calls from blocking gem5 as
a whole. That support was accidentally removed a while ago. This new
version suspends the thread context executing the system call, and
periodically wakes it up to retry using a periodically scheduled event.

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

Change-Id: I155fa8205d7ea45e3d102216aeca6ee1979a522f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54205
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 05:45:26 +00:00
Gabe Black
c154888b2a arch,sim-se: Handle syscall retry/suppression in the syscall desc.
Rather than make each ISA include boilerplate to ignore a
SyscallReturn's value when it's marked as suppressed or needing a retry,
put that code into the SyscallDesc::doSyscall method instead.

That has two benefits. First, it removes a decent amount of code
duplication which is nice from a maintenance perspective. Second, it
puts the SyscallDesc in charge of figuring out what to do once a system
call implementation finishes. That will let it schedule a retry of the
system call for instance, without worrying about what the ISA is doing
with the SyscallReturn behind its back.

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

Change-Id: I76760cba75fd23e6e3357f6169c0140bee3f01b6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54204
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-17 05:45:26 +00:00
Jiasen Huang
735f768cc8 mem-cache: Added stats filtering both useful and spanPage prefetch.
Change-Id: I2570ee47f064ac999f2dcc813c9e39174a2ad8af
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54163
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
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-17 01:04:21 +00:00
Yu-hsin Wang
110e22439f arch-arm: gdb support Thumb-2 ISA
From the document*1, we should allow 2,3,4 in kind check function for
supporting all kinds of ARM breakpoint.

1. https://sourceware.org/gdb/current/onlinedocs/gdb/ARM-Breakpoint-Kinds.html

Change-Id: I82bcb88cfe6e80e7f17cd6bb68a26a45ace7b174
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/54124
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-16 13:26:45 +00:00