Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
c64df707
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
c64df707
编写于
3月 21, 2008
作者:
Y
Yinghai Lu
提交者:
Ingo Molnar
4月 17, 2008
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
x86: memtest bootparam
Signed-off-by:
N
Yinghai Lu
<
yhlu.kernel@gmail.com
>
Signed-off-by:
N
Ingo Molnar
<
mingo@elte.hu
>
上级
9b967106
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
56 addition
and
12 deletion
+56
-12
Documentation/kernel-parameters.txt
Documentation/kernel-parameters.txt
+5
-0
arch/x86/Kconfig
arch/x86/Kconfig
+29
-0
arch/x86/kernel/e820_64.c
arch/x86/kernel/e820_64.c
+5
-5
arch/x86/mm/init_64.c
arch/x86/mm/init_64.c
+17
-7
未找到文件。
Documentation/kernel-parameters.txt
浏览文件 @
c64df707
...
...
@@ -1147,6 +1147,11 @@ and is between 256 and 4096 characters. It is defined in the file
or
memmap=0x10000$0x18690000
memtest= [KNL,X86_64] Enable memtest
Format: <integer>
range: 0,4 : pattern number
default : 0 <disable>
meye.*= [HW] Set MotionEye Camera parameters
See Documentation/video4linux/meye.txt.
...
...
arch/x86/Kconfig
浏览文件 @
c64df707
...
...
@@ -382,6 +382,35 @@ config PARAVIRT
endif
config MEMTEST_BOOTPARAM
bool "Memtest boot parameter"
depends on X86_64
default y
help
This option adds a kernel parameter 'memtest', which allows memtest
to be disabled at boot. If this option is selected, memtest
functionality can be disabled with memtest=0 on the kernel
command line. The purpose of this option is to allow a single
kernel image to be distributed with memtest built in, but not
necessarily enabled.
If you are unsure how to answer this question, answer Y.
config MEMTEST_BOOTPARAM_VALUE
int "Memtest boot parameter default value (0-4)"
depends on MEMTEST_BOOTPARAM
range 0 4
default 0
help
This option sets the default value for the kernel parameter
'memtest', which allows memtest to be disabled at boot. If this
option is set to 0 (zero), the memtest kernel parameter will
default to 0, disabling memtest at bootup. If this option is
set to 4, the memtest kernel parameter will default to 4,
enabling memtest at bootup, and use that as pattern number.
If you are unsure how to answer this question, answer 0.
config ACPI_SRAT
def_bool y
depends on X86_32 && ACPI && NUMA && (X86_SUMMIT || X86_GENERICARCH)
...
...
arch/x86/kernel/e820_64.c
浏览文件 @
c64df707
...
...
@@ -241,7 +241,9 @@ unsigned long __init find_e820_area(unsigned long start, unsigned long end,
/*
* Find next free range after *start
*/
unsigned
long
__init
find_e820_area_size
(
unsigned
long
start
,
unsigned
long
*
sizep
,
unsigned
long
align
)
unsigned
long
__init
find_e820_area_size
(
unsigned
long
start
,
unsigned
long
*
sizep
,
unsigned
long
align
)
{
int
i
;
...
...
@@ -254,17 +256,15 @@ unsigned long __init find_e820_area_size(unsigned long start, unsigned long *siz
continue
;
addr
=
round_up
(
ei
->
addr
,
align
);
ei_last
=
ei
->
addr
+
ei
->
size
;
// printk(KERN_DEBUG "find_e820_area_size : e820 %d [%llx, %lx]\n", i, ei->addr, ei_last);
if
(
addr
<
start
)
addr
=
round_up
(
start
,
align
);
// printk(KERN_DEBUG "find_e820_area_size : 0 [%lx, %lx]\n", addr, ei_last);
if
(
addr
>=
ei_last
)
continue
;
*
sizep
=
ei_last
-
addr
;
while
(
bad_addr_size
(
&
addr
,
sizep
,
align
)
&&
addr
+
*
sizep
<=
ei_last
)
while
(
bad_addr_size
(
&
addr
,
sizep
,
align
)
&&
addr
+
*
sizep
<=
ei_last
)
;
last
=
addr
+
*
sizep
;
// printk(KERN_DEBUG "find_e820_area_size : 1 [%lx, %lx]\n", addr, last);
if
(
last
>
ei_last
)
continue
;
return
addr
;
...
...
arch/x86/mm/init_64.c
浏览文件 @
c64df707
...
...
@@ -427,7 +427,10 @@ static void __init init_gbpages(void)
direct_gbpages
=
0
;
}
static
void
__init
memtest
(
unsigned
long
start_phys
,
unsigned
long
size
,
unsigned
pattern
)
#ifdef CONFIG_MEMTEST_BOOTPARAM
static
void
__init
memtest
(
unsigned
long
start_phys
,
unsigned
long
size
,
unsigned
pattern
)
{
unsigned
long
i
;
unsigned
long
*
start
;
...
...
@@ -486,11 +489,12 @@ static void __init memtest(unsigned long start_phys, unsigned long size, unsigne
}
static
int
__initdata
memtest_pattern
;
static
int
memtest_pattern
__initdata
=
CONFIG_MEMTEST_BOOTPARAM_VALUE
;
static
int
__init
parse_memtest
(
char
*
arg
)
{
if
(
arg
)
memtest_pattern
=
simple_strtoul
(
arg
,
NULL
,
0
)
+
1
;
memtest_pattern
=
simple_strtoul
(
arg
,
NULL
,
0
);
return
0
;
}
...
...
@@ -501,8 +505,10 @@ static void __init early_memtest(unsigned long start, unsigned long end)
unsigned
long
t_start
,
t_size
;
unsigned
pattern
;
if
(
memtest_pattern
)
printk
(
KERN_INFO
"early_memtest: pattern num %d"
,
memtest_pattern
);
if
(
!
memtest_pattern
)
return
;
printk
(
KERN_INFO
"early_memtest: pattern num %d"
,
memtest_pattern
);
for
(
pattern
=
0
;
pattern
<
memtest_pattern
;
pattern
++
)
{
t_start
=
start
;
t_size
=
0
;
...
...
@@ -523,9 +529,13 @@ static void __init early_memtest(unsigned long start, unsigned long end)
t_start
+=
t_size
;
}
}
if
(
memtest_pattern
)
printk
(
KERN_CONT
"
\n
"
);
printk
(
KERN_CONT
"
\n
"
);
}
#else
static
void
__init
early_memtest
(
unsigned
long
start
,
unsigned
long
end
)
{
}
#endif
/*
* Setup the direct mapping of the physical memory at PAGE_OFFSET.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录