Commit Graph

19251 Commits

Author SHA1 Message Date
Giacomo Travaglini
5afff98ee9 arch-arm: Add new trapping bitfields to the HCR register
Change-Id: Ie798594831790ae4ff551f68602b7505f0d4b237
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61681
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-29 06:51:11 +00:00
Giacomo Travaglini
01a0685d75 arch-arm: Use new faulting logic to handle SP_EL0
Change-Id: I518964b3e4d1abe153d2d175c765a6b46157cc3b
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61680
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-07-29 06:51:11 +00:00
Giacomo Travaglini
936f1e8603 arch-arm: Merge checkFaultRead/Write into single checkFaultAccess
Change-Id: I6b4b8a2ced53c3957a9f1d9b3ea51851a9ec7343
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61679
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-29 06:51:11 +00:00
Bobby R. Bruce
1666e6620a ext: Fix SST Documentation links
This documentation links to v21-2 resources. This is incorrect, they
should point towards v22-0 resources. This patch fixes this.

Change-Id: I0e4868327e0b216619e524c2329f57bbe40d3eae
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61691
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-28 20:20:36 +00:00
Srikant Bharadwaj
942b71bf3a gpu-compute: Move GPU caches to GPU clock domain
GPU caches TCP/TCC need to be in the GPU clock domain instead
of ruby clock domain. This patch moves them to GPU clock domain
by creating a clock domain for each cache separately.

Change-Id: Iab6382233b75862e21b028186691a35d92d9a0f9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61589
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-28 14:41:35 +00:00
Matthew Poremba
68115460d8 gpu-compute: Set LDS and Scratch apertures in FS
The LDS and scratch aperture base and limits are hardcoded to some
values that are useful for SE mode. In reality, these are chosen by the
driver so we need to honor whatever values the driver passes so that
when addresses are calculated they fall into the correct aperture to
route flat instructions to those apertures.

This overwrites the default hardcoded values for LDS and scratch base
and limit using the values providing by the driver in a MAP_PROCESS
packet.

Change-Id: I0e194a26631f697819d8aaecf1bf346a7b7c7026
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61656
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
2022-07-28 14:10:33 +00:00
Matthew Poremba
f65f5a8981 gpu-compute,arch-vega: Overhaul HWRegs, setreg, getreg
These instructions are supposed to be read/writing special shader
hardware registers. Currently they are getting/setting to an SGPR. This
results in getting incorrect registers at best and clobbering an SGPR
being used by an application at worst. Furthermore, some registers need
to be set in the shader and the application will never (can never) set
them.

This patch overhauls the getreg/setreg instructions to use different
storage in the shader. The values will be updated either via setreg from
an application (e.g., mode register) or set by a PM4 MAP_PROCESS.

Change-Id: Ie5e5d552bd04dc47f5b35b5ee40a569ae345abac
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61655
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2022-07-28 14:10:33 +00:00
Matthew Poremba
5c7514c81c arch-vega: Fix S_GETREG_B32 masking/shifting
Here the mask should not be inverted. We also need to shift by the
offset to remove the padding as the consumer of the value expects the
offset to be removed.

This can be easily tested by running a GPU kernel with __shared__
variables. This will generate the following assembly:

s_getreg_b32 s6, hwreg(HW_REG_SH_MEM_BASES, 16, 16)

The current implementation returns the lower 16 bits (private memory
aperture) while the correct behavior is the uppter 16 bits (shared/LDS
memory aperture).

Change-Id: Iea8f0adceeadb24cdcf46ef4183fcaa8262ab9e7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61654
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2022-07-28 14:10:33 +00:00
Matthew Poremba
f2949f3d03 dev-amdgpu: Set PASID in interrupt cookie
The driver uses the pasid to look up events that need to be set in
kfd_signal_event_interrupt (amdkfd/kfd_events.c). Currently this is
uninitialized which causes the function in the driver to return without
doing anything useful.

This changeset initializes the cookie PASID to 0x8000. 0x8000 is always
the first PASID assigned by the driver. This works since gem5 only
supports one GPU process in FS mode. This would have to be changed for
multi-process support, so a comment is added as a reminder.

Change-Id: I7074b581f2f2f346bd910eef15d5f9253ce17e2c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61653
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-28 14:10:33 +00:00
Matthew Poremba
923d6c4081 configs: Always use busy wait for GPUFS
The environment variable HSA_ENABLE_INTERRUPT controls if Interrupt or
busy wait signals are used in the ROCm runtime. Interrupts are not being
sent in gem5 causing simulations to hang indefinitely in certain
situations. To fix this, always disable interrupts to fall back to busy
wait signals. Using interrupts is an old and simple optimization to not
waste CPU cycles, but from the perspective of simulation this is not
important. Disabling interrupt-based HSA signals therefore increases the
number of applications working within gem5.

Change-Id: I1ae21d7ee01548a4d00a8972642079b90278f9a2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61652
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2022-07-28 14:10:33 +00:00
Matthew Poremba
ee75e19b8b gpu-compute: Fix dynamic scratch allocation on GPUFS
When GPU needs more scratch it requests from the runtime. In the
method to wait for response, a dmaReadVirt is called with the same
method as the callback with zero delay. This means that effectively
there is an infinite loop in the event queue if the scratch setup is not
successful on the first attempt. In the case of GPUFS, it is never
successfully instantly so a delay must be added. Without added delay,
the host CPU is never scheduled to make progress setting up more scratch
space.

The value 1e9 is choosen to match the KVM quantum and hopefully give KVM
a chance to schedule an event. For reference, the driver timeout is
200ms so this is still fairly aggressive checking of the signal response.
This value is also balanced around the GPUCommandProc DPRINTF to
prevent the print in this method from overwhelming debug output.

Change-Id: I0e0e1d75cd66f7c47815b13a4bfc3c0188e16220
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61651
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2022-07-28 14:10:33 +00:00
Matthew Poremba
23fadb7260 dev-hsa: Don't set _aqlComplete in setRdIdx method
This code is unnecessary as the read index is already correct.
Furthermore, it can cause hangs in some situations where the packet
SHOULD be marked as not complete. This causes a bug where the read index
is incremented by 1 multiple times, causing the packet processor to read
an invalid packet, followed by a hang after it does nothing.

Change-Id: Iceda3c9606e018f60f8902770a2d9762c1c14304
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61650
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
2022-07-28 14:10:33 +00:00
Matthew Poremba
618d16d6fc arch-vega: Fix V_READFIRSTLANE_B32
This instruction appears to be the only VOP1 instruction that has a
scalar destination using VDST as the destination register number.
However, since VDST is only 8 bits it cannot encode all possible
registers. Therefore, use the opcode to determine if the destination is
a scalar or vector destination.

This issue manifests as a VGPR dest being out of range for a kernel
where the number of SGPRs is more than the number of VGPRs and the
intended SGPR dest is larger than the count of VGPRs

Change-Id: I95a7de1ddb97f7171f48331fed36aef776fa0cb4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61649
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-28 14:10:33 +00:00
Giacomo Travaglini
1c423ad7e6 arch-arm: Remove MISCREG_INFO E2H flag
These VHE flags are not needed anymore.

They were used to trap EL2 access to VHE only registers (like CPACR_EL12)
when VHE was disabled (hcr.e2h = 0)

With the new faulting logic, we can just introduce VHE specific
callbacks checking for the hcr.e2h bitfield and returning an undefined
instruction if VHE is disabled.

In this way we don't have to add VHE only bits to every system register

Change-Id: I07bf9a9adc7a089bd45e718fb06d88488a2b7ed5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61678
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-28 13:24:02 +00:00
Giacomo Travaglini
9bd4520b13 arch-arm: Use new fault callbacks in canRead/WriteAArch64SysReg
This should be equivalent of checking the lookUpMiscReg[reg].info
bitset. The functions have been renamed to
checkFaultRead/WriteAArch64SysReg as they now return a fault and
not a boolean

Change-Id: I2d7465c368428a7d55eb48b32396315e23bcf0f9
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61677
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-28 13:24:02 +00:00
Giacomo Travaglini
79cbb0a668 arch-arm: Streamline RVBAR_EL1/EL2 access permissions
We don't need to handle RVBAR_EL1 and RVBAR_EL2 separately
every time we read or write a system register.
Instead we can just setup access permissions once at bringup,
based on the highest implemented Exception Level

Change-Id: I19a2cbd783829051766ea45d76a964acc29fe73a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61676
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-07-28 13:24:02 +00:00
Giacomo Travaglini
5f67c7e54d arch-arm: Add FaultCB callbacks to the MiscRegLUTEntry class
This patch is adding per-EL read/write callbacks to the MiscRegLUTEntry
class.  The goal is to merge access permission and trapping logic into
these unified callbacks

As of now the default callbacks are simply reimplementing the access
permission code, checking for MiscRegLUTEntry flags. This is the default
behaviour for all registers.
Trapping code (from MiscRegOp64::trap) will be moved with a later patch

Change-Id: Ib4bb1b5d95319548de5e77e00258fd65c11d88d7
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61675
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-07-28 13:24:02 +00:00
Giacomo Travaglini
167cf86375 arch-arm: Move access permission bitset within MiscRegLUTEntry
Rather than having two separate MiscReg metadata vectors, we are
storing the access permission bitset within the MiscRegLUTEntry

Change-Id: I2f5d175617c888f0eb6954d29a4c607e0cbc3611
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61674
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-28 13:24:02 +00:00
Giacomo Travaglini
f118b5755a arch-arm: Move lookUpMiscReg vector out of the ISA class
Our plan is to consolidate the lookUpMiscReg vector with the
miscRegInfo one into a single metadata vector

Change-Id: I07b5a63a8da6d9b48593a904f6912b84a2afdd2c
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61673
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
2022-07-28 13:24:02 +00:00
Giacomo Travaglini
e4ab0bb5cf arch-arm: Add a getter for miscRead member variable
In this way our ISA code can check if a MiscRegOp64 is a MSR or a MRS
and act accordingly

Change-Id: I9ddb9df432b28ce7d20235fc51f3637c41f3256a
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61672
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
2022-07-28 13:24:02 +00:00
Giacomo Travaglini
07b6f4261c arch-arm: Add undefined helper to ArmStaticInst
In this way we can generate an Undefined Instruction fault
from the instruction object without requiring to access its
menmonic or opcode

This is generalizing the existing disabledFault helper

Change-Id: Ib7dec9399f142c35d75057f37ab53cce102fa01e
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61671
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
2022-07-28 13:24:02 +00:00
Giacomo Travaglini
25bdb73b9f arch-arm: Generate MSR/MRS iss within trapping logic
The iss field is only used when the MSR/MRS instruction
gets trapped. Rather than generating it at decode time,
we generate the value within the trap method instead

This avoids the confusion of having a MSR/MRS register
instruction storing an immediate field

Later patches will change this even further by generating the
iss field on the fly ONLY if the instruction gets trapped

Change-Id: I97fdcf54d9643ea79a1f9d052073320ee68109fd
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61670
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
2022-07-28 13:24:02 +00:00
Giacomo Travaglini
6217ac737b arch-arm: Overload decodeAArch64SysReg to accept a MiscRegNum64
Overload decodeAArch64SysReg to directly accept a MiscRegNum64

Change-Id: I43c1dae6c0e382c03612f4ce4fc89aadddf30fd5
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61669
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Richard Cooper <richard.cooper@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-28 13:24:02 +00:00
Gabe Black
ba5a017d9a cpu-o3: Remove TheISA:: types from forwardOldRegs.
Use information from the registers' RegClass-es and the generic getReg
and setReg API to forward the registers value without having to refer to
the register class constant/index, or the type of complex registers.

