Skip to content

Commit

Permalink
plat/nxp: LX2160 errata - enable _delay_exclusive_snoop_A72
Browse files Browse the repository at this point in the history
Fix a CPU hang in some cases when using load-exclusive/store-exclusive by enabling snoop-delayed exclusive handling in CPUACTLR_EL1

Signed-off-by: Andrew Yong <me@ndoo.sg>
  • Loading branch information
ndoo committed Oct 9, 2024
1 parent 9e908c1 commit cb7ce31
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion plat/nxp/common/aarch64/ls_helpers.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/

#include <asm_macros.S>
#include <cortex_a72.h>
#include <drivers/console.h>
#include <lib/cpus/aarch64/cortex_a72.h>

#include <platform_def.h>

Expand All @@ -23,6 +23,7 @@
.globl _disable_ldstr_pfetch_A53
.globl _disable_ldstr_pfetch_A72
.global _set_smmu_pagesz_64
.global _delay_exclusive_snoop_A72

/* int plat_crash_console_init(void)
* Function to initialize the crash console
Expand Down Expand Up @@ -192,3 +193,21 @@ func _set_smmu_pagesz_64

ret
endfunc _set_smmu_pagesz_64

func _delay_exclusive_snoop_A72
mrs x0, CORTEX_A72_CPUACTLR_EL1
tst x0, #CORTEX_A72_CPUACTLR_EL1_DELAY_EXCLUSIVE_SNOOP
b.eq 1f
b 2f

.align 6
1:
dsb sy
isb
orr x0, x0, #CORTEX_A72_CPUACTLR_EL1_DELAY_EXCLUSIVE_SNOOP
msr CORTEX_A72_CPUACTLR_EL1, x0
isb

2:
ret
endfunc _delay_exclusive_snoop_A72
2 changes: 1 addition & 1 deletion plat/nxp/soc-lx2160a/aarch64/lx2160a_helpers.S
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ endfunc platform_mem_init


func apply_platform_errata

ret
endfunc apply_platform_errata

Expand All @@ -37,6 +36,7 @@ func plat_reset_handler
bl apply_platform_errata

#if defined(IMAGE_BL31)
bl _delay_exclusive_snoop_A72
ldr x0, =POLICY_SMMU_PAGESZ_64K
cbz x0, 1f
/* Set the SMMU page size in the sACR register */
Expand Down

0 comments on commit cb7ce31

Please sign in to comment.