diff options
Diffstat (limited to 'arch/mips/include/asm')
-rw-r--r-- | arch/mips/include/asm/asm.h | 3 | ||||
-rw-r--r-- | arch/mips/include/asm/pbl_macros.h | 4 | ||||
-rw-r--r-- | arch/mips/include/asm/relocs.h | 23 | ||||
-rw-r--r-- | arch/mips/include/asm/sections.h | 14 |
4 files changed, 41 insertions, 3 deletions
diff --git a/arch/mips/include/asm/asm.h b/arch/mips/include/asm/asm.h index 7d2b673bd9..a85467ceed 100644 --- a/arch/mips/include/asm/asm.h +++ b/arch/mips/include/asm/asm.h @@ -89,13 +89,14 @@ EXPORT(symbol) /* * ENTRY_FUNCTION_END - mark end of entry function */ -#define ENTRY_FUNCTION_END(symbol, dtb) \ +#define ENTRY_FUNCTION_END(symbol, dtb, ram_size) \ mips_nmon; \ copy_to_link_location symbol; \ stack_setup; \ \ la a0, __dtb_ ## dtb##_start; \ la a1, __dtb_ ## dtb##_end; \ + li a2, ram_size; \ la v0, pbl_main_entry; \ jal v0; \ nop; \ diff --git a/arch/mips/include/asm/pbl_macros.h b/arch/mips/include/asm/pbl_macros.h index e78d1afe6a..c62910ff60 100644 --- a/arch/mips/include/asm/pbl_macros.h +++ b/arch/mips/include/asm/pbl_macros.h @@ -187,7 +187,7 @@ copy_loop_exit: * */ -#if (STACK_BASE + STACK_SIZE) % 16 != 0 +#if (TEXT_BASE - MALLOC_SIZE) % 16 != 0 #error stack pointer must be 16-byte-aligned #endif @@ -196,7 +196,7 @@ copy_loop_exit: .set noreorder /* set stack pointer; reserve four 32-bit argument slots */ - la sp, STACK_BASE + STACK_SIZE - 16 + la sp, (TEXT_BASE - MALLOC_SIZE - 16) .set pop .endm diff --git a/arch/mips/include/asm/relocs.h b/arch/mips/include/asm/relocs.h new file mode 100644 index 0000000000..0987c4bb13 --- /dev/null +++ b/arch/mips/include/asm/relocs.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * MIPS Relocations + * + * Copyright (c) 2017 Imagination Technologies Ltd. + */ + +#ifndef __ASM_MIPS_RELOCS_H__ +#define __ASM_MIPS_RELOCS_H__ + +#define R_MIPS_NONE 0 +#define R_MIPS_32 2 +#define R_MIPS_26 4 +#define R_MIPS_HI16 5 +#define R_MIPS_LO16 6 +#define R_MIPS_PC16 10 +#define R_MIPS_64 18 +#define R_MIPS_HIGHER 28 +#define R_MIPS_HIGHEST 29 +#define R_MIPS_PC21_S2 60 +#define R_MIPS_PC26_S2 61 + +#endif /* __ASM_MIPS_RELOCS_H__ */ diff --git a/arch/mips/include/asm/sections.h b/arch/mips/include/asm/sections.h index 2b8c516038..8e004eaf34 100644 --- a/arch/mips/include/asm/sections.h +++ b/arch/mips/include/asm/sections.h @@ -1 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef __ASM_MIPS_SECTIONS_H +#define __ASM_MIPS_SECTIONS_H + #include <asm-generic/sections.h> + +/** + * __rel_start: Relocation data generated by the mips-relocs tool + * + * See arch/mips/lib/reloc.c for details on the format & use of this data. + */ +extern uint8_t __rel_start[]; + +#endif |