arm64: Initialize sctrl_el1 when running fork
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
parent
e4ca1a2de9
commit
e28c0b4ef1
1 changed files with 5 additions and 0 deletions
|
|
@ -225,6 +225,11 @@ pid_t arm64_fork(const struct fork_s *context)
|
|||
|
||||
child->cmn.xcp.regs[REG_ELR] = (uint64_t)context->lr;
|
||||
|
||||
child->cmn.xcp.regs[REG_SCTLR_EL1] = read_sysreg(sctlr_el1);
|
||||
#ifdef CONFIG_ARM64_MTE
|
||||
child->cmn.xcp.regs[REG_SCTLR_EL1] |= SCTLR_TCF1_BIT;
|
||||
#endif
|
||||
|
||||
child->cmn.xcp.regs[REG_EXE_DEPTH] = 0;
|
||||
child->cmn.xcp.regs[REG_SP_ELX] = newsp - XCPTCONTEXT_SIZE;
|
||||
#ifdef CONFIG_ARCH_KERNEL_STACK
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue