Commit Graph

19320 Commits

Author SHA1 Message Date
Gabe Black
a8a2ab5ec6 misc: Stop including config/the_isa.hh.
It is no longer necessary anywhere in gem5.

Change-Id: Iac999acf8c59ee7387214057bebb617acd01617c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62197
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2022-08-20 07:30:32 +00:00
Gabe Black
f4209bbdee misc: Remove lingering uses of TheISA::.
Change-Id: Ie55e0d79867fbc8f75a993fb456a58c84de5def4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62196
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 07:30:16 +00:00
Gabe Black
a13e3debed misc: Stop excluding code when building the NULL ISA.
The BaseCPU needs a little extra hacking because it tries to create
default objects based on what the ISA is. If the ISA isn't recognized,
then the types will be set to None, and some extra checks have been
added as the type is set up.

Change-Id: Ia3cae313e1a96a953d2316d9192f41a8fd28c141
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62195
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 07:30:07 +00:00
Gabe Black
aefc0576a2 scons: Get rid of the isa.hh switching header file.
Change-Id: I1aebf05f6d0f2cde3841d6e6d3361c9733538b08
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51240
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:17:41 +00:00
Gabe Black
2da4a2cdca cpu: Stop including arch/isa.hh.
This header file is no longer needed.

Also fix some places where the isa header file was being transitively
included.

Change-Id: Ib9a9d7db0c9808b29d7614bbd68e2052ea345e9f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51239
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:17:06 +00:00
Gabe Black
ba4dba4cb3 cpu: Store the ISA class using BaseISA and not TheISA::ISA.
All generic functionality of the ISA class can now be accessed using
virtual methods, and so we don't need to keep the ISA specific version
of the class around any more.

Change-Id: I9f9a3de2dc68983276ef7efc008a18960412d509
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51238
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:15:35 +00:00
Gabe Black
5d00ba897f arch: Make the (read|set)MiscReg methods virtual.
They will then be accessible through the base class. This adds some
small hypothetical amount of overhead to each call, but a quick test
booting linux on x86 does not show any significant slowdown.

Change-Id: If706ddf173d4e24d85468fb118b45099acf3c05b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51237
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 01:15:23 +00:00
Gabe Black
b3365e767a arch: Make the ISA::clear() method virtual.
This method is not at all on the critical path, and the adding virtual
method overhead to it will have essentially no effect on over all
performance.

Change-Id: I583bbe30f5ed923a0c771f36c3f07e5979c28476
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51236
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:14:54 +00:00
Gabe Black
d130fdc092 arch: Remove unused register flattening methods.
Most flattening methods in the ISA classes aren't used. The one
exception is the flattenMiscIndex function in ARM.

Change-Id: I26088692fe3f56914009afb0203f59da7cf6023a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51235
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 01:14:36 +00:00
Gabe Black
eaa67ca1ab fastmodel,cpu: Remove the flattenRegId ThreadContext method.
This is no longer used or necessary.

Change-Id: Ide8dd74b5d39b245d3d71979dd84c7fee60d566e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51234
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 01:14:22 +00:00
Gabe Black
ff4b675fb8 arch-arm,cpu: Remove all uses of flattenRegId.
RegIds can now be flattened directly.

Change-Id: I2a603c12bbc586720082363996f303cd3b43ac9c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51233
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:14:13 +00:00
Gabe Black
8918021f63 cpu: Eliminate the (get|set)RegFlat methods.
These can now be performed with the (reg|set)Reg methods by using an
already flattened RegId.

Change-Id: Ie02cda224d96644061227eada100675d38797e57
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51232
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 01:13:51 +00:00
Gabe Black
c686c93d4d arch,cpu: Replace calls to (get|set)RegFlat.
Make these use RegIds which are based on already flattened RegClass-es.

Change-Id: I50f50614830c7010c18a8ebb95aba8decc078ac0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51231
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-20 01:13:29 +00:00
Gabe Black
36de693dda arch-sparc: Implement RegClass based register flattening.
Change-Id: Ib1d5b7ac7ff5aa6f35099fd9fd4530951c3efa19
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51230
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-20 01:13:13 +00:00
Alexandru Dutu
c6b38909e1 gpu-compute: Adding support for LDS atomics
This changeset is adding support for LDS atomics
and implementing DS_OR_B32 instruction.

