From baac1d36d15d16fc064a901918bf844a36e97b1b Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Mon, 13 Aug 2018 18:56:37 -0700 Subject: xtensa: make bootparam parsing optional A kernel may not need any boot parameters from the bootloader, allow disabling bootparam parsing in that case. Signed-off-by: Max Filippov --- arch/xtensa/boot/boot-elf/bootstrap.S | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'arch/xtensa/boot') diff --git a/arch/xtensa/boot/boot-elf/bootstrap.S b/arch/xtensa/boot/boot-elf/bootstrap.S index b6aa85328ac0..718c99dcfe7a 100644 --- a/arch/xtensa/boot/boot-elf/bootstrap.S +++ b/arch/xtensa/boot/boot-elf/bootstrap.S @@ -42,7 +42,10 @@ RomInitAddr: .word KERNELOFFSET #endif RomBootParam: - .word _bootparam +#ifndef CONFIG_PARSE_BOOTPARAM + .word 0 +#else + .word _bootparam _bootparam: .short BP_TAG_FIRST .short 4 @@ -50,6 +53,7 @@ _bootparam: .short BP_TAG_LAST .short 0 .long 0 +#endif .align 4 _SetupMMU: -- cgit v1.2.3 From 0c692569ce1f8944490869604beb99de10278a12 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Mon, 13 Aug 2018 20:43:10 -0700 Subject: xtensa: clean up boot-elf/bootstrap.S Drop unneeded headers, rewrite literal definitions with .literal. Signed-off-by: Max Filippov --- arch/xtensa/boot/boot-elf/bootstrap.S | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'arch/xtensa/boot') diff --git a/arch/xtensa/boot/boot-elf/bootstrap.S b/arch/xtensa/boot/boot-elf/bootstrap.S index 718c99dcfe7a..29c68426ab56 100644 --- a/arch/xtensa/boot/boot-elf/bootstrap.S +++ b/arch/xtensa/boot/boot-elf/bootstrap.S @@ -15,10 +15,6 @@ */ #include -#include -#include -#include -#include #include #include #include @@ -33,19 +29,18 @@ _ResetVector: .begin no-absolute-literals .literal_position - .align 4 -RomInitAddr: #if defined(CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX) && \ XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY - .word CONFIG_KERNEL_LOAD_ADDRESS + .literal RomInitAddr, CONFIG_KERNEL_LOAD_ADDRESS #else - .word KERNELOFFSET + .literal RomInitAddr, KERNELOFFSET #endif -RomBootParam: #ifndef CONFIG_PARSE_BOOTPARAM - .word 0 + .literal RomBootParam, 0 #else - .word _bootparam + .literal RomBootParam, _bootparam + + .align 4 _bootparam: .short BP_TAG_FIRST .short 4 -- cgit v1.2.3