diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2014-01-16 04:31:24 -0500 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2014-01-16 08:19:38 -0500 |
commit | 59ed9413533897823bcdb4c79fd2904718e25b0a (patch) | |
tree | f016337b77b6299e551282c642249ec9327b4784 /arch/arc/kernel/head.S | |
parent | d8e8c7dda11f5d5cf90495f2e89d917a83509bc0 (diff) |
ARC: [cmdline] uboot cmdline handling rework
* Moved cmdline copy from asm to "C" - allows for more robust checking
of pointer validity etc.
* Remove the Kconfig option to do so, base it on a runtime value passed
by u-boot
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/head.S')
-rw-r--r-- | arch/arc/kernel/head.S | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/arch/arc/kernel/head.S b/arch/arc/kernel/head.S index 2c878e964a64..991997269d02 100644 --- a/arch/arc/kernel/head.S +++ b/arch/arc/kernel/head.S | |||
@@ -49,25 +49,13 @@ stext: | |||
49 | st.ab 0, [r5,4] | 49 | st.ab 0, [r5,4] |
50 | brlt r5, r6, 1b | 50 | brlt r5, r6, 1b |
51 | 51 | ||
52 | #ifdef CONFIG_CMDLINE_UBOOT | 52 | ; Uboot - kernel ABI |
53 | ; support for bootloader provided cmdline | 53 | ; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2 |
54 | ; If cmdline passed by u-boot, then | 54 | ; r1 = magic number (board identity, unused as of now |
55 | ; r0 = 1 (because ATAGS parsing, now retired, used to use 0) | 55 | ; r2 = pointer to uboot provided cmdline or external DTB in mem |
56 | ; r1 = magic number (board identity) | 56 | ; These are handled later in setup_arch() |
57 | ; r2 = addr of cmdline string (somewhere in memory/flash) | 57 | st r0, [@uboot_tag] |
58 | 58 | st r2, [@uboot_arg] | |
59 | brne r0, 1, .Lother_bootup_chores ; u-boot didn't pass cmdline | ||
60 | breq r2, 0, .Lother_bootup_chores ; or cmdline is NULL | ||
61 | |||
62 | mov r5, @command_line | ||
63 | 1: | ||
64 | ldb.ab r6, [r2, 1] | ||
65 | breq r6, 0, .Lother_bootup_chores | ||
66 | b.d 1b | ||
67 | stb.ab r6, [r5, 1] | ||
68 | #endif | ||
69 | |||
70 | .Lother_bootup_chores: | ||
71 | 59 | ||
72 | ; Identify if running on ISS vs Silicon | 60 | ; Identify if running on ISS vs Silicon |
73 | ; IDENTITY Reg [ 3 2 1 0 ] | 61 | ; IDENTITY Reg [ 3 2 1 0 ] |