
22 Jan
2015
22 Jan
'15
4:30 p.m.
On Thu, 2015-01-22 at 20:42 +0530, Bhupesh Sharma wrote:
+WEAK(apply_core_errata)
- mov x29, lr /* Save LR */
- /* For now, we support Cortex-A57 specific errata only */
- /* Check if we are running on a Cortex-A57 core */
- branch_if_a57_core x0, apply_a57_core_errata
- b 0f
Instead of branching forward here, have the a57 code branch back at the end.
/*
- Branch if current processor is a Cortex-A57 core.
- */
+.macro branch_if_a57_core, xreg, a57_label
- mrs \xreg, midr_el1
- lsr \xreg, \xreg, #4
- and \xreg, \xreg, #0x00000FFF
- cmp \xreg, #0xD07 /* Cortex-A57 MPCore processor. */
- b.eq \a57_label
+.endm
+/*
- Branch if current processor is a Cortex-A53 core.
- */
+.macro branch_if_a53_core, xreg, a53_label
- mrs \xreg, midr_el1
- lsr \xreg, \xreg, #4
- cmp \xreg, #0xD03 /* Cortex-A53 MPCore processor. */
- b.eq \a53_label
+.endm
Why do you AND with 0xfff for a57 but not a53?
Where else do you expect to use these macros?
-Scott