diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/arm/linux/linux.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/arm/linux/linux.hh b/src/arch/arm/linux/linux.hh index e1f27a761..cff1e47fd 100644 --- a/src/arch/arm/linux/linux.hh +++ b/src/arch/arm/linux/linux.hh @@ -58,6 +58,12 @@ class ArmLinux : public Linux uint64_t stack, uint64_t tls) { ArmISA::copyRegs(ptc, ctc); + + if (flags & TGT_CLONE_SETTLS) { + /* TPIDR_EL0 is architecturally mapped to TPIDRURW, so + * this works for both aarch32 and aarch64. */ + ctc->setMiscReg(ArmISA::MISCREG_TPIDR_EL0, tls); + } } }; |