aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-01-09 09:00:59 -0500
committerTom Rini <trini@konsulko.com>2024-01-09 09:00:59 -0500
commitcf476b6d988889f31785aa7fee70c2629386fd70 (patch)
tree76e5e97e37f2fb8c4a1839931adecbfc98a27b34 /arch
parentc7937a41992298752b9b424b9e4d222dfc157915 (diff)
parent5631d20e2ef1008d55569790f79672ea8cc6894b (diff)
downloadu-boot-WIP/09Jan2024.zip
u-boot-WIP/09Jan2024.tar.gz
u-boot-WIP/09Jan2024.tar.bz2
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-samsungWIP/09Jan2024
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/s5p4418/Makefile3
-rw-r--r--arch/arm/cpu/armv7/s5p4418/relocate.S24
2 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/s5p4418/Makefile b/arch/arm/cpu/armv7/s5p4418/Makefile
index 321b257..5804258 100644
--- a/arch/arm/cpu/armv7/s5p4418/Makefile
+++ b/arch/arm/cpu/armv7/s5p4418/Makefile
@@ -2,5 +2,8 @@
#
# (C) Copyright 2016 Nexell
# Hyunseok, Jung <hsjung@nexell.co.kr>
+#
+# Copyright (C) 2023 Stefan Bosch <stefan_b@posteo.net>
obj-y += cpu.o
+obj-y += relocate.o
diff --git a/arch/arm/cpu/armv7/s5p4418/relocate.S b/arch/arm/cpu/armv7/s5p4418/relocate.S
new file mode 100644
index 0000000..d6e76ad
--- /dev/null
+++ b/arch/arm/cpu/armv7/s5p4418/relocate.S
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * relocate - S5P4418 specific relocation for ARM U-Boot
+ *
+ * Copyright (c) 2013 Albert ARIBAUD <albert.u.boot@aribaud.net>
+ * Copyright (C) 2023 Stefan Bosch <stefan_b@posteo.net>
+ */
+
+#include <asm-offsets.h>
+#include <asm/assembler.h>
+#include <linux/linkage.h>
+
+ENTRY(relocate_vectors)
+
+ /*
+ * The s5p4418 SoC has the security extensions, so use VBAR to relocate
+ * the exception vectors.
+ */
+ ldr r0, [r9, #GD_RELOCADDR] /* r0 = gd->relocaddr */
+ add r0, #0x400 /* vectors are after NSIH + 0x200 */
+ mcr p15, 0, r0, c12, c0, 0 /* Set VBAR */
+ ret lr
+
+ENDPROC(relocate_vectors)