Commit Graph

17694 Commits

Author SHA1 Message Date
Gabriel Busnot
55bb9ebe7b base: Define the gem5_assert macro
gem5_assert is a drop-in replacement for regular assert, except that
the condition must always be valid, compilable code. It allows to
perform clean-up before exiting using the exit method of ExitLogger.

The need for clean-up is detailed in the following issue:
https://gem5.atlassian.net/browse/GEM5-968

Change-Id: Icad1719c0e6fbb066471d1fecfb12eedd65aa690
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45027
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-30 01:01:30 +00:00
Gabe Black
d54dd3bb52 base: Always compile the condition of chatty_assert.
The condition must always be valid code and will always exist to
satisfy the compiler as far as what variables are used, etc, but it
will only actually be evaluated if NDEBUG is not set.

Change-Id: Ia5a6273c95f2e7bf1b7443751fed38c62e73b351
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48605
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-30 01:01:30 +00:00
Matt Sinclair
97760cb5a3 gpu-compute: fix typo in compute driver comments
Change-Id: I550c6c81ffb2ee9143a2676f93385a8b90c4ddd5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48023
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-29 20:00:20 +00:00
Gabe Black
ea2bc1b63f sim,base: Deprecate the GEM5_DEPRECATED_ENUM_VAL attribute.
The deprecated attribute didn't work on versions of gcc older than 6,
but we now require version 7 or newer, so we don't need the macro any
more.

This change collapses the two uses of it in sim/aux_vector.hh, and marks
the macro as deprecated by extending the message string in the
underlying deprecated attribute.

Change-Id: I3bc9835ba19ad9534c7725e17a3558a749a94ca5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48514
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
2021-07-29 10:17:51 +00:00
Gabe Black
00876fff20 misc: Replace the GEM5_VAR_USED macro with [[maybe_unused]].
The [[maybe_unused]] attribute is now standard, so we can use that
directly without hiding it behind a macro.

Change-Id: If24ffd7e50bdb503cb3e6ea61f226ea794e84b8f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48511
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-29 10:17:51 +00:00
Gabe Black
9f92e2f28e base: Deprecate the GEM5_NO_DISCARD macro.
The now standard [[nodiscard]] attribute can be used directly instead.
Unfortunately, I can't think of any way to actually mark the old macro
as deprecated, since it still has to expand to an attribute which
applies to the following function.

Change-Id: Icbbe3e3d182d845f289727724fef080722093683
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48510
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2021-07-29 10:17:51 +00:00
Yu-hsin Wang
8fa9dceaa8 fastmodel: Remove CortexA76 unpresented resource
Change-Id: I8fde5f90cca45df9430c5f4159fa6e8319ad12df
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44527
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-29 05:46:45 +00:00
Jan Vrany
a5789cc8e1 base: Change prototype of BaseRemoteGDB::trap()
Change the return type of BaseRemoteGDB::trap() to void since the
return value was never used by any of the callers. Also change the
name of second parameter to signum since its value is reported back
to GDB in "S" packet.

Change-Id: I81acfac24ffe62e4ffae6b74bf33f1f07ada3ca7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48180
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-28 09:02:40 +00:00
Giacomo Travaglini
46a8bc2f56 arch: Provide an alternative view of the TLBs in the BaseMMU
It is possible from the MMU to traverse the entire hierarchy of
TLBs, starting from the DTB and ITB (generally speaking from the
first level) up to the last level via the nextLevel pointer. So
in theory no extra data should be stored in the BaseMMU.

This design makes some operations a bit more complex. For example
if we have a unified (I+D) L2, it will be pointed by both ITB and
DTB. If we want to invalidate all TLB entries, we should be
careful to not invalidate L2 twice, but if we simply follow the
next level pointer, we might do so. This is not a problem from
a functional perspective but alters the TLB statistics (a single
invalidation is recorded twice)

We then provide a different view of the set of TLBs in the system.
At the init phase we traverse the TLB hierarchy and we add every
TLB to the appropriate set. This makes invalidation (and any
operation targeting a specific kind of TLBs) easier.

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

Change-Id: Ieb833c2328e9daeaf50a32b79b970f77f3e874f7
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48146
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-07-28 08:13:09 +00:00
Giacomo Travaglini
76996ea806 arch: Add a nextLevel pointer to BaseTLB
This is a step towards supporting multi-level TLBs:
Every TLB will have a pointer to the next level TLB in the
hierarchy.

Example:

* L1 I-TLB
* L1 D-TLB
* L2 shared TLB (I+D)

l2 = BaseTLB()
itb = BaseTLB(next_level=l2)
dtb = BaseTLB(next_level=l2)

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

Change-Id: I398a17919564aad4b18efb8dace096965781ece1
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48145
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-07-28 08:13:09 +00:00
Giacomo Travaglini
1320dc4278 arch-arm: Remove unused parameter from TLB::insert
Change-Id: Iab395834fe8b3fabf4f5f666af1b8790af08182d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48144
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
2021-07-28 08:13:09 +00:00
Giacomo Travaglini
65195c8011 arch-arm, configs: Remove ArmITB/ArmDTB
Removing ArmITB and ArmDTB makes sense as it implies a fixed 2 TLBs
system; by using the generic ArmTLB class we open up to a more generic
configuration

This is also aligning to the other ISAs

Change-Id: Ifc5cf7c41484d4f45b14d1766833ad4c4f7e9e86
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48143
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-07-28 08:13:09 +00:00
Giacomo Travaglini
9964a3aca7 arch: Add TypeTLB Param in BaseTLB
This patch is adding an enum Param in the BaseTLB to tag which kind of
translation entries the TLB is holding

* instruction: holding instruction entries
* data: holding data entries
* unified: holding instruction and data entries

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

Change-Id: I033f840652f354523f48e9eb78033ea759b5d0e0
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48142
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-28 08:13:09 +00:00
Giacomo Travaglini
870f93301f arch-arm: Move translation logic from the ArmTLB to the ArmMMU
This patch is moving most of the TLB code to the MMU.
In this way the TLB stops being the main translating agent and becomes a
simple "passive" translation cache.

All the logic behind virtual memory translation, like

* Checking permission/alignment
* Issuing page table walks
* etc

Is now embedded in the MMU model. This will allow us to stack multiple
TLBs and to compose arbitrary hierarchies as their sole purpose now is
to cache translations

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

Change-Id: I687c639a56263d5e3bb6633dd8c9666c85edba3a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48141
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-28 08:13:09 +00:00
Gabe Black
0d998a3c53 scons: Add the "print_suppressions=0" option to the LSAN warning.
This is part of what SCons uses internally, and is probably what someone
using LSAN_OPTIONS would want to use externally too.

Change-Id: I413c680829e0edab76598122637e3236c35e8209
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48645
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2021-07-28 02:41:07 +00:00
Gabe Black
496835cd20 scons: Get rid of some redundant text in a print out.
When printing the LSAN_OPTIONS setting to use, we were manually
prefixing "suppressions=" to it, but it already had that built into the
option. This made that text print twice. Remove the duplicate.

Change-Id: Ie599e02d0cf17bcf18278d72350831a2e0ac09f6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48644
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-28 02:40:36 +00:00
Gabe Black
5a53ed4e31 scons,test: Don't -Wall or -Werror for googletest libraries.
These libraries come from elsewhere, and so there's no reason to worry
about warnings. We can't fix them even if they crop up. Also, set
CCFLAGS to avoid having a mixture of gem5 flags and googletest flags.

Change-Id: I19b07747a43cebb263ae1546c75631cff1f13132
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48368
Maintainer: Gabe Black <gabe.black@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2021-07-28 01:49:18 +00:00
Gabe Black
b3b81196aa misc: Replace type_traits.hh XX::value with XX_v.
Now that we're using c++17, the type_traits with a ::value member have
a _v alias which reduces verbosity. Or on other words

std::is_integral<T>::value

can be replaced with

std::is_integral_v<T>

Make this substitution throughout the code base. In places where gem5
introduced it's own similar templates, add a V alias, spelled
differently to match gem5's internal style.

gem5: :IsVarArgs<T>::value => gem5::IsVarArgsV<T>
Change-Id: I1d84ffc4a236ad699471569e7916ec17fe5f109a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48604
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-28 01:48:03 +00:00
Yu-hsin Wang
8b53b8bcdf fastmodel: Use Iris API to access memory
Memory space is not always outside of the CPU. For example the tightly
coupled memory (TCM) is inside of the core. To make gdb access those
kind of memory, we should use Iris memory API to read and write memory.
If we access a memory address not inside the CPU with Iris memory API.
The CPU would fire a request via amba transport_dbg. So the change also
covers the original behavior.

Change-Id: Ie223ab12f9a746ebafa21026a8680222f6ebd593
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45581
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-28 00:33:02 +00:00
Gabe Black
a4b3db0b9e scons: Increase the minimum version of gcc to 7.
This was bumped up to 7 by policy, but the SConsctruct was still
enforcing the old minimum of version 5.

Change-Id: I91966f95b18451f880af279dae286119f7b282d6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48512
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-28 00:07:15 +00:00
Gabe Black
7901e56206 dev: Drop include of drm/drm.h in kfd_ioctl.h.
I don't have this header on one of the machines I build on, so this is
breaking the build for me. Removing this include seems to make the
build succeed, implying that it's not actually necessary. I looked at
the file it's used in and didn't see anything that looked like it came
from this header file.

Change-Id: If4a29063d6d0d25904183cab78c9713ff1f8daa6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48603
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 21:34:58 +00:00
Gabe Black
2f42e79956 mem: Use the new "debug" namespace, and not "Debug".
The "Debug" namespace is deprecated and has been replaced by "debug".

Change-Id: Ic8e9082361a6717f3b07990dbaa1a66b0926f000
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48647
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 21:32:21 +00:00
Gabe Black
be3e6174d6 fastmodel: Minimally implement reading MiscRegs for the CortexR52.
This currently supports only the CPSR and SPSR currently. The CPSR is
needed to be able to read the PC since that also reads other related
info which ultimately comes from the CPSR. The SPSR is also set up
since it was easy to do at the same time.

Change-Id: I977fde47c81927f4972d4da2e781df306dfa3f4e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46139
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 21:29:06 +00:00
Hoa Nguyen
1e30ade018 util: Fix gerrit bot commit subject parser
Currently, if the commit subject does have tags, the parser will
return the list of tags as a NoneType object, which will be
iterated later. This caused the gerrit bot to fail.

This change lets the parser return the list of tags as an empty
list rather than a NoneType object. Also, a commit subject without
a semicolon `:` will be assumed as having no tags and the whole
subject is the commit message.

Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Change-Id: Ie8c90e14bb85c4ce1c583121d02e75aa87db7811
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48586
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 16:31:49 +00:00
Gabe Black
9bd381cef6 util: Make --with-asan work with more versions of the python lib.
The version of the python library on my system is libpython3.9.so, not
libpython3.so. Generalize the line in lsan-suppressions to cover this
version as well.

Change-Id: Iaee9a7767eb5f735862a3716c796213a43c5f9e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48643
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 15:55:49 +00:00
Gabe Black
fc75880d25 scons: Update the minimum version of python to 3.6.
The gem5 website says the minimum version of python is 3.6, but SCons
was only enforcing version 3.0.

Change-Id: I50e406538b29d2ee469d5fcc16cd509cfa6a7540
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48513
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 15:47:15 +00:00
Yu-hsin Wang
4560cf8531 fastmodel: add iris readMem and writeMem function
Iris memory API allows us to access the memory inside the core, for
example the tightly coupled memory (TCM). If we access a memory address
which is not in the CPU, it also fire a request to memory system.

Change-Id: I5925214534a10e3a55b780c3d4ed06e7559aafe0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45268
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-27 01:07:11 +00:00
Giacomo Travaglini
4ae8db4aa4 arch, arch-arm: Make BaseMMU translate methods virtual
As we are shifting towards making the MMU the main translating
agent, we need to make those methods virtual to let all ISAs
move their TLB::translate* methods to the MMU class

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

Change-Id: I50c84784546e8148230d79efe4bf010d0e36d6ab
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48140
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-26 23:29:46 +00:00
Bobby R. Bruce
c0a3c70304 misc: Merge branch 'release-staging-v21-1' into develop
Change-Id: I6ba57d7f70be70ae43fab396780d18623679a59a
2021-07-26 09:48:25 -07:00
Gabe Black
59496b6136 mem,gpu-compute: Stop using the GEM5_NO_DISCARD macro.
The [[nodiscard]] attribute is now standard, so we can use that
directly.

