bsp/qoriq: Use LA to load an address

Add 64-bit support for LA.

Update #3082.
This commit is contained in:
Sebastian Huber
2017-07-31 15:10:33 +02:00
parent 0e26c19a07
commit c6994af7a7
2 changed files with 30 additions and 22 deletions

View File

@@ -54,45 +54,45 @@ _start:
bl bsp_fdt_copy
/* Get start stack */
LWI START_STACK, start_stack_end
LA START_STACK, start_stack_end
bl .Linitmore
/* Copy fast text */
LWI r3, bsp_section_fast_text_begin
LWI r4, bsp_section_fast_text_load_begin
LWI r5, bsp_section_fast_text_size
LA r3, bsp_section_fast_text_begin
LA r4, bsp_section_fast_text_load_begin
LA r5, bsp_section_fast_text_size
bl .Lcopy
LWI r3, bsp_section_fast_text_begin
LWI r4, bsp_section_fast_text_size
LA r3, bsp_section_fast_text_begin
LA r4, bsp_section_fast_text_size
bl rtems_cache_flush_multiple_data_lines
/* Copy read-only data */
LWI r3, bsp_section_rodata_begin
LWI r4, bsp_section_rodata_load_begin
LWI r5, bsp_section_rodata_size
LA r3, bsp_section_rodata_begin
LA r4, bsp_section_rodata_load_begin
LA r5, bsp_section_rodata_size
bl .Lcopy
LWI r3, bsp_section_rodata_begin
LWI r4, bsp_section_rodata_size
LA r3, bsp_section_rodata_begin
LA r4, bsp_section_rodata_size
bl rtems_cache_flush_multiple_data_lines
/* Copy fast data */
LWI r3, bsp_section_fast_data_begin
LWI r4, bsp_section_fast_data_load_begin
LWI r5, bsp_section_fast_data_size
LA r3, bsp_section_fast_data_begin
LA r4, bsp_section_fast_data_load_begin
LA r5, bsp_section_fast_data_size
bl .Lcopy
/* Copy data */
LWI r3, bsp_section_data_begin
LWI r4, bsp_section_data_load_begin
LWI r5, bsp_section_data_size
LA r3, bsp_section_data_begin
LA r4, bsp_section_data_load_begin
LA r5, bsp_section_data_size
bl .Lcopy
/* NULL pointer access protection (only core 0 has to do this) */
mfspr r3, BOOKE_PIR
cmpwi r3, 0
bne .Lnull_area_setup_done
LWI r3, bsp_section_start_begin
LA r3, bsp_section_start_begin
srawi r3, r3, 2
mtctr r3
li r3, -4
@@ -106,13 +106,13 @@ _start:
bl .Linitmmu
/* Clear SBSS */
LWI r3, bsp_section_sbss_begin
LWI r4, bsp_section_sbss_size
LA r3, bsp_section_sbss_begin
LA r4, bsp_section_sbss_size
bl bsp_start_zero
/* Clear BSS */
LWI r3, bsp_section_bss_begin
LWI r4, bsp_section_bss_size
LA r3, bsp_section_bss_begin
LA r4, bsp_section_bss_size
bl bsp_start_zero
/* Set up EABI and SYSV environment */

View File

@@ -869,8 +869,16 @@ void ShowBATS(void);
#include <rtems/asm.h>
.macro LA reg, addr
#if defined(__powerpc64__)
lis \reg, (\addr)@highest
ori \reg, \reg, (\addr)@higher
rldicr \reg, \reg, 32, 31
oris \reg, \reg, (\addr)@h
ori \reg, \reg, (\addr)@l
#else
lis \reg, (\addr)@h
ori \reg, \reg, (\addr)@l
#endif
.endm
.macro LA32 reg, addr