summaryrefslogtreecommitdiff
path: root/arch/arm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/lib')
-rw-r--r--arch/arm/lib/Makefile1
-rw-r--r--arch/arm/lib/bootm.c4
-rw-r--r--arch/arm/lib/cache.c6
-rw-r--r--arch/arm/lib/crt0.S6
-rw-r--r--arch/arm/lib/crt0_64.S6
-rw-r--r--arch/arm/lib/crt0_arm_efi.S3
-rw-r--r--arch/arm/lib/eabi_compat.c17
-rw-r--r--arch/arm/lib/relocate.S2
-rw-r--r--arch/arm/lib/xferlist.c12
9 files changed, 35 insertions, 22 deletions
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 1c95dd6fed2..74cd5051552 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -92,6 +92,7 @@ obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
# For EABI conformant tool chains, provide eabi_compat()
ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
extra-y += eabi_compat.o
+CFLAGS_REMOVE_eabi_compat.o := $(LTO_CFLAGS)
endif
# some files can only build in ARM or THUMB2, not THUMB1
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 974cbfe8400..7eb764e1f4e 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -61,10 +61,6 @@ static void announce_and_cleanup(int fake)
bootstage_report();
#endif
-#ifdef CONFIG_USB_DEVICE
- udc_disconnect();
-#endif
-
board_quiesce_devices();
printf("\nStarting kernel ...%s\n\n", fake ?
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 516754caeaf..dd19bd3e4fb 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -10,6 +10,7 @@
#include <malloc.h>
#include <asm/cache.h>
#include <asm/global_data.h>
+#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -170,3 +171,8 @@ __weak int arm_reserve_mmu(void)
return 0;
}
+
+int __weak pgprot_set_attrs(phys_addr_t addr, size_t size, enum pgprot_attrs perm)
+{
+ return -ENOSYS;
+}
diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S
index 3e4906e273d..a50dde60e8b 100644
--- a/arch/arm/lib/crt0.S
+++ b/arch/arm/lib/crt0.S
@@ -100,10 +100,8 @@ ENTRY(_main)
* Set up initial C runtime environment and call board_init_f(0).
*/
-#if defined(CONFIG_TPL_BUILD) && defined(CONFIG_TPL_NEEDS_SEPARATE_STACK)
- ldr r0, =(CONFIG_TPL_STACK)
-#elif defined(CONFIG_XPL_BUILD) && defined(CONFIG_SPL_STACK)
- ldr r0, =(CONFIG_SPL_STACK)
+#if CONFIG_IS_ENABLED(HAVE_INIT_STACK)
+ ldr r0, =CONFIG_VAL(STACK)
#else
ldr r0, =(SYS_INIT_SP_ADDR)
#endif
diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
index 32401f544a7..30950ddaf9b 100644
--- a/arch/arm/lib/crt0_64.S
+++ b/arch/arm/lib/crt0_64.S
@@ -69,10 +69,8 @@ ENTRY(_main)
/*
* Set up initial C runtime environment and call board_init_f(0).
*/
-#if defined(CONFIG_TPL_BUILD) && defined(CONFIG_TPL_NEEDS_SEPARATE_STACK)
- ldr x0, =(CONFIG_TPL_STACK)
-#elif defined(CONFIG_XPL_BUILD) && defined(CONFIG_SPL_STACK)
- ldr x0, =(CONFIG_SPL_STACK)
+#if CONFIG_IS_ENABLED(HAVE_INIT_STACK)
+ ldr x0, =CONFIG_VAL(STACK)
#elif defined(CONFIG_INIT_SP_RELATIVE)
#if CONFIG_POSITION_INDEPENDENT
adrp x0, __bss_start /* x0 <- Runtime &__bss_start */
diff --git a/arch/arm/lib/crt0_arm_efi.S b/arch/arm/lib/crt0_arm_efi.S
index 1e7de5c3343..593ee1e194a 100644
--- a/arch/arm/lib/crt0_arm_efi.S
+++ b/arch/arm/lib/crt0_arm_efi.S
@@ -150,7 +150,8 @@ _start:
adr r1, .L_DYNAMIC
ldr r0, [r1]
add r1, r0, r1
- adrl r0, image_base
+ sub r0, pc, #((.+8-image_base) & 0xff)
+ sub r0, r0, #((.+4-image_base) & 0xff00)
bl _relocate
teq r0, #0
bne 0f
diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
index 602efe04c04..e6cafcc5f2b 100644
--- a/arch/arm/lib/eabi_compat.c
+++ b/arch/arm/lib/eabi_compat.c
@@ -33,7 +33,24 @@ void __aeabi_memcpy(void *dest, const void *src, size_t n)
(void) memcpy(dest, src, n);
}
+void __aeabi_memcpy4(void *dest, const void *src, size_t n) __alias(__aeabi_memcpy);
+
+void __aeabi_memcpy8(void *dest, const void *src, size_t n) __alias(__aeabi_memcpy);
+
void __aeabi_memset(void *dest, size_t n, int c)
{
(void) memset(dest, c, n);
}
+
+void __aeabi_memset4(void *dest, size_t n, int c) __alias(__aeabi_memset);
+
+void __aeabi_memset8(void *dest, size_t n, int c) __alias(__aeabi_memset);
+
+void __aeabi_memclr(void *dest, size_t n)
+{
+ (void) memset(dest, 0, n);
+}
+
+void __aeabi_memclr4(void *dest, size_t n) __alias(__aeabi_memclr);
+
+void __aeabi_memclr8(void *dest, size_t n) __alias(__aeabi_memclr);
diff --git a/arch/arm/lib/relocate.S b/arch/arm/lib/relocate.S
index 345e282e3e6..bffadfecba1 100644
--- a/arch/arm/lib/relocate.S
+++ b/arch/arm/lib/relocate.S
@@ -83,8 +83,6 @@ relocate_base:
add r1, r3 /* r1 <- Run &__image_copy_start */
subs r4, r0, r1 /* r4 <- Run to copy offset */
beq relocate_done /* skip relocation */
- ldr r1, _image_copy_start_ofs
- add r1, r3 /* r1 <- Run &__image_copy_start */
ldr r2, _image_copy_end_ofs
add r2, r3 /* r2 <- Run &__image_copy_end */
copy_loop:
diff --git a/arch/arm/lib/xferlist.c b/arch/arm/lib/xferlist.c
index f9c5d88bd47..6425936d354 100644
--- a/arch/arm/lib/xferlist.c
+++ b/arch/arm/lib/xferlist.c
@@ -8,18 +8,16 @@
#include <bloblist.h>
#include "xferlist.h"
-int xferlist_from_boot_arg(ulong addr, ulong size)
+int xferlist_from_boot_arg(ulong *addr)
{
int ret;
- ret = bloblist_check(saved_args[3], size);
- if (ret)
- return ret;
-
ret = bloblist_check_reg_conv(saved_args[0], saved_args[2],
- saved_args[1]);
+ saved_args[1], saved_args[3]);
if (ret)
return ret;
- return bloblist_reloc((void *)addr, size);
+ *addr = bloblist_get_base();
+
+ return 0;
}