Commit Graph

4915 Commits

Author SHA1 Message Date
Gabe Black
4fe56ff720 arch-arm,cpu: Replace rename modes with split reg/elem register files.
This simplifies the O3 CPU, and removes special cases around how vector
registers are handled. Now ARM is responsible for maintaining its
different register personalities internally.

Also, this re-establishes the invariant that registers are indexed as
complete, opaque entities with no internal structure, at least as far as
the CPU is concerned.

To make sure the KVM CPU sees the correct state, we need to sync over
the vector registers if we're in 32 bit mode when moving state to or
from gem5's ThreadContext.

Change-Id: I36416d609310ae0bc50c18809f5d9e19bfbb4d37
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49147
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-28 06:00:07 +00:00
Gabe Black
25138cbb7a arch: Simplify and tidy up PCState classes.
Change-Id: Ife5412fdd8cc8093371365b8dd4705f77b952191
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52034
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2021-10-28 05:50:26 +00:00
Giacomo Travaglini
69e6ea485a arch-arm: Add walkBits method to PageTableOps
Change-Id: I84cea3bcc5a3b566b8c26ebd3a54443c96199483
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52008
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-10-27 09:05:44 +00:00
Giacomo Travaglini
1268c6ec3c arch-arm: Expose LookupLevel enum to the python world
Our goal is to make it a SimObject Param

Change-Id: I90673fada66f59d4a90354660d2513a39c0ccba5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52007
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-27 09:05:44 +00:00
Gabe Black
77b009855f arch-x86,cpu-kvm: Move the x86 KVM CPU to the arch/x86 directory.
The x86 KVM CPU had been in the cpu/kvm directory, while the arm CPU was
inconsistently in the arch/arm directory.

This change moves the x86 CPU to be in arch/x86, restoring consistency.
This location will make the KVM support more modular, by not having the
x86 CPU implementation right alongside the generic implementation.

Change-Id: Ia13151f843df8f8877bfef5ff620825877d3dffa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52085
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-27 00:09:46 +00:00
Gabe Black
ebef94707e arch: Use the actual ISA namespace for PCState in the parser.
Change-Id: Id716c809fb6a33b170727c0e08fc15019f2468c6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52030
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-26 19:15:48 +00:00
Gabe Black
258a1ad47d arch-riscv: Use std::abs in riscv to avoid a warning.
gcc complains that regular abs returns an int and may truncate its
result. The warning suggests using std::abs instead, which is
polymorphic and will have a version which returns an appropriately sized
type.

Change-Id: I35de92477273b415ce6993cf0cda7dee04985ef9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/52029
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-26 19:15:48 +00:00
Gabe Black
4a2b4f162b arch: Remove the page_size.hh switching header file.
Change-Id: I23ac089a5f7152db6443e2b016d3c85a33bdc20d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50766
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-10-22 21:43:02 +00:00
Gabe Black
6107dd11c6 misc: Remove include of arch/page_size.hh, and fix up includes.
Remove the only remaining use of arch/page_size.hh, and fix up a couple
files which were using one of the constants defined in a specific arch
version of it without including the file they needed directly.

Change-Id: I6da5638ca10c788bd42197f4f5180e6b66f7b87f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50765
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-10-22 21:43:02 +00:00
Gabe Black
fbe002bf12 arch: Make the MMU ranged translateFunction pure virtual.
The (simple) implementation in each ISAs MMU can then specify the page
size it wants, which is the page size appropriate for that ISA.

Change-Id: Ia105150601595bd6bb34379fc59508d0ffe35243
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50761
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
2021-10-22 21:43:02 +00:00
Gabe Black
1f9fc43e72 arch: Add a MMUTranslationGen class to the BaseMMU.
This translation generator is returned by the new version of the
TranslateFunctional method which translates a region rather than a
single address. That method is currently virtual with a default
implementation which is not overloaded, but the plan is for the other
MMUs to override that method and inject their own page size minimally.
In the future, the MMUTranslationGen class and the implementations in
the MMUs may be updated so that they can, for instance, handle varying
page sizes across a single translation.

Change-Id: I39479f0f0e8150fc6e3e1a7097a0c8bd8d22d4e0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50759
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-22 21:43:02 +00:00
Giacomo Travaglini
309e48c0cb arch-arm: Add fchmodat implementation to the Syscall Table
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I6ce4770aea0456423cf5a37171fbd8e4469b3e98
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51748
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-10-22 13:51:16 +00:00
Giacomo Travaglini
16253e494e arch: Fixed Packed register view for VecPredReg
A bug in the VecPredRegContainer::as method was introduced by
a past commit [1]. The commit was not properly handling the case of
a Packed representation

If Packed == true -> NumElement = NumBits instead of
NumElements = NumBits / sizeof(VecElem)

This patch is fixing it

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