Change-Id: I57f59935858facb2a15bf4712be4bfd584bf0c7e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48509
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 21:57:04 +00:00
Gabe Black
b17f4c3037 base: Deprecate the GEM5_DEPRECATED macro.
The [[deprecated()]] attribute is now standard, so we don't need to hide
it behind a macro.

Change-Id: Icfa6ad8b75ac64330f50f72fa310e104161bbf9d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48508
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 21:57:04 +00:00
Gabe Black
89529e6261 sim: Use the [[deprecated()]] attribute instead of GEM5_DEPRECATED.
The [[deprecated()]] attribute is now standard c++, so use that
directly.

Change-Id: I246551b05484a707ac9da05dc91af34d78aae1ff
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48507
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 21:57:04 +00:00
Gabe Black
5590f2a903 base: Deprecate the GEM5_FALLTHROUGH macro.
The [[fallthrough]] attribute is now standard.

Change-Id: I9ab115f0135256a701efaa9a6c7ba4e966283f4b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48506
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 21:57:04 +00:00
Gabe Black
cb266a099f misc: Replace GEM5_FALLTHROUGH with [[fallthrough]].
Now that the [[fallthrough]] attribute is standard (as of c++-17), we
can use it directly instead of hiding it behind a macro.

Change-Id: I4d11e35b619532b1a3fd8d042265e18c80d86f9b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48505
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 21:57:04 +00:00
Kyle Roarty
523a92f7f0 arch-gcn3: Implement large ds_read/write instructions
This implements the 96 and 128b ds_read/write instructions in a similar
fashion to the 3 and 4 dword flat_load/store instructions.

These instructions are treated as reads/writes of 3 or 4 dwords, instead
of as a single 96b/128b memory transaction, due to the limitations of
the VecOperand class used in the amdgpu code.

In order to handle treating the memory transaction as multiple dwords,
the patch also adds in new initMemRead/initMemWrite functions for ds
instructions. These are similar to the functions used in flat
instructions for the same purpose.

Change-Id: I0f2ba3cb7cf040abb876e6eae55a6d38149ee960
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48342
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alex Dutu <alexandru.dutu@amd.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2021-07-24 17:27:02 +00:00
Kyle Roarty
1415308d10 mem-ruby: Account for misaligned accesses in GPUCoalescer
Previously, we assumed that the maximum number of requests that would be
issued by an instruction was equal to the number of threads that were
active for that instruction.

However, if a thread has an access that crosses a cache line, that
thread has a misaligned access, and needs to request both cache lines.

This patch takes that into account by checking the status vector for
each thread in that instruction to determine the number of requests.

Change-Id: I1994962c46d504b48654dbd22bcd786c9f382fd9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48341
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2021-07-24 17:27:02 +00:00
Kyle Roarty
f8578e4b05 gpu-compute: Fix TLB coalescer starvation
Currently, we are storing coalesced accesses in
an std::unordered_map indexed by a tick index, i.e.
issue tick / coalescing window. If there are
multiple coalesced requests, at different tick
indexes, to the same virtual address, then the
TLB coalescer will issue just the first one.

However, std::unordered_map is not a sorted
container and we issue coalesced requests by iterating
through such container. This means that the coalesced
request sent in TLBCoalescer::processProbeTLBEvent is
not necessarly the oldest one. Because of this, in
cases of high contention the oldest coalesced request
will have a huge TLB access latency.

To fix this issue, we will use an std::map which is
a sorted container and therefore guarantees the
oldest coalesced request will be sent first.

Change-Id: I9c7ab32c038d5e60f6b55236266a27b0cae8bfb0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48340
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 17:27:02 +00:00
Gabe Black
5412b20b47 base: Use if constexpr to simplify the reverseBits function.
Handle the sizeof(T) == 1 special case within the function using if
constexpr, instead of having two functions.

Change-Id: Idce63e18c77d2f7cc59d86c19f42d57ccdbefe5c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48504
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 11:35:00 +00:00
Gabe Black
0f2fb7bbb4 base: Use if constexpr to simplify the templates in __to_number.
The c++-17 feature "if constexpr" allows you to put code inside a normal
if which would normally have to be separated out using templates. The
condition of the if must be compile time evaluated, and the not-taken
path is discarded by the compiler.

Change-Id: I026381b2dbb140ef7f1b5cb23803782683ec419c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48503
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-24 11:35:00 +00:00
Gabe Black
faae3f0be9 cpu: Remove unnecessary includes of arch/locked_mem.hh.
Change-Id: I85769ea286e5ecc77ac7d7db1b09cb4b87129cd4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48383
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-07-23 10:41:21 +00:00
Gabe Black
02f47187ab python: Minor cleanups in the marshal program source.
Fix some minor style issues, use a "raw" string constant to make the
marshal script more readable, get rid of a redundant \n in the help
text, and make argv const.

Change-Id: I1dc3181a67b50286e3a0b833bb7251b7efd01978
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48382
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-07-23 09:43:09 +00:00
Gabe Black
7daeed83f7 cpu,fastmodel: Eliminate the now unnecessary initMemProxies method.
The proxies this method initializes no longer exist, since they're now
created locally.

Change-Id: I5fd1c99fbc00f5057ea8868e91be02d577b1c176
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45909
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-23 08:59:54 +00:00
Gabe Black
a6e023906e fastmodel,cpu: Eliminate the unused getVirtProxy.
Change-Id: I84683a3297143102a74ac6dfe744cd5804b83fe4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45908
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-23 08:59:36 +00:00
Gabe Black
83b14e569b misc: Stop using getVirtProxy.
The proxies are not used on the critical path, and it's usually implicit
whether they should be the FS or SE version.

Ideally in the future we won't need to worry about which version we need
to use, but the differences haven't quite been abstracted away, and
occasionally we need to decide between the two.

Change-Id: Idb363d6ddc681f7c1ad5e7aba69865f40aa30dc8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45907
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2021-07-23 03:42:17 +00:00
Gabe Black
b5fdb69aca util: Sort the "updater tags" in cpt_upgrader.py --get-cc-file.
This ensures that the same tags will create the same file, and avoids
spurious rebuilds/relinks for null builds.

Change-Id: Ic8e37a24e2c60d74d8c921dde1c5e102d3a764e3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48360
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2021-07-22 20:46:04 +00:00
Gabe Black
94e00fa905 base: Fix base/cprintftime.cc.
The compiler is unhappy that one of the parameters in a call to sprintf
is also the buffer it's supposed to output to, when that parameter is
marked "restrict", which means it shouldn't alias to other arguments.

Also, this code can't go inside the gem5 namespace, since it has a
main() function in it. The linker will look for main(), not
gem5::main().

Change-Id: Ib17c601aefdc3e7201eba021dafb1c51204d54bc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48423
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-22 20:45:18 +00:00
Gabe Black
b2067870e5 sim: Use a range based for loop in EmbeddedPython::initAll.
Change-Id: I380bed880735a411c6069079b4ae38a9d9080744
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48366
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2021-07-22 12:03:09 +00:00
Gabe Black
21c1d03dda arch-x86: De-conditionalize segmentation microops.
These were never used with conditions, so the condition check just added
overhead. Also, the not-taken path through the instruction didn't
actually set the destination to something, meaning that it would set it
to something arbitrary and not actually leave it unmodified.

Change-Id: I33fef088979b14ad74adf22b26419a1cacf386dd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45305
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-07-21 09:45:32 +00:00
Giacomo Travaglini
a10106e94a arch-arm: Stage1&2 TableWalkers sharing same port
This patch reverts part of the changes made by the removal of
the Stage2MMU class [1]:

Prior to that patch the stage1 and stage2 walkers were sharing
the same port (which was instantiated in the Stage2MMU).
By removing the Stage2MMU we provided every table walker a
unique port.

With this patch we are reintroducing port sharing to temporarily fix
existing platforms using walker caches.
(The long term design goal will be to have a unique page table walker)

Those complain if we try to connect a single ported cache to 2 table
walker ports (stage1 and stage2)

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

Change-Id: Ib68ef97f1e9772a698771269c9a4ec4514f5d4d7
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48200
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-07-19 13:27:11 +00:00
Hoa Nguyen
a021618745 arch-riscv: Revert change-45522
This reverts change:
https://gem5-review.googlesource.com/c/public/gem5/+/45522.

This reverts commit 1cf41d4c54.

Reason for revert:

The above commit caused booting Linux using RISCV either to
hang or to take significantly time more than to finish.

For the v21-1 release, the above commit will be reverted.

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

Change-Id: I58fbe96d7ea50031eba40ff49dabdef971faf6ff
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48099
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-07-16 20:50:47 +00:00