Change-Id: I0426a606185edc0aabbf4b77c825b618b4640590
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50248
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-07-27 21:55:47 +00:00
Gabe Black
87acb97762 cpu-minor: Use the << operator in minorTraceInst.
Use that to print the RegIds of an inst directly, without having to pass
around the register class vector.

Change-Id: I6e5b06518f4826a1e4e8589c5ed095609d3d02b0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49809
Reviewed-by: ZHENGRONG WANG <seanyukigeek@gmail.com>
Maintainer: ZHENGRONG WANG <seanyukigeek@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-27 20:28:48 +00:00
Gabe Black
a46b7c99c8 cpu: Revamp the RegId << operator.
Now that we have a pointer to the actual RegClass the RegId is
associated with, we can use it's regName method to pretty print the
RegId for us. This gets rid of the redundant print method for RegId.

Also, replace the default register printing method with the
implementation in the << operator, which is more descriptive.

Change-Id: I00e93032ddea77e167ca13e54b370de7210f1a2b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49808
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-27 20:28:37 +00:00
Zhantong Qiu
01c4786b73 tests: adding the missing vega_x86_tag for the test_hello_se.py
The test_hello_se.py was unable to run due to missing the key for the
vega_x86_tag in isa_str_map.

Change-Id: I2c483c1c84f3968a64555edfec0e4b77dfbbd126
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61630
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-27 16:01:39 +00:00
Gabe Black
654451c2be arch,cpu: Keep a RegClass pointer in RegId instead of a RegClassType.
This makes it easy to get access to the RegClass that goes with a
register without having to look it up in a separate structure.

Change-Id: I4cfff2069d63f3c1c3fb0fea5dee3baf357bd478
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49786
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-27 13:54:32 +00:00
Gabe Black
45cf2e3c34 arch: Minimize use of RegClassType constants and the RegId constructor.
These are global values which prevent making register types ISA
specific.

Change-Id: I513adcae5ad316122c24f25a9e01b9974629510f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49785
Maintainer: Gabe Black <gabe.black@gmail.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-27 10:59:07 +00:00
Bobby R. Bruce
72ce619a41 tests: Add exception print to downloader_check test
This exception will help diagnose download errors when they occur by
printing the specific Exception thrown by the resource downloader.

Change-Id: Iab35f85fa305594076bf582228e89dae611ce8df
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61631
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-27 00:16:06 +00:00
Zhantong Qiu
0bcc2e5249 stdlib: Allow set_se_binary_workload to take input parameters
This commit added two paramaters in the set_se_binary_workload to pass
input parameters for the binary.
The "arguments" object allows users to pass in arugments in a list.
The "stdin_file" object allows users to pass in input file as a
Resource.
This commit also created a local variable "binary_path" to save the
return object of "binary.get_local_path()".

Note:
These new parameters were tested and passed in 4 cases:
1. only passing in (Resource/CustomResource) binary
2. passing in (CustomResource) binary and input_file
3. passing in (CustomResource) binary and argument(no input file
 directory included)
4. passing in (CustomResource) binary and argument(with input file
 directory included)

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

Change-Id: I6433a349f7ecb5d630c7cdbe7268ff18915bf23f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61609
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
2022-07-26 20:42:04 +00:00
Gabe Black
70289e72cd arch,cpu: Store pointers to RegClass-es instead of instances.
This lets us put the actual RegClass-es somewhere else and give them
names.

Change-Id: I51743d6956de632fa6498d3b5ef0a20939849464
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49784
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Boris Shingarov <shingarov@labware.com>
2022-07-26 19:37:59 +00:00
Gabe Black
705351768c cpu: Add a [] operator to the RegClass type.
This will create a RegId with the given index.

Change-Id: I2c3e6859fce80ede5cdb70f85d881b514b6babb2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49782
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-26 19:37:33 +00:00
Gabe Black
261fd6122e cpu: Use range based for loops to iterate over RegClass-s.
Change-Id: Ie42ad814a5a90cb635fb4f92d46c8a8c6abeb6a6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49781
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2022-07-26 19:37:15 +00:00
Gabe Black
c3a5dad1e8 cpu: Add an iterator type to RegClass.
This will enable it to be used in range based for loops, to iterate over
all the RegIds which are part of a RegClass. This cleans up that sort of
loop a bit, and also makes it less necessary to construct a RegId
directly.

Change-Id: Ia3c2aa5cf4d842465bd0948d174f51a1b92e5e3f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/49780
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-26 19:37:04 +00:00
Eliot Moss
23b2561bf6 cpu: x86: add serialize and fence instructions to the isa
Clarify commented out lines.

Issue-On: https://gem5.atlassian.net/browse/GEM5-1231

Change-Id: I15d685ca233b56e0aece312bc85a9bff0d56e4dd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/60929
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-07-23 13:25:49 +00:00
Yu-hsin Wang
f6082ba24b scons: Update GRPC dependency flag
In newer version, grpc will depend on abseil cpp library. We need to get
the correct libs flags from pkg-config.

Change-Id: Id0e3225f69428941945d99cbef8a5749a8d45d8f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61510
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Gabe Black <gabe.black@gmail.com>
2022-07-22 01:10:33 +00:00
Joël Porquet-Lupine
011ffb300b python: remove "earlycon" linux option from LupV board
This option doesn't work and triggers a warning by Linux when booting.

To make it work, we need a chosen node containing an `stdout-path`
property in the FDT which currently doesn't exist.

I tried to create via a couple of approaches it but encountered multiple
issues:

1. One can set `stdout-path` to the complete path of the tty device, but
   such path is impossible to get programmatically (unless it's
   hardcoded).
2. One can set `stdout-path` as a reference to a label. While labels are
   possible to generate easily, reference to labels cannot be generated
   with the current FDT library.

So just remove this option for the time being.

Change-Id: I58ad879c0fdf567a812069ae91ebc7d4f8accf13
Signed-off-by: Joël Porquet-Lupine <joel@porquet.org>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61534
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-07-21 23:54:23 +00:00
Joël Porquet-Lupine
e391805d41 python: improve FDT generation in LupV board
Change-Id: Ia28513a844090d12024ae2328f924a9ce6088059
Signed-off-by: Joël Porquet-Lupine <joel@porquet.org>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61533
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-21 23:54:23 +00:00
Joël Porquet-Lupine
d1d7690123 python: update IRQ mapping in LupV board
Match IRQ map of QEMU LupV platform.

Change-Id: I2a17250343032bdebdf92b9a47a3b5f7a9b6b917
Signed-off-by: Joël Porquet-Lupine <joel@porquet.org>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61532
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-07-21 23:48:20 +00:00
Joël Porquet-Lupine
da3feeef09 python: swap memory addresses of lupio-rng and lupio-sys
Match the same memory map as in QEMU LupV platform.

Change-Id: I0319e6de26c308eb1b2f402fafe5337dba44733d
Signed-off-by: Joël Porquet-Lupine <joel@porquet.org>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61531
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-07-21 23:48:13 +00:00
Joël Porquet-Lupine
1c6f57cd6d dev: update LupIO-IPI device to latest specs
The specs for the LupIO-IPI device were recently updated. Instead of
providing a single IPI value for each processor, the device now provides
32 individual IPI bits that can be masked and set.

Update device accordingly in gem5.

Change-Id: Ia47cd1c70e073686bc2009d546c80edb0ad58711
Signed-off-by: Joël Porquet-Lupine <joel@porquet.org>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61530
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-07-21 23:48:04 +00:00
Joël Porquet-Lupine
0800c060d8 dev: Fix cpu/reg decoding logic in multi-instance LupIO devices
The current decoding logic is flawed and complicated to understand.
Using simple division and modulo instead; the compiler is smart enough
to generate efficient code since the divisor is a power of 2.

Change-Id: I95cbb4969e37132343f557e772984a48749731f0
Signed-off-by: Joël Porquet-Lupine <joel@porquet.org>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61529
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-07-21 23:47:30 +00:00
Matt Sinclair
62efcae89e mem-ruby, gpu-compute: Add mandatory_queue_latency input option
The mandatory_queue_latency determines one part of how many
cycles a L1 hit takes in the GPU VIPER protocol.  Thus, this
commit adds it as an input option so that users can set it
accordingly to model GPU L1 hit latency as appropriate.

Change-Id: Ic544716d3397546a5636fa94278b1d7e68addebc
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61310
Reviewed-by: Alexandru Duțu <alexandru.dutu@amd.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-21 21:55:15 +00:00
Ayaz Akram
ba2deb39e3 mem: Update the default HBMCtrl config
This change updates the default HBMCtrl configuration
to not use partitioned queues, as the unified queue
shows better performance than the partitioned and has
been better tested so far.

Change-Id: I44dd407d8d2af52b8dad5861aeb0ae83e3934d16
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61470
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-21 19:44:14 +00:00
Ayaz Akram
4d8814f637 mem: Add getAddrRanges in HBMCtrl
This change adds a missed function in HBMCtrl to make
sure that XBar connected to the controller can see
the address ranges covered by both HBM pseudo channels

Change-Id: If88edda42b45a66a6517685e091545a5bba6eab9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61469
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-07-21 19:43:57 +00:00
Jui-Min Lee
f5e03741c7 arch-riscv: Make WFI halt the hart
First, this CL modifies the implementation of WFI so it actually put the
calling CPU into sleep.

This CL also adds an id in the IRQ table to represent NMI. This is
because the wakeup path is only implemented on cpu's postInterrupt
function, and it expects an int_num.

We still keep the MISCREG for nmie and nmip instead of merging them into
other ip/ie as that will give the user ability to get/set the nmi
status, which is pretty dangerous.

Change-Id: Idf8a5748990efa20aa9372efa97d3bed2aac82d9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61511
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-07-21 06:40:59 +00:00
Alexandru Dutu
1115f81233 gpu-compute: Fix for HSA queue remapping
When a queue is being remapped the write and dispatch
pointers are set to the read pointer. This assumes that
all packets up to the read pointer have been dispatched
and completed.

Change-Id: I4ed0c6c68f16f57c3fb5c3ecba182a43e74078e2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61429
Reviewed-by: Matt Sinclair <mattdsinclair.wisc@gmail.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
Maintainer: Matthew Poremba <matthew.poremba@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-07-20 16:26:14 +00:00
Matthew Poremba
af9ecf7920 arch-vega,arch-gcn3: Add support for VCC_HI as scalar source
Currently there is only support for VCC_LO as a scalar source. Add
support for VCC_HI as well. The op selector symbol is also changed to be
vcc_hi/vcc_lo as it is in disassembly from LLVM.

Change-Id: I19ea8e23873049c33ffe2eb4ec8504a18f371c0e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61329
Reviewed-by: Matt Sinclair <mattdsinclair.wisc@gmail.com>
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-07-18 17:27:50 +00:00
Matt Sinclair
0fdfdbb130 mem-ruby, gpu-compute: update TCP_latency comment
Update the TCP_latency input arg to reflect what it does -- in
combination with the number of banks, it determines the number of
accesses that can happen in the L1 (TCP) in a given cycle.  It does
not directly affect the L1 latency as the name implies.  Instead,
the mandatory_queue_latency does this.

Change-Id: Ib6cbc8367ce2b1f30005d137384f53650a403b49
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61309
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matthew Poremba <matthew.poremba@amd.com>
2022-07-16 04:49:55 +00:00