Change-Id: I308769c3938d0fac84316936f732a6c383146484
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51867
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-10-22 11:50:29 +00:00
Giacomo Travaglini
535963c2d0 arch-arm: Fix codying style in TableWalker descriptors
Change-Id: Ib46e937ace35cbd3dcae777956fa024195e2136c
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51808
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-22 08:53:59 +00:00
Gabe Black
9f73802ea2 arch: Correct the direction of the arch->gem5 lib tag implication.
The arch implies gem5 lib, and not the other way around. Or in other
words, if, for example, x86 is the ISA, the having the tag 'x86 isa'
would imply that that file also has the tag 'gem5 lib'. Having the tag
'gem5 lib' would not imply 'x86 isa'.

This worked out because when testing for a single tag, we were using
with_any_tags, and 'gem5 lib' would expand to 'gem5 lib' and 'x86 isa'.
Then we would match files which were non-specific and used 'gem5 lib',
or files which had more specifically used 'x86 isa' only. Files which
used, for instance, 'arm isa', would not meet either criteria of the
implied "or".

Change-Id: I301d1bbbbcac1594371584d4b0d5d291b7b77fc4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51827
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
2021-10-21 19:57:33 +00:00
Giacomo Travaglini
847f642f0e arch-arm: Add TxSZ to PageTableOps::index
This patch is adding the input address (IA) size (TSZ) to the
index method, as it is limiting the number of bits used to
determine the descriptor index from the input address

Change-Id: Ibc8f9ce94ea0ce06093bd90546ca1a906518b700
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51807
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-21 08:06:44 +00:00
Giacomo Travaglini
1b6c050ebf arch-arm, dev-arm: Use PageTableOps in Arm TableWalker
As the VMSA is shared between the CPU MMU and the SMMU, we move the
PageTableOps data structures to the arch/arm/pagetable.hh/cc sources.

Both MMUs will make use of them

Change-Id: I3a1113f6ef56f8d879aff2df50a01037baca82ff
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51672
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-21 08:06:44 +00:00
Gabe Black
f65a704296 arch: Only build GPU switching headers if building the GPU.
Otherwise, SCons may discover an include which is guarded with BUILD_GPU
(like GPUCoalescer in mem/ruby/profiler/Profiler.cc), but not understand
that BUILD_GPU is not true. It will then follow the includes and find
generated headers which it will then generate, specifically X86 headers
for X86TLB and X86Pagetable param structs.

If not using x86, for instance if building the NULL isa, it may not be
possible to generate those headers because those objects are not visible
to SCons.

Change-Id: I955d0ef6ffb146eeb99bb052d29abe835cac5d9a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51829
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-20 22:44:08 +00:00
Giacomo Travaglini
6d336c5635 arch-arm: Add futimesat implementation to the Syscall Table
Change-Id: I3096c5c1ed38cd4cfe9ca6e3c570f408557769eb
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51060
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-10-20 15:10:45 +00:00
Giacomo Travaglini
4808a22dae arch-arm: Add utimes implementation to the Syscall Table
Change-Id: If618bd4d746daa42e33ac91721ba2b23c6880bf6
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51058
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-10-20 15:10:45 +00:00
Giacomo Travaglini
3627659ccb arch-arm: Add mknodat implementation to the Syscall Table
Change-Id: Ib01443f5304da511ff41010d35bdda71e20e3f93
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51057
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-10-20 15:10:45 +00:00
Gabe Black
73025695c7 scons: Use tags to gate ISA files and not env['TARGET_ISA'].
Change-Id: Ib81a4c570fbb050fa7d82919edacfed004c6800e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50336
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2021-10-19 20:41:03 +00:00
Gabe Black
305a81aae7 arch: Consolidate common debug flags.
Consolidate debug flags which are defined separately in multiple ISAs in
arch/SConscript instead. This will prevent conflicts when more than one
ISA can be compiled at a time.

Change-Id: I70862c403d19f04bbcbabd74dd751ca92d1ed942
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50334
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-10-19 10:53:44 +00:00
Gabe Black
038bf7075a scons: Use unions to prevent debug flag destruction.
When an object is a field in a union, it's the programmer's
resposibility to destroy it from the union's destructor. We can simply
neglect to do that and avoid having to use new to create the flags.

Also, we can define the flags as inline variables (a c++17 feature), and
then create a constexpr references to them. This lets us refer to debug
flags in constexpr objects, although we can't interact with them at, for
instance, construciton time or we'd lose our own constexpr-ness since
the actual object is not constexpr.

In c++20 we would hypothetically be able to use constexpr with new and
delete, but there may be additional restrictions that would make this
particular use impossible. Also this avoids leaking memory, which, even
though it's intentional, may confuse tools like valgrind.

Also, we need to ensure that all headers are included in some source
file so that they exist in the final executable, so that they show up in
the help, can be enabled/disabled, etc.

Change-Id: Ia43111d938e7af7140b1c17dd68135f426d0a1e9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49783
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jui-min Lee <fcrh@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-19 10:53:44 +00:00
Giacomo Travaglini
1b2083fc53 arch-arm: Add mknod implementation to the Syscall Table
Change-Id: Ie5af5c4223e015d04aadda125f3131683a06463f
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51055
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-10-19 08:48:49 +00:00
Giacomo Travaglini
dcf4e11a15 arch-arm: Add mkdirat implementation to the Syscall Table
Change-Id: I1323faf583b1dd1192515f6e598e1616dc14de11
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51054
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
2021-10-19 08:48:49 +00:00
Giacomo Travaglini
6c9792d333 arch-arm: EL2&0 invalidations do not depend on VMID
When the PE is executing in host mode (HCR.E2H = HCR.TGE = 1)
The invalidation shouldn't depend on the current VMID

Change-Id: I3433485cc8f8dedb657139bcc3d71e05e9d7e4f1
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51671
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-10-18 13:47:18 +00:00
Giacomo Travaglini
655349a9ca arch-arm: Use EL2&0 regime for invalidation only if EL2 enabled
Change-Id: I467a27e48d077cea5e56afae08f9e0e72f529cfc
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51670
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-10-18 13:47:18 +00:00
Giacomo Travaglini
f49a15e00f arch-arm: Define a Lookup structure to simplify TLB code
The lookup/matching function signatures have been constantly amended to
include new parameters. We are replacing the parameter list with a
single lookup structure. This will make it easier to add new forms of
lookups and to propagate them through the MMU/TLB code

Change-Id: Ic45a64d778460b6d308551333c9dc230a02ecb6e
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51669
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-10-18 13:47:18 +00:00
Giacomo Travaglini
b29349671c arch-arm: EL2/EL3 TLB invalidations should ignore the ASID
By using the TLBIMVAA class we invalidate for every ASID

Change-Id: Ie53747067275b01eab42d49b5fa518334a86ac53
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51668
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2021-10-18 13:47:18 +00:00
Giacomo Travaglini
8fe7a740e3 arch-arm: Do not always print 0 stats in ArmTLB
We shouldn't print all TLB stats regardless of their value

For example there is no need to print the number of
read/write hits/misses/accesses in a instruction only TLB as
it will always inevitably be zero

With this patch we are flagging them as nozero, in order
to suppress their printing in the final stats file.
We are still printing them (regardless of their value) in the
unified TLB type

Change-Id: I54e57d856ceb451f6bacdd175a61768d030862aa
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51667
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-18 13:47:18 +00:00
Gabe Black
5c8c981cdd arch-sparc: Fix the build for SPARC.
The fp_enable_check mechanism was removed recently, but the removal was
only partial for SPARC which broke its build. This change completes the
removal by finishing the necessary code substitutions.

Change-Id: I3a6a6cd679b08556e5e4a2a2c4e98168ee7fe1fd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51673
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-15 10:13:42 +00:00
Gabe Black
2887a996e1 fastmodel: Don't try to "staticify" system libraries.
We want to insist that the fast model libraries are the static versions
so they don't have to be found on non-system paths at run time, but we
don't need or want to do the same for system libraries which are from
standard paths on the host system.

Split the set of libraries fast model adds to the build into ones that
come from fast model itself, and ones it needs which should be
provided by the system. The ones from fast model itself should still
go through staticify, but the system libraries should be passed to the
compiler generically so it can pick which version it wants.

Change-Id: I222c94f8117143b86377150e686a4af669a994fe
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51627
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-14 11:39:52 +00:00
Giacomo Travaglini
133997d515 arch-arm: Add chdir implementation to the Syscall Table
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I584d9269b0445347dd65071f7fc5569c8ac24b89
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51549
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-10-14 08:52:39 +00:00
Gabe Black
1ee4c4ce43 arch-power: Replace the Loader namespace with loader.
The Loader namespace is deprecated, and is replaced with loader.

Change-Id: Ic973eefd55c6f8a43d3d41346b8b6e4795e19e55
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51527
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-13 20:29:08 +00:00
Gabe Black
8304ed1967 base,arch-arm: Replace Stats namespace with statistics.
The Stats namespace is deprecated.

Change-Id: I17b1aa7fbced5db7b325e5339395281f3b3eda0b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51528
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-13 20:28:52 +00:00
Gabe Black
ad944025ab scons,arch: Make the gem5 lib tag imply the current arch tag.
That way you can use the tag to specify when a source file should be
built, instead of conditionally declaring the file to SCons.

Change-Id: Ia3a23860d2ee39ec6b32ee2195648b4d88564c83
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50330
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-13 20:22:37 +00:00
Gabe Black
79953cf973 scons: Add tag support to ISADesc.
Change-Id: Icac027cc4df48d0a3c06911bd6fa0a8b5b72c60a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50329
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-13 20:22:37 +00:00
Gabe Black
bc1438414a sparc: Stop using fp_enable_check.
SPARC and MIPS are the only ISAs using this mechanism. This is a step
towards making them self sufficient and simplifying the ISA parser, it's
interface to the rest of gem5, and it's assumptions about how ISAs are
structured.

Change-Id: Ied85d5012a806321fd717f654d940171da3450af
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48717
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-10-13 07:59:52 +00:00
Gabe Black
645c6b3ceb sparc: Stop special casing FP enable checks for full system.
Set the actual state which gets checked in full system, and then do that
all the time.

Change-Id: I27ea0939ad71f7399b676e22ec2e73e3e0dd6476
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48716
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-10-13 07:59:52 +00:00
Gabe Black
7d92144e1b arch,sparc: Get rid of the unused checkVecEnableFault mechanism.
The method was only defined in SPARC, and SPARC does not use the vector
register file.

Change-Id: I4112eadaecb1f1c6c6db12975bec0cd1fa245d6c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48715
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Boris Shingarov <shingarov@labware.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2021-10-13 07:59:52 +00:00
Giacomo Travaglini
851e543b2f misc: Using OS::off_t in syscall signature
Change-Id: Iefa1e207a3e825959b0fe8df30e6be182d73a0f8
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51490
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-13 07:44:00 +00:00
Giacomo Travaglini
37495f8823 misc: Using OS::size_t in syscall signature
Using the host size_t is confusing the guest ABI engine every time
the host and the guest adopt a different data model (ILP32 vs LP64)

For example when a LP64 machine is running an ILP32 application in SE
mode, "size_t" will wrongly inform the guest ABI engine to retrieve the
argument by loading a 64 bit (instead of 32) value from the stack

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

Change-Id: Id7d7740ac429f534a4089331bedf21dc3951bbad
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51489
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-13 07:44:00 +00:00
Giacomo Travaglini
43910b5312 arch-arm: Add ftruncate implementation to the Syscall Table
Change-Id: I27c526c5c8107f888aee7c99b952f086d4fa0e35
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51488
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-10-13 07:44:00 +00:00
Giacomo Travaglini
2644cc3cac arch-arm: Add sendto and recvfrom implementations to the Syscall Table
Change-Id: Id3fd65778ad3b5af8ec54381a0b8824115c309f6
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51487
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-10-13 07:44:00 +00:00
Giacomo Travaglini
ac63b7e294 arch-arm: Add fchownat implementation to the Syscall Table
Change-Id: If2e05b84064886bd924348930a151c7c00877c38
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51052
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-12 15:19:32 +00:00
Giacomo Travaglini
f9a7196396 arch-arm: Add fchown implementation to the Syscall Table
Change-Id: I4696e305383492e3bf3cf079ffb68eac24f6a19d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51051
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-12 15:19:32 +00:00
Giacomo Travaglini
b1a2d5f293 arch-arm: Add existing at impl to ArmLinux32 Syscall Table
Change-Id: Ia1e7cb02ce9513e6ef5d7037dafc84fbd52b8504
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51049
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
2021-10-12 15:19:32 +00:00
Eduardo José Gómez Hernández
2b46872ee9 arch-x86: Fixed M5InternalError when decoding certain bytes
0F 38 is the two bytes prefixes to decode a three-byte opcode.
To prevent errors, the two_bytes_opcode decoder will complain
if it tries to decode 38 as the opcode, because it is a prefix.
The decoder, will treat 38 as a prefix, preventing it to
end in the two_byte_opcode decoder.

However, using the VEX prefix is possible to reach this
forbidden state.

The set of bytes C4 01 01 38 00 will trigger the mentioned
M5InternalError.

The previous instruction is not valid, but it could be
decoded from an speculative path. In its place, a UD2
instructtion should be emitted if the VEX prefix is
present.

Change-Id: I6b7c4b3593dd8e6e8ac99aaf306b8feeb7784b56
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49990
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-07 07:06:37 +00:00
Matthew Poremba
3112a7f0d0 arch-gcn3,gpu-compute: Move GCN3 specific TLB to arch
Move GpuTLB and TLBCoalescer to GCN3 as the TLB format is specific to
GCN3 and SE mode / APU simulation. Vega will have its own TLB,
coalescer, and walker suitable for a dGPU. This also adds a using alias
for the TLB translation state to reduce the number of references to
TheISA and X86ISA. X86 specific includes are also removed.

Change-Id: I34448bb4e5ddb9980b34a55bc717bbcea0e03db5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49847
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-10-04 23:47:03 +00:00