summaryrefslogtreecommitdiff
path: root/src/arch
AgeCommit message (Collapse)Author
2019-01-22sim-se: add ability to get/set sock metadataBrandon Potter
Add getsockopt, getsockname, setsockname, and getpeername system calls. Change-Id: Ifa1d9a95f15b4fb12859dbfd3c4bd248de2e3d32 Reviewed-on: https://gem5-review.googlesource.com/c/12116 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
2019-01-22sim-se: add syscalls related to pollingBrandon Potter
Fix poll so that it will use the syscall retry capability instead of causing a blocking call. Add the accept and wait4 system calls. Add polling to read to remove deadlocks that occur in the event queue that are caused by blocking system calls. Modify the write system call to return an error number in case of error. Change-Id: I0b4091a2e41e4187ebf69d63e0088f988f37d5da Reviewed-on: https://gem5-review.googlesource.com/c/12115 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
2019-01-22sim-se: add calls for network transmissionsBrandon Potter
Add recvfrom, sendto, recvmsg, and sendmsg system calls. Change-Id: I2eb50ea7823c8af57d99b3b8d443d2099418c06c Reviewed-on: https://gem5-review.googlesource.com/c/12114 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
2019-01-22sim-se: add socket-based functionalityBrandon Potter
Add socket, socketpair, bind, list, connect and shutdown system calls. Change-Id: I635af3fca410f96fe28f8fe497e3d457a9dbc470 Reviewed-on: https://gem5-review.googlesource.com/c/12113 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
2019-01-16cpu: dev: sim: gpu-compute: Banish some ISA specific register types.Gabe Black
These types are IntReg, FloatReg, FloatRegBits, and MiscReg. There are some remaining types, specifically the vector registers and the CCReg. I'm less familiar with these new types of registers, and so will look at getting rid of them at some later time. Change-Id: Ide8f76b15c531286f61427330053b44074b8ac9b Reviewed-on: https://gem5-review.googlesource.com/c/13624 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
2019-01-16arch: Make the ISA register types aliases for the global types.Gabe Black
The ISA specific types can thus be phased out. Change-Id: I8ea531a099fad140a4ec9c91cd972fe044111d60 Reviewed-on: https://gem5-review.googlesource.com/c/13623 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2019-01-16arm: Make the fp register types 64 bits.Gabe Black
This matches the other ISAs. Change-Id: I84de91efde2529f4aecc7b26b84266d97459738c Reviewed-on: https://gem5-review.googlesource.com/c/13622 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2019-01-16arch-arm: Read VMPIDR instead of MPIDR when EL2 is EnabledGiacomo Travaglini
Trying to read MPIDR(_EL1) from EL1, should return the value of VMPIDR_EL2 if EL2 is enabled. This patch is modifying the utility function for reading MPIDR in order to match this behaviour for both AArch32 and AArch64. Change-Id: I32c2d4d5052f509e6e0542a5314844164221c6a3 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15617 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2019-01-16arch-arm: Added TLBI_ALL EL2 instructionAnouk Van Laer
This patch is adding TLBI_ALLE2(IS) operations to the arm ISA. Change-Id: I8e35cff9a2cc414f4c5fbbc5aa0cfe5023a3f011 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15616 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2019-01-16arch-riscv: Add interrupt handlingAlec Roelke
Implement the Interrupts SimObject for RISC-V. This basically just handles setting and getting the values of the interrupt-pending and interrupt-enable CSRs according to the privileged ISA reference chapter 3.1.14. Note that it does NOT implement the PLIC as defined in chapter 7, as that is used for handling external interrupts which are defined based on peripherals that are available. Change-Id: Ia1321430f870ff5a3950217266fde0511332485b Reviewed-on: https://gem5-review.googlesource.com/c/14377 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2019-01-16arch-riscv: Fix reset function and styleAlec Roelke
In addition to fixing some style issues with resetting, this patch fixes what happens on reset. The RISC-V privileged ISA reference manual says that, on reset: 1. Privilege mode is set to M 2. mstatus.mie <- 0; mstatus.mprv <- 0 3. PC <- reset vector 4. mcause <- reset cause (0 if there is no distinguishing causes) 5. Everything else is undefined Because of 5, everything else will be left alone Change-Id: I81bdf7a88b08874e3c3d5fc6c7f3ca2d796496b8 Reviewed-on: https://gem5-review.googlesource.com/c/14376 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2019-01-15arch-arm: Fix usage of RegId constructor for VecElemGiacomo Travaglini
RegId() constructor requires three arguments in case of a VecElem register: the class, the vector index and the element index inside the vector, otherwise it panics. Change-Id: Ic842df4dcddaffa83b211aa6e1dd1953cafa4951 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15615 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2019-01-14arm: Stop using the FloatReg and FloatRegBits types.Gabe Black
This will let us make those types 64 bits to be in line with the other architectures. Change-Id: I5aef5199f4d2d5bb1558afedac5c6c92bf95c021 Reviewed-on: https://gem5-review.googlesource.com/c/13621 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2019-01-10sim-se, arch-arm: Add support for getdents64Javier Setoain
Change-Id: Ib27950144d4c9802ffb842db98aec9e433ccbfc5 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Cc: Giacomo Travaglini <giacomo.travaglini@arm.com> Cc: Javier Setoain <javier.setoain@arm.com> Cc: Brandon Potter <Brandon.Potter@amd.com> Reviewed-on: https://gem5-review.googlesource.com/c/15438 Maintainer: Brandon Potter <Brandon.Potter@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2019-01-10arch-arm, sim-se: Add support for TLS in cloneAndreas Sandberg
Change-Id: I1f78dce05a48a2e3adfaf027cd38ab55507b9611 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Cc: Giacomo Travaglini <giacomo.travaglini@arm.com> Cc: Javier Setoain <javier.setoain@arm.com> Cc: Brandon Potter <Brandon.Potter@amd.com> Reviewed-on: https://gem5-review.googlesource.com/c/15437 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
2019-01-10arch-arm, sim-se: Fix incorrect SP handling in cloneAndreas Sandberg
The clone syscall is currently broken on aarch64 since the aarch64 code uses an incorrect SP register. Fix this by storing the new stack pointer in SP_EL0 instead of R13. Change-Id: Ie17990b4f359608e3b53e5bf625eca53769a6653 Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Cc: Giacomo Travaglini <giacomo.travaglini@arm.com> Cc: Javier Setoain <javier.setoain@arm.com> Cc: Brandon Potter <Brandon.Potter@amd.com> Reviewed-on: https://gem5-review.googlesource.com/c/15436 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
2019-01-10sim-se: Refactor clone to avoid most ifdefsAndreas Sandberg
Some parts of clone are architecture dependent. In some cases, we are able to use architecture-specific helper functions or register aliases. However, there is still some architecture-specific that is protected by ifdefs in the common clone implementation. Move these architecture-specific bits to the architecture-specific OS class instead to avoid these ifdefs and make the code a bit more readable. Change-Id: Ia0903d738d0ba890863bddfa77e3b717db7f45de Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Cc: Giacomo Travaglini <giacomo.travaglini@arm.com> Cc: Javier Setoain <javier.setoain@arm.com> Cc: Brandon Potter <Brandon.Potter@amd.com> Reviewed-on: https://gem5-review.googlesource.com/c/15435 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
2019-01-10arch-arm, sim-se: Wire up syscalls needed for pthreadsJavier Setoain
Change-Id: I8da5e3e0d7dc5d31ac82ed2045109d6d73cbf99d Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Cc: Giacomo Travaglini <giacomo.travaglini@arm.com> Cc: Javier Setoain <javier.setoain@arm.com> Cc: Brandon Potter <Brandon.Potter@amd.com> Reviewed-on: https://gem5-review.googlesource.com/c/15415 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
2019-01-10dev-arm: Add a GICv3 modelJairo Balart
Change-Id: Ib0067fc743f84ff7be9f12d2fc33ddf63736bdd1 Reviewed-on: https://gem5-review.googlesource.com/c/13436 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2019-01-09arch-arm: Additional bits in misc ARM registers to use with the TLB and page ↵Ivan Pizarro
walker Change-Id: I71a6360709b35ad788d8c88fba1a7a2761233dbd Reviewed-on: https://gem5-review.googlesource.com/c/14555 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2019-01-03arm: properly handle RES0/1 for SCTLRsCurtis Dunham
They were being treated as RAZ/RAO, which is incorrect. Put the access masks in the register metadatabase now that we have one. Also fix this for HVBAR. Change-Id: I097c847e35be2d59fb8235fc621bb061ef514cfb Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/10401 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-12-20arch, cpu: Remove float type accessors.Gabe Black
Use the binary accessors instead. Change-Id: Iff1877e92c79df02b3d13635391a8c2f025776a2 Reviewed-on: https://gem5-review.googlesource.com/c/14457 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-12-19arch-arm: Add Crypto in SE modeGiacomo Travaglini
This patch is also enabling AArch32 crypto instructions by setting the ID_ISAR5 register accordingly. Change-Id: Id412585b39b78570a65bd3047199c84e9db76cda Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15155 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-12-18arch: Make the ISA parser always use binary floating point accessors.Gabe Black
Any operands which use read_code or write_code would need to start using the floatToBits and bitsToFloat, but only ARM is using that mechanism, and not on float operands. Also I notice that the "predicate" mechanism for operands ignores the read_code and write_code mechanism, and using both will not work correctly. This change makes no attempt to fix that problem, but shouldn't contribute to it either. Change-Id: I0e3a7f78ed28f40cb66958ef12c32e862950fde0 Reviewed-on: https://gem5-review.googlesource.com/c/14456 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-12-05arch-x86: Add sys/syscall.h to x86 process.cc/syscall_emul.ccTony Gutierrez
Change a66d12c guards the selection of getdents() in x86's process.cc file with SYS_getdents, however process.cc does not include the right header for SYS_getdents, which leads to x86 choosing the unimplemented call. This change adds sys/syscall.h to address the problem. This change also adds sys/syscall.hh to syscall_emu.cc, which only includes syscall.hh and may not be supported on all systems. Change-Id: If1adcf41e9e455de5f2827ba98c542fdcacdc22e Reviewed-on: https://gem5-review.googlesource.com/c/14775 Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
2018-12-03arch-arm: correctly set floats from GDB on aarch64Ciro Santilli
aarch64 floating point registers are now stored as vector type, but this was not updated in the stub. Change-Id: I4a2bc1cea0eec9beeb5bbd49e2a868b9d5ed0a42 Reviewed-on: https://gem5-review.googlesource.com/c/14498 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2018-12-03arch-arm: only change the pc address when GDB registers are setCiro Santilli
The entire pcState was being reset, which made the simulation incorrectly switch to aarch32 from aarch64. Change-Id: I9ba7dd0ed95bc6120d94393bba272e0cb8c081c5 Reviewed-on: https://gem5-review.googlesource.com/c/14496 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2018-12-03arch-arm: fix the aarch64 GDB stubCiro Santilli
The main change is to remove vector registers from the GDB stub. Those registers were intended for SVE, which is a new architecture feature and not yet treated by default on the GDB present in Ubuntu 18.04, and possibly not even on GDB master. As a result, aarch64 GDB stub connections would fail with: Remote 'g' packet reply is too long The correct way to support those registers is to send XML GDB target description files to the client. This feature is not yet available for any architecture, and should be implemented in future patches. Other smaller fixes are: * cpsr is uint32_t in aarch64 as well as arm * use M5_ATTR_PACKED on the register structs since they are being cast and sent as byte arrays Change-Id: I77cd8a98e322ecc60799e5b11fe5cd414d893cc7 Reviewed-on: https://gem5-review.googlesource.com/c/14495 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2018-11-28arch-arm: Add missing template declarationNikos Nikoleris
The lack of a template declaration for IllegalInstSetStateFault was causing errors when compiling with clang. Change-Id: If7f19d7e879330226c80df2baca73d88d818f673 Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/14618 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2018-11-28cpu,arch-arm: Initialise data membersRekai Gonzalez-Alberquilla
The value that is not initialized has a bogus value that manifests when using some debug-flags what makes the usage of tracediff a bit more challenging. In addition, while debugging with other techniques, it introduces the problem of understanding if the value of a field is 'intended' or just an effect of the lack of initialisation. Change-Id: Ied88caa77479c6f1d5166d80d1a1a057503cb106 Signed-off-by: Giacomo Gabrielli <giacomo.gabrielli@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13125 Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
2018-11-28arch-arm: clang compilation fixesMatteo Andreozzi
Fix 1: std::pair constructor is not a constexpr in clang implementation Fix 2: static const templates need to be defined in their translation unit Change-Id: I3d9b9b47e1d148e44555f40e2e2aeff06707ff8f Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/14617 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
2018-11-27hsail: Fix a warning/build failure for HSAIL_X86.Gabe Black
The Bitselect operation definition used ~ to invert the bits of a mask value, but if that mask value is of type bool, that generates a warning. This change casts that value to a uint64_t so that it can always have ~ applied to it. Change-Id: I7fbfc6ff264bc32a265f2724c772b8fae08590f7 Reviewed-on: https://gem5-review.googlesource.com/c/14655 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-11-27arch, base, cpu, gpu, mem: Replace assert(0 or false with panic.Gabe Black
Neither assert(0) nor assert(false) give any hint as to why control getting to them is bad, and their more descriptive versions, assert(0 && "description") and assert(false && "description"), jury rig assert to add an error message when the utility function panic() already does that directly with better formatting options. This change replaces that flavor of call to assert with panic, except in the actual code which processes the formatting that panic uses (to avoid infinitely recurring error handling), and in some *.sm files since I don't know what rules those have to follow and don't want to accidentaly break them. Change-Id: I8addfbfaf77eaed94ec8191f2ae4efb477cefdd0 Reviewed-on: https://gem5-review.googlesource.com/c/14636 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2018-11-27sim-se: only implement getdentsFunc on supported hostsCiro Santilli
The implementation of the getdents syscall relies on SYS_getdents, which is not available on all archs, because the getdents syscall has been superseded by getdents64, and does not exist on newer archs such as aarch64. This leads the build to break on aarch64 hosts with error: error: 'SYS_getdents' was not declared in this scope Change-Id: I8701fb5b61c0418b14a9463ef135a391a7f7a9ba Reviewed-on: https://gem5-review.googlesource.com/c/14596 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
2018-11-21x86: Get rid of a problematic DPRINTF in PremFp.Gabe Black
This DPRINTF shouldn't be necessary since it shows the operands and results of the instruction which the trace should already make available. Also by passing the destination register to DPRINTF, the ISA parser will assume that it's also a source when tracking dependencies. Change-Id: I820387c82578bdbb8d2e3d91652a6c0185077f54 Reviewed-on: https://gem5-review.googlesource.com/c/14475 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-11-14arch-arm: Print register name when warning on AT instructionsGiacomo Travaglini
With this patch we don't print anymore the enum value when warning on any AT instruction usage, but we print the sys reg name instead Change-Id: Ic6831b98ad6b0582be69883dc9519a9d3324da30 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/14316 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-11-07arch-arm: Deprecate usage of legacy bootloader patchingGiacomo Travaglini
This patch is implicitly deprecating the usage of bootloader patching, which is injecting instructions from gem5 into the bootloader binary. This was probably meant to provide a dynamic bootloader entry point. This is not needed in ARMv8.0, since we can simply update the ArmSystem::resetAddress with the bootloader entry point. Change-Id: I0c469873b8d69f7b49a7383e0754468bc1f2bd72 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/14001 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-11-07arch-arm: ArmSystem::resetAddr64 renamed to be used in AArch32Giacomo Travaglini
ARMv8 differs from ARMv7 with the presence of RVBAR register, which contains the implementation defined reset address when EL3 is not implemented. The entry 0x0 in the AArch32 vector table, once used for the Reset Vector, is now marked as "Not used", stating that it is now IMPLEMENTATION DEFINED. An implementation might still use this vector table entry to hold the Reset vector, but having a Reset address != than the general vector table (for any other exception) is allowed. At the moment any Reset exception is still using 0 as a vector table base address. This patch is extending the ArmSystem::resetAddr64 to ArmSystem::resetAddr so that it can be used for initializing MVBAR/RVBAR. In order to do so, we are providing a specialized behavior for the Reset exception when evaluating the vector base address. Change-Id: I051a730dc089e194db3b107bbed19251c661f87e Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/14000 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-11-07arch-arm: Implement AArch32 RVBARGiacomo Travaglini
RVBAR has been added to the system register list since ARMv8.0-A. It is implemented only if the highest Exception Level is different (minor) than EL3. If that's not the case, MVBAR is used. Since the two registers are mutually exclusive (depending on the presence of EL3), they share the same coprocessor numbers: p15, 0, c12, c0, 1 Rather than introducing a new register alias, we overload MVBAR so that it is treated as RVBAR if ArmSystem::highestEL() < EL3. This patch is changing the MiscReg info so that EL1 or EL2 access MVBAR (as RVBAR). N.B MVBAR is RW, whereas RVBAR is RO Change-Id: Ida3070413fd151ce79c446e99a2a389298d5f5bd Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13999 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-11-07arch-arm: Remove SCTLR.VE bitGiacomo Travaglini
ARMv8 has removed SCTLR.VE bit which is now hardcoded to 0. We are removing it from gem5 since we were not handling it anyway. Change-Id: Ibde2db45c7f8add4a3188f2cb8c23701a6088d03 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13998 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-11-07arch-arm: Refactor ISA::clear by adding a ISA::clear32 methodGiacomo Travaglini
The patch is also moving some initialization code to be used by AArch64 as well since the registers are mapped to AArch64 ones. Change-Id: I0089df25275434172c6e0e9cb125ee535c04d1b8 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13997 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-11-07arch-arm: Remove MISCREG commented numbersGiacomo Travaglini
Having an enum number might be useful in case we wanted to know how many miscregs we have, but on the other hand it makes it tedious to update the register list, since every commented number must be bumped. This patch is removing the comments holding the MISCREG numbers Change-Id: Ic5aba93885e4b8d6cb3bd6a4c49900b9e5474276 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13996 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-11-06mips: Change the integer and fp register widths to be 64 bits.Gabe Black
This makes them more consistent with the other architectures, helping to facilitate having a single, unified type across ISAs in the future. Change-Id: I65efb10e39d453281b8429eeedbb46fa6b023a2b Reviewed-on: https://gem5-review.googlesource.com/c/13620 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2018-11-06mips: Clean up type overrides for operands.Gabe Black
For operands which default to uw (uint32_t), there's no reason to explicitly specify that all over the place. Also, when assigning to a 32 bit value which is supposed to be the full width of the resulting register, there's no reason to override the value to be signed. If the value is expanded into a larger value, then extra bits may get set unintentionally through sign extension. Even if an instruction produces a value which should be interpreted as signed, it will still only produce a value of a certain predefined width, even if that answer ends up stored in a larger variable. Change-Id: I048d68c5dd08a1d40e8117ae9d36d70e05ec21c8 Reviewed-on: https://gem5-review.googlesource.com/c/13618 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
2018-11-06mips: Explicitly truncate the syscall return value down to 32 bits.Gabe Black
The IntReg type is 32 bits, and using it to cast the syscall return value is appropriate, but we're attempting to get rid of the ISA specific register types. Change-Id: I42496dd2cc086a6b718e1ce087fef81bb897d02f Reviewed-on: https://gem5-review.googlesource.com/c/13619 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2018-11-05null: Claim to use 64 bit floating point registers.Gabe Black
The NULL ISA doesn't actually have registers, so this setting doesn't matter. By making it 64 bits the ISA is more compatible with the other ISAs. Change-Id: I2c9b6d9a6f612719b8b00eb9dbed55fa2159e9b5 Reviewed-on: https://gem5-review.googlesource.com/c/13617 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2018-11-05sparc: Switch the FloatReg and FloatRegBits types to be 64 bit.Gabe Black
These types aren't used by the ISA itself since they're defined to be particular primitive types in the ISA description. This just affects code outside of the ISA which work with those types of registers. Change-Id: I4f62ab8fe04184cc23845090c82b250145a71747 Reviewed-on: https://gem5-review.googlesource.com/c/13616 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
2018-11-05arch, arm: Return s1Req upon fault in s2LookupAnouk Van Laer
When a s2Lookup object is created, a new request is created, based upon the original, stage 1 request sent out by the CPU. When a fault occurs during the second stage of translation, this new request is returned. This can lead to issues with the O3 CPU. The O3 fetch stage will not acknowledge the fault as it is a different request than the one it sent out and does not contain a contextID. This commit rectifies this. Change-Id: I21cb7377a59aed9d90d99f048b2106eaf219e93a Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13782 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-11-05arch, arm: Effect of AT instructions on descriptor handlingAnouk Van Laer
Some address translation instructions will stop translation after the 1st stage and intercept the IPA, even in the presence of stage 2 (eg AT S1E1). However, in the case of a TLB miss, the table descriptors still need to be translated from IPA to PA to avoid fetching the wrong addresses. This commit splits whether IPA->PA translation is required for the VA and/or for the table descriptors. Change-Id: Ie53cdc00585f116150256f1d833460931b3bfb7d Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13781 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
2018-10-29syscall_emul: implement arm openatCiro Santilli
This is especially important because the Ubuntu 18.04 packaged arm-linux-gnueabihf-gcc uses the system call on the program initialization, which leads all programs to fail with: fatal: syscall openat (#322) unimplemented. Change-Id: I5596162ad19644df7b6d21f2a46acc07030001ae Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/13004 Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>