diff options
| author | wangxiaoyao <[email protected]> | 2023-02-20 13:48:00 +0800 |
|---|---|---|
| committer | guo <[email protected]> | 2023-02-21 08:48:49 +0800 |
| commit | 484a0d602e8b571a9d8186d38c8b136abc4ccfc9 (patch) | |
| tree | 399ef1a1718bffed545a7354bbf2a8f8133e9c23 /libcpu/aarch64/cortex-a | |
| parent | f84d89b0ca9c8982d436aa12be75554722462090 (diff) | |
[fixup] add cache maintenance ops;
fix bugs on cache maintenance when starting user app
Diffstat (limited to 'libcpu/aarch64/cortex-a')
| -rw-r--r-- | libcpu/aarch64/cortex-a/entry_point.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcpu/aarch64/cortex-a/entry_point.S b/libcpu/aarch64/cortex-a/entry_point.S index a73b420781..c1f14c28b0 100644 --- a/libcpu/aarch64/cortex-a/entry_point.S +++ b/libcpu/aarch64/cortex-a/entry_point.S @@ -89,6 +89,9 @@ __start: /* Set CPACR_EL1 (Architecture Feature Access Control Register) to avoid trap from SIMD or float point instruction */ mov x1, #0x00300000 /* Don't trap any SIMD/FP instructions in both EL0 and EL1 */ msr cpacr_el1, x1 + /* applying context change */ + dsb ish + isb /* clear bss */ GET_PHY x1, __bss_start @@ -270,11 +273,13 @@ _secondary_cpu_entry: ret after_mmu_enable_cpux: +#ifdef RT_USING_SMART mrs x0, tcr_el1 /* disable ttbr0, only using kernel space */ orr x0, x0, #(1 << 7) msr tcr_el1, x0 msr ttbr0_el1, xzr dsb sy +#endif mov x0, #1 msr spsel, x0 |
