mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00
feat(nxp/common): add CORTEX A53 helper functions
Add helper function to disable the load-store prefetch. Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com> Change-Id: I36d7be37e0b800ab1e5842a56cfd04d779338868
This commit is contained in:
parent
1c87d60b55
commit
3ccc8ac3e5
1 changed files with 26 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <asm_macros.S>
|
#include <asm_macros.S>
|
||||||
|
#include <cortex_a53.h>
|
||||||
#include <drivers/console.h>
|
#include <drivers/console.h>
|
||||||
#include <lib/cpus/aarch64/cortex_a72.h>
|
#include <lib/cpus/aarch64/cortex_a72.h>
|
||||||
|
|
||||||
|
@ -155,6 +156,31 @@ endfunc plat_core_pos
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* this function disables the load-store prefetch of the calling core
|
||||||
|
* Note: this function is for A53 cores ONLY
|
||||||
|
* in: none
|
||||||
|
* out: none
|
||||||
|
* uses x0
|
||||||
|
*/
|
||||||
|
func _disable_ldstr_pfetch_A53
|
||||||
|
mrs x0, CORTEX_A53_CPUACTLR_EL1
|
||||||
|
tst x0, #CORTEX_A53_CPUACTLR_EL1_L1PCTL
|
||||||
|
b.ne 1f
|
||||||
|
b 2f
|
||||||
|
|
||||||
|
.align 6
|
||||||
|
1:
|
||||||
|
dsb sy
|
||||||
|
isb
|
||||||
|
bic x0, x0, #CORTEX_A53_CPUACTLR_EL1_L1PCTL
|
||||||
|
msr CORTEX_A53_CPUACTLR_EL1, x0
|
||||||
|
isb
|
||||||
|
|
||||||
|
2:
|
||||||
|
ret
|
||||||
|
endfunc _disable_ldstr_pfetch_A53
|
||||||
|
|
||||||
|
|
||||||
/* this function disables the load-store prefetch of the calling core
|
/* this function disables the load-store prefetch of the calling core
|
||||||
* Note: this function is for A72 cores ONLY
|
* Note: this function is for A72 cores ONLY
|
||||||
* in: none
|
* in: none
|
||||||
|
|
Loading…
Add table
Reference in a new issue