Change-Id: I84c5cf6ce0e9494726dc7299f360551cd2a485f5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61791
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-19 16:44:31 +00:00
Jarvis Jia
2816598831 mem-ruby: Fix replacement policy updates in MI_example
The current MI_example protocol's L1 caches updates the MRU information twice per request on misses -- once when the request reaches Ruby and once when the miss is returned from another level of the memory hierarchy.

Although this approach does not cause any correctness bugs for replacement policies like LRU since this request is the LRU in both cases, it does not work correctly for other policies like SecondChance and LFU, where updating the information twice (for misses) causes them to devolve to LRU.

Note that this was not directly a problem with Ruby previously, because it only supported LRU-based policies that were unaffected by this.  However, with the integration of 20879 Ruby now uses the same replacement policies as Classic (which has additional, non-LRU based replacement policies).

This patch resolves this problem by not updating the MRU information a second time for the misses. It has been tested and validated with the replacement policy tests in 20880.

Change-Id: I82a57abf2a16d70820413ba8118378f2e91fd7fb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62232
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
2022-08-19 03:08:02 +00:00
Hoa Nguyen
a57d336b7f arch-riscv: Remove one of two BasicDecode per atomic insts format
BasicDecode, or decode block templates in general, contains the template
for substituting the return statement returning a StaticInst given a
machine code.

In the case of micro-coding an instruction, this return statement is for
the macro op. Additionally, in gem5 riscv, the spawned micro-ops will be
added in the macro op constructor, which is done in the macro-op
constructor template. Thus, there's no need for having a return statement
for the micro-op.

Currently, there are two return statements in decode-method.cc.inc for
each riscv atomic inst. This change removes one of the two BasicDecode
blocks in atomic inst templates.

This change is expected to a cosmetic change.

Change-Id: Id14bde25d5d3f164b4faafd33bfd5c802a94ca09
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62492
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-08-19 02:49:28 +00:00
Hoa Nguyen
35bb55554e arch: Bump MaxVecRegLenInBytes to 2^16
Per chapter 2 of RVV 1.0 specs [1], RISCV vector extension supports
vector register size of upto 64kB.

[1] https://github.com/riscv/riscv-v-spec/releases/tag/v1.0

Change-Id: Ib62eb9d59006403f6fe08cfb06cb8a1bc0adbe36
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62491
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-08-19 02:48:36 +00:00
Bobby R. Bruce
3238822e9e stdlib,tests: Add BaseCPUProcessor to stdlib
The BaseCPUProcessor is processor containing BaseCPUCores. This gives
gem5 stdlib users a way to create processors containing BaseCPU
SimObjects. While SimpleProcessor does this by-proxy (the user simply
specifies the desires CPUType and ISA and the correct BaseCPU
instantiation is chosen), this new Processor allows a more raw passing
of BaseCPU objects.

The SimpleProcessor now inherrits from this BaseCPUProcessor to avoid
duplcation of functionality. A refactor to achieve this was moving the
setting of the board's memory mode from the SimpleProcessor's
"incorporate_processor" function to the BaseCPUProcessor's then altering
it to determine MemMode based on BaseCPU subclass rather than the
CPUType.

The tests/gem5/configs/simple_binary_run.py test script has been
extended to create an stdlib run with a BaseCPUProcessor instead of the
SimpleProcessor and tests have been included to ensure the
BaseCPUProcessor functions as intended.

Multiple cores comprising of different BaseCPU types has not been tested
and is not officially supported as of this commit.

Change-Id: I229943ab98ece39646f1b4feb909250bb5c61772
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62353
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-08-17 20:31:16 +00:00
Bobby R. Bruce
5e281c969b stdlib: Add "requires_send_evicts" function to AbstractCore
This is the last part needed needed to deprecate SimpleCore's
"get_type" function. This "requires_send_evicts" function can be used by
the cache hierarchy to determine whether the core requres sending
evictions from caches.

Change-Id: I4e42d9fcecf0b1c4344f4cd145126a2ea57b7b76
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62352
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-08-17 20:31:16 +00:00
Bobby R. Bruce
d0b2345086 stdlib: Add "is_kvm_core" function to AbstractCore
This function is useful in various parts of the stdlib to know if a core
is KVM or not as KVM cores requires the simulation to be setup slightly
differently.

Prior to this commit checking whether a core was a KVM core was only
possible via the CPUType which we may not always have.

Change-Id: Ibf6155ad631d5d5e93189d7376f022ea1baa685e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62351
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-08-17 20:31:16 +00:00
Bobby R. Bruce
d9b6a7ff9e stdlib: Create BaseCPUCore type
This separates the idea of a SimpleCore and a BaseCPUCore. A SimpleCore
selects the correct BaseCPU subclass based on user-specified CPUTypes
and target ISA. The new BaseCPUCore type simply wraps any BaseCPU core
for usage in the stdlib.

