mirror of
https://github.com/smaeul/u-boot.git
synced 2025-11-27 06:14:41 +00:00
arm: s5p4418: fix relocation of vectors
The header (NSIH) used for the s5p4418-SoC is not loaded into RAM by the 2nd-bootloader, see boot0.h. Therefore, use an adapted version of relocate_vectors which relocates the vectors after the header (at _start) instead of the 'dummy'-vectors at the start of the header (at __image_copy_start). Signed-off-by: Stefan Bosch <stefan_b@posteo.net> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
This commit is contained in:
parent
d819250c2a
commit
934dec0af0
@ -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
|
||||
|
||||
24
arch/arm/cpu/armv7/s5p4418/relocate.S
Normal file
24
arch/arm/cpu/armv7/s5p4418/relocate.S
Normal file
@ -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)
|
||||
Loading…
x
Reference in New Issue
Block a user