diff options
| -rw-r--r-- | arch/xtensa/Kconfig | 9 | ||||
| -rw-r--r-- | arch/xtensa/boot/boot-elf/bootstrap.S | 6 | ||||
| -rw-r--r-- | arch/xtensa/kernel/setup.c | 8 |
3 files changed, 22 insertions, 1 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 44b20da404be..bc766b6b6344 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
| @@ -473,6 +473,15 @@ config BUILTIN_DTB | |||
| 473 | string "DTB to build into the kernel image" | 473 | string "DTB to build into the kernel image" |
| 474 | depends on OF | 474 | depends on OF |
| 475 | 475 | ||
| 476 | config PARSE_BOOTPARAM | ||
| 477 | bool "Parse bootparam block" | ||
| 478 | default y | ||
| 479 | help | ||
| 480 | Parse parameters passed to the kernel from the bootloader. It may | ||
| 481 | be disabled if the kernel is known to run without the bootloader. | ||
| 482 | |||
| 483 | If unsure, say Y. | ||
| 484 | |||
| 476 | config BLK_DEV_SIMDISK | 485 | config BLK_DEV_SIMDISK |
| 477 | tristate "Host file-based simulated block device support" | 486 | tristate "Host file-based simulated block device support" |
| 478 | default n | 487 | default n |
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: | |||
| 42 | .word KERNELOFFSET | 42 | .word KERNELOFFSET |
| 43 | #endif | 43 | #endif |
| 44 | RomBootParam: | 44 | RomBootParam: |
| 45 | .word _bootparam | 45 | #ifndef CONFIG_PARSE_BOOTPARAM |
| 46 | .word 0 | ||
| 47 | #else | ||
| 48 | .word _bootparam | ||
| 46 | _bootparam: | 49 | _bootparam: |
| 47 | .short BP_TAG_FIRST | 50 | .short BP_TAG_FIRST |
| 48 | .short 4 | 51 | .short 4 |
| @@ -50,6 +53,7 @@ _bootparam: | |||
| 50 | .short BP_TAG_LAST | 53 | .short BP_TAG_LAST |
| 51 | .short 0 | 54 | .short 0 |
| 52 | .long 0 | 55 | .long 0 |
| 56 | #endif | ||
| 53 | 57 | ||
| 54 | .align 4 | 58 | .align 4 |
| 55 | _SetupMMU: | 59 | _SetupMMU: |
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 41618788cc9e..351283b60df6 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c | |||
| @@ -79,6 +79,7 @@ static char __initdata command_line[COMMAND_LINE_SIZE]; | |||
| 79 | static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; | 79 | static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE; |
| 80 | #endif | 80 | #endif |
| 81 | 81 | ||
| 82 | #ifdef CONFIG_PARSE_BOOTPARAM | ||
| 82 | /* | 83 | /* |
| 83 | * Boot parameter parsing. | 84 | * Boot parameter parsing. |
| 84 | * | 85 | * |
| @@ -176,6 +177,13 @@ static int __init parse_bootparam(const bp_tag_t* tag) | |||
| 176 | 177 | ||
| 177 | return 0; | 178 | return 0; |
| 178 | } | 179 | } |
| 180 | #else | ||
| 181 | static int __init parse_bootparam(const bp_tag_t *tag) | ||
| 182 | { | ||
| 183 | pr_info("Ignoring boot parameters at %p\n", tag); | ||
| 184 | return 0; | ||
| 185 | } | ||
| 186 | #endif | ||
| 179 | 187 | ||
| 180 | #ifdef CONFIG_OF | 188 | #ifdef CONFIG_OF |
| 181 | 189 | ||
