mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 23:47:24 +00:00
armv8: layerscape: load function pointer using ADR
Don't use LDR to load a pointer to a function. This will generate a literal which cannot be relocated. Use ADR which is PC-relative and therefore can easily be relocated. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
This commit is contained in:
parent
f6c62f1c9e
commit
2eca7b9704
1 changed files with 3 additions and 3 deletions
|
@ -57,11 +57,11 @@ ENTRY(secondary_boot_func)
|
||||||
* table (each elem is padded to 64 bytes)
|
* table (each elem is padded to 64 bytes)
|
||||||
*/
|
*/
|
||||||
lsl x1, x10, #6
|
lsl x1, x10, #6
|
||||||
ldr x0, =__spin_table
|
adr x0, __spin_table
|
||||||
/* physical address of this cpus spin table element */
|
/* physical address of this cpus spin table element */
|
||||||
add x11, x1, x0
|
add x11, x1, x0
|
||||||
|
|
||||||
ldr x0, =__real_cntfrq
|
adr x0, __real_cntfrq
|
||||||
ldr x0, [x0]
|
ldr x0, [x0]
|
||||||
msr cntfrq_el0, x0 /* set with real frequency */
|
msr cntfrq_el0, x0 /* set with real frequency */
|
||||||
str x9, [x11, #16] /* LPID */
|
str x9, [x11, #16] /* LPID */
|
||||||
|
@ -117,7 +117,7 @@ ENTRY(secondary_switch_to_el1)
|
||||||
orr x10, x2, x1, lsl #2 /* x10 has LPID */
|
orr x10, x2, x1, lsl #2 /* x10 has LPID */
|
||||||
|
|
||||||
lsl x1, x10, #6
|
lsl x1, x10, #6
|
||||||
ldr x0, =__spin_table
|
adr x0, __spin_table
|
||||||
/* physical address of this cpus spin table element */
|
/* physical address of this cpus spin table element */
|
||||||
add x11, x1, x0
|
add x11, x1, x0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue