Stefan Bosch | e53d9b7 | 2024-01-26 12:50:56 +0000 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * relocate - S5P4418 specific relocation for ARM U-Boot |
| 4 | * |
| 5 | * Copyright (c) 2013 Albert ARIBAUD <albert.u.boot@aribaud.net> |
| 6 | * Copyright (C) 2023 Stefan Bosch <stefan_b@posteo.net> |
| 7 | */ |
| 8 | |
| 9 | #include <asm-offsets.h> |
| 10 | #include <asm/assembler.h> |
| 11 | #include <linux/linkage.h> |
| 12 | |
| 13 | ENTRY(relocate_vectors) |
| 14 | |
| 15 | /* |
| 16 | * The s5p4418 SoC has the security extensions, so use VBAR to relocate |
| 17 | * the exception vectors. |
| 18 | */ |
| 19 | ldr r0, [r9, #GD_RELOCADDR] /* r0 = gd->relocaddr */ |
| 20 | add r0, #0x400 /* vectors are after NSIH + 0x200 */ |
| 21 | mcr p15, 0, r0, c12, c0, 0 /* Set VBAR */ |
| 22 | ret lr |
| 23 | |
| 24 | ENDPROC(relocate_vectors) |