Commit Graph

19028 Commits

Author SHA1 Message Date
Luming Wang
c376ec2fde scons: support --linker="mold" for gcc < 12.
Now, to use mold linker for gcc prior to version 12.1.0, you need
to manually set the LINKFLAGS_EXTRA scons variable. This is because
older gcc doesn't support "-fuse-ld=mold" option.

To make it more convenient for users, this patch adds support for
'--linker="mold"' option for older versions of gcc. A -B option will
be passed to gcc automatically if '/usr/libexec/mold' or
'/usr/local/libexec/mold' exist.

[1] https://github.com/rui314/mold
[2] https://gem5-review.googlesource.com/c/public/gem5/+/57173

Change-Id: Id1cd780d98c39fc837066d826a9ff942579748fe
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60109
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-05-31 02:27:57 +00:00
Daecheol You
073dc853f4 mem-ruby: fix the condition for stale WriteCleanFull
WriteCleanFull can be requested for the cache line in SD state (e.g.
Local eviction of a cache line in SD_RSC state). In this case, the
requestor is the owner of the cache line,
but it doesn't have it with exclusive right.
Thus, 'ownerIsExcl == false' should be removed from the stale condition.

Change-Id: I4d34021ac31b2e8600c24689a03a3b8fa18aa1f7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58412
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-28 04:57:39 +00:00
Daecheol You
eaf23bcd9f mem-ruby: fix sharer update for stale WriteCleanFull
Initiate_CopyBack_Stale removes the requestor from the sharer list.
However, if CBWrData_SC is the data response of stale WriteCleanFull,
the requestor should remain in the sharer list.
Thus, whether to send a Evict or not can be decided after the data
response arrives. For this, FinishCopyBack_Stale event was added as the
last event to handle Evict.

Change-Id: Ic3e3a1e4d74b24b9aa328b2ddfa817db44f24e4e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58413
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Tiago Muck <tiago.muck@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-27 04:02:56 +00:00
ksco
53009f9e69 arch-riscv: Add Zfh extension
This commit adds RISC-V Zfh 1.0 (half-precision IEEE 754 binary16 floating
point) extension to gem5. Include the following commands:

* FLH / FSH
* FMADD.H / FMSUB.H / FNMSUB.H / FNMADD.H
* FADD.H / FSUB.H / FMUL.H / FDIV.H
* FSQRT.H
* FSGNJ.H / FSGNJN.H / FSGNJX.H
* FMIN.H / FMAX.H
* FCVT.S.H / FCVT.H.S
* FCVT.D.H / FCVT.H.D
* FCVT.W.H / FCVT.H.W
* FCVT.WU.H / FCVT.H.WU
* FMV.X.H / FMV.H.X
* FEQ.H / FLT.H / FLE.H
* FCLASS.H
* FCVT.L.H / FCVT.H.L
* FCVT.LU.H / FCVT.H.LU

Change-Id: Id7870fdfa1aa8b840706c3ba2cab8eeaf008880f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60029
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-27 01:22:31 +00:00
Daecheol You
8b648ac856 mem-ruby: add missing response for ReadOnce
When HNF snoops an RNF with SnpOnce to process
ReadOnce request (e.g. DMA read request),
the RNF can respond with SnpRespData_UC if the cache line is in UC.
Thus, SnpRespData_UC was added to the transition events.

Change-Id: Ife242e75feb9d2451eb99511e21833d9d190a6c3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58410
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Tiago Muck <tiago.muck@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-26 00:38:23 +00:00
Bobby R. Bruce
53500ac611 stdlib: Introduce an ARM Board
This changes adds a new board to the gem5 stdlib, which is capable
of simulating an ARM based full system. It also adds an example
config script to perform a boot-test using an Ubuntu 18.04 disk
image. A test has been added in the gem5-library-example for the
same.

Change-Id: Ic95ee56084a444c7f1cf21cdcbf40585dcf5274a
Signed-off-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58910
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-05-25 17:34:25 +00:00
Bobby R. Bruce
1d93e72f2b stdlib: Create the AbstractSystemBoard
In the prior design the AbstractBoard inherited from System. This was
fine for the X86Board and RISCVBoard, but was causing problems for the
design of the ARMBoard which must inherit from ArmSystem (which itself
inherits from System).

This new design removes the System inheritance from AbstractBoard, and
creates a new "AbstractSystemBoard" class which inherits from both
AbstractBoard and System. This allows for the creation of an ArmBoard
which inherits from both AbstractBoard and Arm System.

Change-Id: I3831f2ebe61e4adfb9dc10b7790b39403a99beaa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58909
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-05-25 17:34:25 +00:00
Bobby R. Bruce
2643f3c4ee tests,stdlib: Add test to check gem5-resources downloading
This test ensures all the resources in resources.json can be downloaded
and that their md5 values are valid. This has been set as a
very-long/weekly test as downloading all the resources is costly.

Change-Id: Ia574d0a9610849af3653fc742acb214ea7496767
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59771
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-05-25 17:27:39 +00:00
Yu-hsin Wang
95800dc659 mem: add clear modifiers for request flags
During the memory requests, it's possible some control attribute
changed by IPs. There are three ways to model the behavior.

1. Modify the flags of current request, but there's no way to unset
   the attribute now.
2. Clone the request with original flags, but there's no way to unset the
   attribute.
3. Clone the request with zero flags, but it will ask the model to review
   all the flags and set individually.

To preserve the original requests, we may pick the second approach. It's
still good to have clear modifiers to make the modeling more easier by
modifying the cloned request.

Change-Id: Ib216ca20c79b0f84be15ed4b0ec00354a428bac9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59809
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-05-24 00:50:00 +00:00
Giacomo Travaglini
934590521a tests: Don't enable EL2/EL3 in AArch32 for long regressions
This is fixing long regressions, caused by
automatically enabling EL2 and EL3 in Arm.
This is temporary: either fixing EL3 boot in AArch32 or
disabling EL3 in AArch32 should be chosen in the long term

Change-Id: If92b219ff89dcf13916a151fac9a2a3ac0e7d69b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59849
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-24 00:02:44 +00:00
Giacomo Travaglini
985dd1ea9d tests: Enable DVM in realview64-o3-dual-ruby.py
Change-Id: I3b4cec279e620ee416c3ecb34e45eec1d34b0166
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59871
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-05-24 00:02:17 +00:00
Giacomo Travaglini
a6704ff730 tests: Add enable_dvm flag to test DVM in long regressions
We are only adding the option to the LinuxArmFSSystem and not to the
LinuxArmFSSystemUniprocessor as DVM is only supported for more than one
CPU

Change-Id: I57004b85158fb898297fb9d91c38673a5bb88268
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59870
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-05-24 00:02:17 +00:00
Giacomo Travaglini
234d61663d tests: Add realview64-o3-dual-ruby.py long test
This will test Linux boot with two O3CPUs and ruby memory
subsystem

Change-Id: Iaf965fc29571ad003e7b8bc160d1e4d00b90e448
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59869
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-05-24 00:02:17 +00:00
Bobby R. Bruce
770f470495 arch-arm: Fixed ARM/gem5.fast compilation failures
The compiler-tests were failing:
https://jenkins.gem5.org/job/compiler-checks/238

This was due to an `error: unused variable` error being thrown in cases
where a variable was declared and used soley in an `assert` within a
SLICC file. Assertions of this kind are stripped during .fast
compilation.

This patch fixes this.

Change-Id: I3a91ac8b1a51de7ddffd6a1cff602a934862b49c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59829
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-20 17:59:57 +00:00
Jason Lowe-Power
530b389ace mem-ruby: SLICC-allow expressions in is_valid
Currently, the is_valid statement in slicc requires that there is a
variable passed in as the only parameter. As far as I can tell, there's
no reason not to allow a more flexible expression. If we allow expr
instead of var, then we can eliminate unused variable warnings more
easily.

For instance, the following code won't compile with gem5.fast:
```
TBE tbe := getTBE(...);
assert(is_valid(tbe));
```

However, with this changeset we can fix the problem by using the
following code:
```
assert(is_valid(getTBE(...)));
```

Change-Id: I38a9f0dff9e942a387a8b2de655380d1af82afb8
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59830
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-05-20 17:59:57 +00:00
Jason Lowe-Power
e2fc2d5765 tests: Add systemc test
Change-Id: I2eb5f6725942829940fc2bd18f1c321dea567840
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59689
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-19 14:32:11 +00:00
Jason Lowe-Power
8e8c1ded15 scons: Update enum output when not using python
This changeset brings the enum_cc.py file in line with how the
sim_object_param_struct_cc.py file works and updates the SConscript to
correctly tag the created source files.

Change-Id: I4635a4f46de7d62a6c38e71ace121c06e139d486
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59609
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
2022-05-19 14:32:11 +00:00
Jason Lowe-Power
e8e0a2ed06 util,systemc: Update systemc connection
Change-Id: I5b5c7de9e734dd8a58160193d68c9a13d649b739
Issue-On: https://gem5.atlassian.net/browse/GEM5-1218
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59589
Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-19 14:32:06 +00:00
Giacomo Travaglini
128b78177c configs: Add --enable-dvm CL option to CHI configs
By using the "--enable-dvm" command line option it is possible
to issue DVM messages from Arm CPUs

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

Change-Id: I0a2b683ad3403590515bd406e241b66961cee964
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57301
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-18 09:16:17 +00:00
Samuel Stark
38d360a475 configs, mem-ruby: Implement DVMOps in CHI
1) Handling TLBI/TLBI_SYNC requests from the PE in the CHI Request Node
(Generating DVMOps)

2) Adding a new machine type for the Misc Node (MN) that handles DVMOps
from the Request Node (RN), following the protocol specified within
the Amba 5 CHI Architecture Specification [1]

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

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

Change-Id: I9ac00463ec3080c90bb81af721d88d44047123b6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57298
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-18 08:52:53 +00:00
Matthew Poremba
1e6ff02c25 dev-amdgpu: Allow for atomics in SystemHub
It seems that applications can be compiled which issue atomics to host
memory, such as heterosync. Remove the arbitrary assert to disallow them
and issue atomics as a DMA write by default.

Change-Id: I7812a421a9312406b3faccdc05d6c7e9fc837da0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59669
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-05-16 15:08:09 +00:00
Matthew Poremba
49c6e2fb48 configs: Add example scripts for HIP apps for GPUFS
This adds configuration scripts to run the HIP cookbook, HIP samples,
and HIP versions of rodinia 3.0.

Cleaned up the other vega10_kvm example script.

Change-Id: I26de50426e7e68741b13de0c4b15b08f0789a062
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59670
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-16 15:07:55 +00:00
Bobby R. Bruce
45e6e57b5a stdlib: Implicitly determine FS/SE mode via workload
Setting whether FS or SE mode is to be used explicitly is not necessary
as we can determine this depending on what kind of workload is set.

Change-Id: Icc0ac749df231eaa9af8ba2363b466fcb405ccea
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59571
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-13 19:04:21 +00:00
Matthias Jung
f355f1f258 systemc: Fixed Bug in SystemC Example
Change-Id: I857a181470a491874c8ab9f7d467c89dafd97e6e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59550
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-13 18:49:58 +00:00
Matthias Jung
4bc5efbc37 systemc: Simple TLM Example added
Change-Id: I2cb0c95773b8c6d15ffdffffaafbe3133a392a54
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59549
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-05-13 18:49:48 +00:00
Gabe Black
3d5bb844ee python: Don't assume RubyNetwork exists in do_ruby_dot.
If Ruby is disabled, then RubyNetwork is not a SimObject, and
do_ruby_dot which tries to reference it will crash. This more flexibly
checks for RubyNetwork, and if that isn't in m5.objects will gracefully
return instead of crashing.

Also streamline the code in that function a little bit using filter()
instead of preconstructing the list of ruby networks.

Change-Id: Ia4bdb04201df8453a1b6692a2f211b6cde00be2d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59629
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-13 08:09:19 +00:00
Bobby R. Bruce
ed6c57e4ab tests,arch-arm: Add guards for ARM-specific test
The nightly tests, https://jenkins.gem5.org/job/nightly/219/, were
failing with the following error when running build/NULL/unittests.opt:

```
[ENUMDECL] m5.objects.ArmSystem, ArmExtension -> NULL/enums/ArmExtension.hh
terminate called after throwing an instance of 'pybind11::error_already_set'
  what():  ModuleNotFoundError: No module named 'm5.objects.ArmSystem'
At:
  <frozen importlib._bootstrap>(973): _find_and_load_unlocked
  <frozen importlib._bootstrap>(991): _find_and_load
  <frozen importlib._bootstrap>(1014): _gcd_import
  /usr/lib/python3.8/importlib/__init__.py(127): import_module
  build_tools/enum_hh.py(58): <module>
Aborted (core dumped)
scons: *** [build/NULL/enums/ArmExtension.hh] Error 134
```