Much of the code previously handled in SimpleCore has been moved to
BaseCPUCore.

The `cpu_simobject_factory` method has been moved from AbstractCore to
SimpleCore; a more logical location for this function.

Change-Id: I29ce9e381e7d5e8fe57e0db5deb04ad976b7dab9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62292
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-08-17 20:31:16 +00:00
Bobby R. Bruce
d023d8a3dd stdlib: Remove "CPUType" from AbstractCore
This constraint bound us in many ways. There are many cases where we
want a core in a component which does not correspond to a CPUType
enum value.

This refactoring makes it so only SimpleCore utilizes this.

Docstrings have been updated to reflect this change.

Change-Id: I918c73310fc530dd060691cf9be65163cacfffb4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62291
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-08-17 20:31:16 +00:00
Jason Lowe-Power
d4cde65327 tests: Remove functional tests from Garnet
Garnet doesn't support functional reads. We were getting lucky in our
tests that no functional reads were going to the network. This change
removes the functional read check from the garnet-specific Ruby random
test.

Change-Id: I9c12c4aaab662555a1de58b73813118914ee495f
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62431
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-17 16:47:04 +00:00
Giacomo Travaglini
0ad684a6f2 arch-arm: XPACD, XPACI, XPACLRI do not trap
The HCR_EL2.API and SCR_EL3.API bits do not control the trapping of
those stripping instructions.

Change-Id: I84349937f8c50d63b5b52146743b035d1058fd8d
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34055
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Kaustav Goswami <kggoswami@ucdavis.edu>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-08-17 13:30:08 +00:00
Giacomo Travaglini
5bbc326423 mem-ruby: Replace deprecated Stats namespace with statistics
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Change-Id: I5633510c91ba35852a63965bbe508e8965744093
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62311
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-16 16:36:11 +00:00
Bobby R. Bruce
631e6ced3c stdlib: Add the "GEM5_USE_PROXY" seting for download proxy
This patch allows a user to set the "GEM5_USE_PROXY" environment
variable, in the format of "<host>:<port>", to declare a socks5 proxy
server to use when obtaining gem5 resources and the resources.json
file.

Note, this requires the Python SOCKS client module, which can be
installed via `pip install PySocks`.

Change-Id: I13f50d71fb6e0713f6a280ec9d2f0b3049c27eb6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62391
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-08-16 06:04:50 +00:00
Bobby R. Bruce
5dc8833f23 misc: Remove trailing whitespaces from src/Doxyfile
This was causing our pre-commit checks to fail when this file was
modified.

Change-Id: I144bbb72fa81358ef343b979b7a1422704306069
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62332
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-15 16:06:44 +00:00
Philip Metzler
50c8d9655e fastmodel: Use current execution state for memory lookup
The previous implementation used the physical memory view when reporting
memory back to GDB. This circumvents MMUs and caches, and leads to wrong
backtraces at the least.

Current architectures support EL3, EL2, and EL1/EL0, and the Iris
interface presents a Msn that corresponds to that (`0x10ff`), see
table "Canonical memory space numbers" in the Iris user guide.

As GDB expects the view of the processor when querying memory (e.g. for
backtraces), this will allow proper backtraces.

Not sure if there is an implicit way of expressing memory attributes
(like in Lauterbach with the access modifiers before address
specifications), or if there is a need to implement special monitor
commands. But for the common use, using `CurrentMsn` should be the
correct choice.

Change-Id: Ibd14c1f94163105539a7fb9132550fe713b5c295
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61951
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-12 05:02:40 +00:00
yiwkd2
1dd30723c4 arch-x86: A bug in rcr instruction of x86 solved.
A bug found in rotate carry right (rcr) instruction of x86 architecture
(src/arch/x86/isa/microops/regop.isa:891)

If realShiftAmt is dataSize * 8, bits function raises an assertion error
because the range is (dataSize * 8, dataSize * 8 - 1), which is invalid.

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

Change-Id: Ida59c56eb042f374c69d4a4d1380f7f770bb911b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62213
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-08-11 10:36:55 +00:00
Giacomo Travaglini
25d2a8366a configs: Enable EL3 in the arm-ubuntu-boot-exit example
EL3 (SECURITY) had been temporarily disabled to address the
FEAT_PAuth trapping issue.

This was caused by the EL3 bootloader not disabling pointer
authentication traps. Now that this has been implemented [1],
we should re-enable EL3 in this example platform

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

Change-Id: I62ee1dddc9b5d2d531f2603da7b2bccb23b3c9f0
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62271
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Kaustav Goswami <kggoswami@ucdavis.edu>
2022-08-11 08:18:03 +00:00
Jui-Min Lee
afd3e17f17 arch-riscv: Fix WFI race condition
Current WFI implementation always put the CPU to sleep even if there's
an pending interrupt. This might cause issue because an interrupt might
happen just before the WFI is executed, and there might not be any
further interrupts to wake the CPU up, so the CPU sleeps indefinitely.

In this CL, we ensure the CPU sleeps only if there's no pending
interrupt at all, regardless whether the interrupt is masked or not. We
intentionally check for masked interrupt as well because a masked
interrupt is also able to wake the CPU up if it occurs after WFI. This
will make the behavior consistent no matter the interrupt comes before
or after WFI.

Change-Id: I74dbc01fed52652101675f1ae8e481b77c932088
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62251
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-08-11 02:36:11 +00:00
Gabe Black
3b7ac7aa54 stdlib: Fix get_supported_isas.
This was equating the presence of the USE_*_ISA variables with the
support of that ISA, without actually checking that variable's value.

Change-Id: I4a19a694fa808de4d962ae2f5b30d9981b036224
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62200
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-11 02:21:46 +00:00
Wei-Han Chen
e046342f4f configs: fix fastmodel configs to run with kernel 5.x
The original config can't run under kernel 5.x. Since atomic operation
on fastmodel doesn't work well, I decide to disable related configs
(BROADCASTATOMIC and BROADCASTOUTER) to unblock the boot process.

Change-Id: Ibe622e22ee918446ae4f5a4b7fc8bcacd280ba6f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62211
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-10 06:40:45 +00:00
Wei-Han Chen
b3781ce93d configs: Add ITS in fastmodel cluster
There's a gic-its domain in gem5_vexpress_v2 device tree, thus adding ITS
domain in fastmodel cluster config.

Change-Id: Ieb0221fec2e85710531cef1723c492a07f47290a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62212
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Yu-hsin Wang <yuhsingw@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-10 06:40:35 +00:00
Gabe Black
13d298e7c4 arch-arm: Implement RegClass based register flattening.
Change-Id: Iba5c74d5b6dccd7de3ff59fea18a0c27c74c56a3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51229
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2022-08-09 09:18:36 +00:00
Gabe Black
04ef1c7cd1 arch-x86: Implement RegClass flattening.
This implements flattening in the x86 integer and floating point
RegClass-es, as well as adding regName functions for each. These came
from the X86StaticInst::printReg function, and the flattening functions
in the X86ISA::ISA class.

Change-Id: If026e3b44aa64441222451d91e99778f6054d9f0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51228
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2022-08-09 09:18:12 +00:00
Gabe Black
3c2ce6f381 cpu: Use flattened register IDs in stored results in the checker CPU.
This makes the IDs comparable to ones recorded by the O3 CPU which works
in renamed (and hence flattened) IDs.

Change-Id: If5b028798b1065d8dbaf3a10ec2e22bb8c260ddd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/53663
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-09 09:18:03 +00:00
Gabe Black
e59f01a55e cpu: Make RegClass able to flatten RegIds.
This makes RegIds and the RegClass-es associated with them responsible
for their own flattening. If they don't need to be flattened (a common
case) then they just mark themselves as already flat and that step can
be skipped.

This will also make it possible to get rid of the (get|set)RegFlat APIs,
since if you want to use flattened registers, you'll either have or
create a flattened RegId and pass it into the same (get|set)Reg method.

By making flattening work on RegIds instead of RegIndexes, this will
also make it possible for registers to start out in one RegClass and
move into another one. This would be useful if, for instance, there were
multiple groups of integer registers which had different indexing
semantics, but which should all end up in the same pool for renaming.

For instance, on x86, there are three distinct classes of FP registers.
They are the MMX registers, the pairs of registers which back the XMM
registers, and the X87 registers. Only the last of these needs
flattening. These could all be treated as different RegClass-es
pre-flattening, and could converge on the underlying floating point
register file post-flattening.

Another example in x86 is that some registers can encode that they
should refer to either the first byte of one register, or the second
byte of another register. This only applies to some registers though,
and so only those would need to go through the flattening step.

Another major advantage is that this removes the need for flattening
functions on the ISA object. Having those, and treating the ISA object
as a TheISA::ISA instead of the more generic BaseISA, was done to make
the flattening functions inline, and to make them fold away in cases
where flattening is not necessary. This new scheme isn't *quite* as
streamline as that, since you'll actually need to check if something is
already flattened. You won't, however, need to check what type the
register is and then look up the right flattening function, so that will
likely compensate.

Change-Id: I3c648cc8c0776b0e1020504113445b7d033e665f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51227
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-08-09 09:17:53 +00:00
Bobby R. Bruce
22dd2065f9 misc: Update CONTRIBUTING.md to mention pre-commit
Change-Id: I4559274190ce38202ea47b0870f5bd51fcf418ef
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62055
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-08-05 04:58:23 +00:00
Bobby R. Bruce
dbee7bea9f misc: Add Black style update to .git-blame-ignore-revs
This commit adds a commit which applied Python Black to all Python
files, to .git-blame-ignore-revs.

.git-blame-ignore-revs contains commits that should be ignored from git
blame. It can be setup using:

```
git config --global blame.ignoreRevsFile .git-blame-ignore-revs
```

Change-Id: I02c309a40ea7d3b9ef3e6ecb05d98e1e333585a9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62052
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-08-05 04:58:23 +00:00
Bobby R. Bruce
c3d6b60927 util: Remove Python file from style hook checks
Since incorporation of Python black to check python files as a
pre-commit (added here:
https://gem5-review.googlesource.com/c/public/gem5/+/61111), we no
longer need to style-check Python via the style hook checks.

Change-Id: Iaf9e454a6274b26e202a4aaac0c891309fbc948f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62051
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-08-05 04:58:23 +00:00
Hoa Nguyen
6ca1138a31 scons: Fix scons ParseConfig error for SCons versions 4.4+
SCons 4.4 changed the ParseConfig user's function signature [1].
The function is now required to take `unique` as a parameter.

[1] d0106a9967

Change-Id: I3fa9fbf77ff3877187e15c63f5414889a53caefa
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62091
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2022-08-05 04:33:39 +00:00
Gabe Black
244f80dde1 arch: Eliminate the vecregs.hh switching header file.
Delete the headers that are in each arch, and remove it from the list of
switching header files in arch/SConscript.

Change-Id: Ic0089f83e83f76ad6308ecfb5007b5ef11e1d949
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50256
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-04 20:22:59 +00:00
Gabe Black
262463a867 misc: Stop including arch/vecregs.hh and fix transitive includes.
Change-Id: I7854e77517f52b7c19cdb91c67016315391fd87f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50255
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-04 20:22:44 +00:00
Gabe Black
3d7d426fa5 cpu: Generalize how register files are serialized.
Instead of explicitly serializing each type of register explicitly, and
using custom types, etc, store them as generic blocks of data. This lets
us get rid of the final use of TheISA::VecRegContainer and
TheISA::VecPredRegContainer.

Change-Id: I61dbd7825ffe35c41e1b7c8317590d06c21b4513
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50252
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
2022-08-04 20:22:32 +00:00
32a206a2d0 systemc: fix hierarchical binding
Fix hierarchical bindings for multi_passthrough_target_socket. This bug
also was also present in the Accellera implementation in version 2.3.2
but was fixed in 2.3.3. This fix is analogous to the patch applied to
the Accellera implementation.

It allows to complete the binding also for hierarchical bindings.

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

Change-Id: I95497ad4b432b23412f2c0c8a3ef216af3372338
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62031
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matthias Jung <jungma@eit.uni-kl.de>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-04 12:17:22 +00:00
Andreas Sandberg
d49c8f78fe tests: Use pre-commit to run some tests in Jenkins
The pre-commit tool is able to run style tests in a reproducible
manner. Run pre-commit from Jenkins.

Change-Id: Ia142a6f3b610410b5767515483b90bc3a09f2407
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61113
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
2022-08-03 15:48:29 +00:00
Bobby R. Bruce
787204c92d python: Apply Black formatter to Python files
The command executed was `black src configs tests util`.

Change-Id: I8dfaa6ab04658fea37618127d6ac19270028d771
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47024
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-03 09:10:41 +00:00
Giacomo Travaglini
1cfaa8da83 arch-arm: Remove unimplemented miscreg handling in MSR imm
The checkFaultAccessAArch64SysReg function is now in charge
of returning the Undefined Instruction fault for unimplemented
registers

Change-Id: I75c00c6fbce33d1729a4923eae585260a8461db3
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61971
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-08-02 20:45:51 +00:00