Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
036b2c56
Commit
036b2c56
authored
Mar 09, 2015
by
Vineet Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ARC: explicit'ify uboot support
Signed-off-by:
Vineet Gupta
<
vgupta@synopsys.com
>
parent
fd155792
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
arch/arc/Kconfig
arch/arc/Kconfig
+12
-0
arch/arc/kernel/head.S
arch/arc/kernel/head.S
+2
-0
arch/arc/kernel/setup.c
arch/arc/kernel/setup.c
+4
-1
No files found.
arch/arc/Kconfig
View file @
036b2c56
...
...
@@ -388,6 +388,18 @@ config ARC_DBG_TLB_MISS_COUNT
Counts number of I and D TLB Misses and exports them via Debugfs
The counters can be cleared via Debugfs as well
config ARC_UBOOT_SUPPORT
bool "Support uboot arg Handling"
default n
help
ARC Linux by default checks for uboot provided args as pointers to
external cmdline or DTB. This however breaks in absence of uboot,
when booting from Metaware debugger directly, as the registers are
not zeroed out on reset by mdb and/or ARCv2 based cores. The bogus
registers look like uboot args to kernel which then chokes.
So only enable the uboot arg checking/processing if users are sure
of uboot being in play.
config ARC_BUILTIN_DTB_NAME
string "Built in DTB"
help
...
...
arch/arc/kernel/head.S
View file @
036b2c56
...
...
@@ -83,6 +83,7 @@ stext:
st.ab
0
,
[
r5
,
4
]
1
:
#ifdef CONFIG_ARC_UBOOT_SUPPORT
; Uboot - kernel ABI
; r0 = [0] No uboot interaction, [1] cmdline in r2, [2] DTB in r2
; r1 = magic number (board identity, unused as of now
...
...
@@ -90,6 +91,7 @@ stext:
; These are handled later in setup_arch()
st
r0
,
[
@
uboot_tag
]
st
r2
,
[
@
uboot_arg
]
#endif
; setup "current" tsk and optionally cache it in dedicated r25
mov
r9
,
@
init_task
...
...
arch/arc/kernel/setup.c
View file @
036b2c56
...
...
@@ -319,13 +319,16 @@ static inline int is_kernel(unsigned long addr)
void
__init
setup_arch
(
char
**
cmdline_p
)
{
#ifdef CONFIG_ARC_UBOOT_SUPPORT
/* make sure that uboot passed pointer to cmdline/dtb is valid */
if
(
uboot_tag
&&
is_kernel
((
unsigned
long
)
uboot_arg
))
panic
(
"Invalid uboot arg
\n
"
);
/* See if u-boot passed an external Device Tree blob */
machine_desc
=
setup_machine_fdt
(
uboot_arg
);
/* uboot_tag == 2 */
if
(
!
machine_desc
)
{
if
(
!
machine_desc
)
#endif
{
/* No, so try the embedded one */
machine_desc
=
setup_machine_fdt
(
__dtb_start
);
if
(
!
machine_desc
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment