blob: d6e76adceb1b35dcb1d61818be699e04a44a6108 [file] [log] [blame]
Stefan Bosche53d9b72024-01-26 12:50:56 +00001/* 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
13ENTRY(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
24ENDPROC(relocate_vectors)