Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
2a4e669d
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2a4e669d
编写于
5月 07, 2017
作者:
M
Max Filippov
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'xtensa-sim-params' into xtensa-fixes
上级
062b1c19
fbe22d28
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
45 addition
and
23 deletion
+45
-23
arch/xtensa/kernel/setup.c
arch/xtensa/kernel/setup.c
+2
-3
arch/xtensa/platforms/iss/include/platform/simcall.h
arch/xtensa/platforms/iss/include/platform/simcall.h
+20
-0
arch/xtensa/platforms/iss/setup.c
arch/xtensa/platforms/iss/setup.c
+23
-20
未找到文件。
arch/xtensa/kernel/setup.c
浏览文件 @
2a4e669d
...
...
@@ -317,8 +317,9 @@ static inline int mem_reserve(unsigned long start, unsigned long end)
void
__init
setup_arch
(
char
**
cmdline_p
)
{
strlcpy
(
boot_command_line
,
command_line
,
COMMAND_LINE_SIZE
);
*
cmdline_p
=
command_line
;
platform_setup
(
cmdline_p
);
strlcpy
(
boot_command_line
,
*
cmdline_p
,
COMMAND_LINE_SIZE
);
/* Reserve some memory regions */
...
...
@@ -382,8 +383,6 @@ void __init setup_arch(char **cmdline_p)
unflatten_and_copy_device_tree
();
platform_setup
(
cmdline_p
);
#ifdef CONFIG_SMP
smp_init_cpus
();
#endif
...
...
arch/xtensa/platforms/iss/include/platform/simcall.h
浏览文件 @
2a4e669d
...
...
@@ -6,6 +6,7 @@
* for more details.
*
* Copyright (C) 2001 Tensilica Inc.
* Copyright (C) 2017 Cadence Design Systems Inc.
*/
#ifndef _XTENSA_PLATFORM_ISS_SIMCALL_H
...
...
@@ -49,6 +50,10 @@
#define SYS_bind 30
#define SYS_ioctl 31
#define SYS_iss_argc 1000
/* returns value of argc */
#define SYS_iss_argv_size 1001
/* bytes needed for argv & arg strings */
#define SYS_iss_set_argv 1002
/* saves argv & arg strings at given addr */
/*
* SYS_select_one specifiers
*/
...
...
@@ -118,5 +123,20 @@ static inline int simc_lseek(int fd, uint32_t off, int whence)
return
__simc
(
SYS_lseek
,
fd
,
off
,
whence
);
}
static
inline
int
simc_argc
(
void
)
{
return
__simc
(
SYS_iss_argc
,
0
,
0
,
0
);
}
static
inline
int
simc_argv_size
(
void
)
{
return
__simc
(
SYS_iss_argv_size
,
0
,
0
,
0
);
}
static
inline
void
simc_argv
(
void
*
buf
)
{
__simc
(
SYS_iss_set_argv
,
(
int
)
buf
,
0
,
0
);
}
#endif
/* _XTENSA_PLATFORM_ISS_SIMCALL_H */
arch/xtensa/platforms/iss/setup.c
浏览文件 @
2a4e669d
...
...
@@ -8,6 +8,7 @@
* Joe Taylor <joe@tensilica.com>
*
* Copyright 2001 - 2005 Tensilica Inc.
* Copyright 2017 Cadence Design Systems Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
...
...
@@ -15,6 +16,7 @@
* option) any later version.
*
*/
#include <linux/bootmem.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/init.h>
...
...
@@ -31,13 +33,13 @@
#include <asm/platform.h>
#include <asm/bootparam.h>
#include <asm/setup.h>
#include <platform/simcall.h>
void
__init
platform_init
(
bp_tag_t
*
bootparam
)
{
}
void
platform_halt
(
void
)
...
...
@@ -59,26 +61,10 @@ void platform_restart(void)
/* control never gets here */
}
extern
void
iss_net_poll
(
void
);
const
char
twirl
[]
=
"|/-
\\
|/-
\\
"
;
void
platform_heartbeat
(
void
)
{
#if 0
static int i = 0, j = 0;
if (--i < 0) {
i = 99;
printk("\r%c\r", twirl[j++]);
if (j == 8)
j = 0;
}
#endif
}
static
int
iss_panic_event
(
struct
notifier_block
*
this
,
unsigned
long
event
,
void
*
ptr
)
{
...
...
@@ -87,12 +73,29 @@ iss_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
}
static
struct
notifier_block
iss_panic_block
=
{
iss_panic_event
,
NULL
,
0
.
notifier_call
=
iss_panic_event
,
};
void
__init
platform_setup
(
char
**
p_cmdline
)
{
int
argc
=
simc_argc
();
int
argv_size
=
simc_argv_size
();
if
(
argc
>
1
)
{
void
**
argv
=
alloc_bootmem
(
argv_size
);
char
*
cmdline
=
alloc_bootmem
(
argv_size
);
int
i
;
cmdline
[
0
]
=
0
;
simc_argv
((
void
*
)
argv
);
for
(
i
=
1
;
i
<
argc
;
++
i
)
{
if
(
i
>
1
)
strcat
(
cmdline
,
" "
);
strcat
(
cmdline
,
argv
[
i
]);
}
*
p_cmdline
=
cmdline
;
}
atomic_notifier_chain_register
(
&
panic_notifier_list
,
&
iss_panic_block
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录