[rtems commit] bsp/qoriq: Copy FDT later
Sebastian Huber
sebh at rtems.org
Tue Aug 22 14:55:07 UTC 2017
Module: rtems
Branch: master
Commit: 0ae1916bcfbf5cc73ed9d932e1d58bc550514b9b
Changeset: http://git.rtems.org/rtems/commit/?id=0ae1916bcfbf5cc73ed9d932e1d58bc550514b9b
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Aug 1 08:41:07 2017 +0200
bsp/qoriq: Copy FDT later
We need a ready to use TOC section before we can call bsp_fdt_copy().
Update #3082.
---
c/src/lib/libbsp/powerpc/qoriq/start/start.S | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/c/src/lib/libbsp/powerpc/qoriq/start/start.S b/c/src/lib/libbsp/powerpc/qoriq/start/start.S
index 85bcb3a..bf1e3b9 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/start/start.S
+++ b/c/src/lib/libbsp/powerpc/qoriq/start/start.S
@@ -37,6 +37,7 @@
#define INITIAL_MSR r14
#define START_STACK r15
#define SAVED_LINK_REGISTER r16
+#define FDT_REGISTER r17
.globl _start
#ifdef RTEMS_SMP
@@ -50,8 +51,8 @@
.section ".bsp_start_text", "ax"
_start:
+ mr FDT_REGISTER, r3
bl .Linitearly
- bl bsp_fdt_copy
/* Get start stack */
LA START_STACK, start_stack_end
@@ -72,6 +73,12 @@ _start:
LA r4, bsp_section_rodata_load_begin
LA r5, bsp_section_rodata_size
bl .Lcopy
+
+ /* Copy FDT into read-only data */
+ mr r3, FDT_REGISTER
+ bl bsp_fdt_copy
+
+ /* Flush read-only data */
LA r3, bsp_section_rodata_begin
LA r4, bsp_section_rodata_size
bl rtems_cache_flush_multiple_data_lines
@@ -131,11 +138,6 @@ _start:
b memcpy
.Linitearly:
- /*
- * Do not use r3 here, since it holds the FDT base pointer provided by
- * the boot loader.
- */
-
#ifdef __powerpc64__
mfmsr r0
oris r0, r0, MSR_CM >> 16
More information about the vc
mailing list