The reason for this is the 'aapcs64.test' now transitively includes the
'ArmExtension' enum via this commit:
https://gem5-review.googlesource.com/c/public/gem5/+/59471.

As this test now only works with the ARM ISA, a guard has been included.
As noted in the comment, GTest does not have the 'tags' parameter so the
'TARGET_ISA' environment variable was used. This will need updated when
the multi-isa code is incorporated.

Change-Id: I2793094bf7c813afd97933750332fa3f3b7bd8dd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59569
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-11 19:27:33 +00:00
Richard Cooper
b1d10aa7b6 misc: Update Dmesg dump for changes to printk in Linux v5.10+.
The Linux Kernel's printk mechanism and data structures were
overhauled in v5.10. This patch updates gem5's facility to dump the
kernel Dmesg buffer on kernel panic to account for these changes.

The new mechanism splits the Demsg ringbuffer into three separate
ringbuffers, one containing the message data, one containing
descriptors used for lock-free synchronisation, and one containing the
message infos. For a detailed description please see the header of
`kernel/printk/printk_ringbuffer.c` in the Linux source code.

The new gem5 implementation tests for the correct version to
run (pre-v5.10 or post-v5.10) by testing for the presence of symbols
in the kernel. The new, post-v5.10 dump code is templated on types
compatible with the kernel's atomic_long_t to account for differences
between the 64-bit and 32-bit Linux kernels.

Because the new Dmesg buffer dump code in gem5 is intended for
disaster recovery, it intentionally prints the full Dmesg buffer with
minimal checking of the validity of the messages. Partially finished
and/or uncommitted messages will be printed along with the finalised
messages.

Change-Id: I62ac20735e0679f1ba2062ca7bb13692a5ca1eae
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59509
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-05-11 13:27:50 +00:00
Giacomo Travaglini
1455ac0e0c arch-arm: Turn on EL2/EL3 support by default in ArmSystem
In order to turn them off a user needs to explicitly do so
by providing a different ArmRelease objec

Change-Id: I227cee80c5517cdd50cf07c62d9a131ce261310f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51011
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-11 13:00:42 +00:00
Giacomo Travaglini
99d2348910 system-arm: Awake GICv3 reditributors in the bootloader
Part of the booting procedure should be to wake up every redistributor
in the system by setting GICR_WAKER.Processor sleep to 0

Change-Id: I27150a812639de48c4ae0a4decabb4e414fa3a09
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59395
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-05-10 08:21:52 +00:00
Giacomo Travaglini
3fec0f9ca3 system-arm: Detect the GICv3 redistributor stride at runtime
Some platforms are not GICv4 compatible, therefore we need to make sure
the stride between redistributors is configurable:

2 frames of 64KiB for GICv3 => a stride of 128KiB
4 frames of 64KiB for GICv4 => a stride of 256KiB

We detect this at runtime by reading the GICD_PIDR2.ArchRev bitfield
This is 3 for GICv3 and 4 for GICv4.

Note: other software projects [1] rely on a different check, mainly
reading the GICR_TYPER.VLPIS bit
We diverge from this behaviour as VLPIS are not implemented and we do
not want to incorrectly report this to the probing software.

We should move to VLPIS once they get implemented

[1]: https://github.com/torvalds/linux/blob/\
    107c948d1d3e61d10aee9d0f7c3d81bbee9842af/\
    drivers/irqchip/irq-gic-v3.c#L864

Change-Id: I7cc554f48cc6a347c03ed80cf2ea320f618a59c2
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59394
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2022-05-10 08:21:18 +00:00
Bobby R. Bruce
90bb4cbebb tests: Fix docker '--memory' flag in GPU test
A missing space was resulting in an error:

```
invalid argument "18ghacc-test-weekly" for "-m, --memory" flag: invalid size: '18ghacc-test-weekly'
```

Change-Id: I63cd3f1cf877442b1b5fffc0a09024ca6ae94436
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59489
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-05-10 00:48:47 +00:00
Gabe Black
67f1ec7f5b fastmodel: Make ArmFastModelComponent-s take a tags parameter.
ArmFastModelComponents must *minimally* be guarded by "arm fastmodel"
tags, but may actually be covered by a more specific tag which is a
subset of "arm fastmodel", for instance if they are controlled by a
kconfig variable and may or may not be included in "gem5 lib"
independently of other sources which are part of "arm fastmodel".

The contents set up by ArmFastModelComponent are already guarded by a
fixed tag, so this change just needs to plumb through the tag as
specified when the ArmFastModelComponent is created instead.

Change-Id: I619c31107acda378a5439718e32938843f024e74
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59473
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-09 20:05:32 +00:00
Giacomo Travaglini
fd250dbed3 arch-arm: Consolidate Arm FEAT check into single hasExtension
There's no need to have a per extension helper function now
that we rely on ArmExtension objects

We are therefore removing:

* HavePACExt
* HaveLVA
* HaveSecureEL2Ext
* HaveVirtHostExt

Change-Id: I2094c1eb6310506787e5628aa62d0b14e917ab5e
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59471
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-09 16:45:58 +00:00
Giacomo Travaglini
6412be29f4 arch-arm: Check implemented features through the release object
This is faster than going through the ISA and reading the corresponding
ID register value

Change-Id: Iec247167f3b99dcabf2908fceb0c2365c37ba017
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59470
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2022-05-09 16:45:58 +00:00
Giacomo Travaglini
20e1ade7ed arch-arm: Do not read SCR on the critical path
Change-Id: I0318563382b3c910c599f9fa16ad29553129c537
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59469
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-09 16:45:58 +00:00
Angie Lee
a8e8d64e5d fastmodel: Fix an index parsing bug on PL330::gem5_getPort
Change-Id: I2cf1abb0eb21c6bd65f81628be52650ef9250fbb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59369
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-09 08:47:45 +00:00
Gabe Black
dfc8614ee2 scons: Ensure config file values are strings.
Apparently, sometimes a SCons Value node created with an integer value
0 will have a string representation which is the empty string, which
is obviously problematic. To work around this bug, convert the value
to a string explicitly before creating the Value node, so that we get
a sensible translation instead.

Change-Id: I4a09b2fb366aaf2d4d1c7e6f8cc84224b2d010c4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59472
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2022-05-09 02:55:52 +00:00
Giacomo Travaglini
4ccb2643c1 base: clang-7 can't deduce non type parameter with auto
We now use explicit types instead (size_t)
This is fixing compiler checks, build 224 [1]

[1]: https://jenkins.gem5.org/job/compiler-checks/224/\
    artifact/compile-test-out/clang-version-7/

Change-Id: I5e94652b2fef554b1c47ce2972462401703ca5d5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59430
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-05-08 08:00:05 +00:00
Giacomo Travaglini
150d7a03bd base: Fix -Werror=unused-variable in Memoizer
Change-Id: I222a445121a35a4abc1a3fa2068e6c26ad7ee843
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59429
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-05-08 08:00:05 +00:00
Giacomo Travaglini
446c0ff6ba system-arm: Fix GICv3 in multi-cluster configuration
Current way of initializing GICv3 in the gem5 bootloader doesn't
work when there is a PE labelled with non-zero Aff1, Aff2 or Aff3
in the MPIDR_EL1 register
(For example in a multi-cluster configuration).

This is because the bootloader is considering Aff0 only

mrs x0, mpidr_el1
// extract the primary CPU.
ldr x1, =0xff00ffffff
and    x2, x0, #0xff // use Aff0 as cpuid for now...

With this patch we are solving the issue, by considering
every affinity number. Now the primary cpu is the cpu with

Aff3..Aff0 = 0.

The bootloader was also using Aff0 (stored in x2, see above)
to let every CPU index their own redistributor memory mapped frames.
In this model every secondary CPU was in charge of initializing
their own redistributor registers.

This can't be used anymore as we have a tuple of affinity
numbers now rather than a single flat index.

We are addressing the issue by letting the primary cpu initialize
every redistributor in the system. This is done by iterating
over consecutive frames and by reading GICR_TYPER.Last, which
is set to 1 if the current frame is the last one.

Change-Id: I2bcad286c2282bf1c47618e5391bf1c2e2b27013
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59393
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2022-05-07 22:41:12 +00:00
Giacomo Travaglini
5d45c50b48 misc: Add VExpress_GEM5_Foundation bootloader
The VExpress_GEM5_Foundation platform cannot use the VExpress_GEM5_V2
bootloader as the GIC has a different memory map

A new tarball has been uploaded to dist.gem5.org with the new bootloader

Change-Id: Ie0c16e623c3323b7be2a333cd6b0ffcf891b7b9b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59392
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-07 22:40:47 +00:00
Giacomo Travaglini
776321d2c2 dev-arm: GICD_PIDR2.ArchRev value depends on GIC version
The GIC architecture specification states the GICD_PIDR2.ArchRev
field is set to 3 for GICv3 and to 4 for GICv4. We bind this
value to the gicv4 parameter

Change-Id: I3ba34bc0b4538b4d5170915a4ee042e534f2590f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59391
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2022-05-07 22:40:25 +00:00
Matthew Poremba
54d2438066 dev-amdgpu: Removed hardcoded AQL queue size
The AQL queue size is currently hardcoded to 64kB. For longer running
applications this causes the circular queue to wrap before reaching the
real end of the queue. Add the computation for queue size instead.

Previously longer applications (e.g., bc in pannotia) were hanging
around 4k kernels. With change the application launches 10k+ kernels.

Change-Id: I6c31677c1799a3c9ce28cf4e7e79efcb987e3b7f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59449
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
2022-05-07 03:47:06 +00:00
Bobby R. Bruce
4119529d8a util-docker: Fix the broken riscv cross-compiler docker
Previously the line
```
RUN git checkout --recurse-submodules 051b9f7ddb7d136777505ea19c70a41926842b96
```

Was causing an error.

Change-Id: Ia13e676f7113c320d4a335b4999c47de415b278b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59351
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
2022-05-06 20:53:32 +00:00
Bobby R. Bruce
92894edf78 util-docker: Ensure all apt update/upgrade/install in one RUN
Prior to this patch those building from these Dockerfiles could
encounter caching issues where the `apt -y update` RUN was loaded from a
cached layer prior to running the `install` command. Typically this was
trying to obtain a package from a wrong IP address. The fix for this is
to run this all in one Docker RUN to avoid loading a broken cache.

Change-Id: If309c5c1d4a0240fed670abe980772d90f7d2172
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59350
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-05-06 20:53:32 +00:00
Bobby R. Bruce
a13e9bd4f7 util-docker: Add gpu-fs to docker-compose.yaml
Though https://gem5-review.googlesource.com/c/public/gem5/+/59051 added
the gpu-fs image, it needs added to the docker-compose.yaml file to be
automatically build and pushed to our docker image repository.

With this patch a user can execute `docker-compose build gpu-fs` to
build this image locally.

Change-Id: Iacc768d3d1b7fccb8867e8c788012c292216cb02
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59349
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-05-06 20:53:32 +00:00
Giacomo Travaglini
7a9e99400f dev-arm: Gicv3.gicv4 parameter set to False by default
GICv4 features are not currently implemented so it is more natural
to set it to false by default

VExpress_GEM5_V2 platform assumes a GICv4 memory map therefore
sets it to True

Change-Id: Ib4bd17acd56cd029aacf5578ab0259a6ea1bb30c
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59390
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-05-06 16:29:22 +00:00
Giacomo Travaglini
36c4778c7d system-arm: Do not trap SVE instructions to EL3
While other CPTR_EL3 bitfields disable trapping by setting
them to zero, SVE trapping works in the opposite way round:

we need to set CPTR_EL3.EZ to 1 if we don't want an EL3 trap

Change-Id: I97d396c402a6d7ebda40d6787ee2f41499f2d1c5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59389
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2022-05-06 16:29:12 +00:00
Bobby R. Bruce
6209641d33 tests: Disable 2 core Timing MESI_Two_Level X86 boot test
This is due to this error: https://gem5.atlassian.net/browse/GEM5-1219.
After several weeks of failing Weekly tests, this test will be disabled
until it can be fixed.

Change-Id: If7510426c33f3412a559681f653e955409fcdce4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/59329
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2022-05-05 23:39:09 +00:00