Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
026e2c05
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看板
提交
026e2c05
编写于
7月 22, 2008
作者:
I
Ingo Molnar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
x86, cyrix: debug
Signed-off-by:
N
Ingo Molnar
<
mingo@elte.hu
>
上级
93ded9b8
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
18 addition
and
10 deletion
+18
-10
arch/x86/kernel/cpu/cyrix.c
arch/x86/kernel/cpu/cyrix.c
+10
-10
include/asm-x86/processor-cyrix.h
include/asm-x86/processor-cyrix.h
+8
-0
未找到文件。
arch/x86/kernel/cpu/cyrix.c
浏览文件 @
026e2c05
...
@@ -116,7 +116,7 @@ static void __cpuinit set_cx86_reorder(void)
...
@@ -116,7 +116,7 @@ static void __cpuinit set_cx86_reorder(void)
setCx86
(
CX86_CCR3
,
(
ccr3
&
0x0f
)
|
0x10
);
/* enable MAPEN */
setCx86
(
CX86_CCR3
,
(
ccr3
&
0x0f
)
|
0x10
);
/* enable MAPEN */
/* Load/Store Serialize to mem access disable (=reorder it) */
/* Load/Store Serialize to mem access disable (=reorder it) */
setCx86
(
CX86_PCR0
,
getCx86
(
CX86_PCR0
)
&
~
0x80
);
setCx86
_old
(
CX86_PCR0
,
getCx86_old
(
CX86_PCR0
)
&
~
0x80
);
/* set load/store serialize from 1GB to 4GB */
/* set load/store serialize from 1GB to 4GB */
ccr3
|=
0xe0
;
ccr3
|=
0xe0
;
setCx86
(
CX86_CCR3
,
ccr3
);
setCx86
(
CX86_CCR3
,
ccr3
);
...
@@ -127,11 +127,11 @@ static void __cpuinit set_cx86_memwb(void)
...
@@ -127,11 +127,11 @@ static void __cpuinit set_cx86_memwb(void)
printk
(
KERN_INFO
"Enable Memory-Write-back mode on Cyrix/NSC processor.
\n
"
);
printk
(
KERN_INFO
"Enable Memory-Write-back mode on Cyrix/NSC processor.
\n
"
);
/* CCR2 bit 2: unlock NW bit */
/* CCR2 bit 2: unlock NW bit */
setCx86
(
CX86_CCR2
,
getCx86
(
CX86_CCR2
)
&
~
0x04
);
setCx86
_old
(
CX86_CCR2
,
getCx86_old
(
CX86_CCR2
)
&
~
0x04
);
/* set 'Not Write-through' */
/* set 'Not Write-through' */
write_cr0
(
read_cr0
()
|
X86_CR0_NW
);
write_cr0
(
read_cr0
()
|
X86_CR0_NW
);
/* CCR2 bit 2: lock NW bit and set WT1 */
/* CCR2 bit 2: lock NW bit and set WT1 */
setCx86
(
CX86_CCR2
,
getCx86
(
CX86_CCR2
)
|
0x14
);
setCx86
_old
(
CX86_CCR2
,
getCx86_old
(
CX86_CCR2
)
|
0x14
);
}
}
static
void
__cpuinit
set_cx86_inc
(
void
)
static
void
__cpuinit
set_cx86_inc
(
void
)
...
@@ -144,10 +144,10 @@ static void __cpuinit set_cx86_inc(void)
...
@@ -144,10 +144,10 @@ static void __cpuinit set_cx86_inc(void)
setCx86
(
CX86_CCR3
,
(
ccr3
&
0x0f
)
|
0x10
);
/* enable MAPEN */
setCx86
(
CX86_CCR3
,
(
ccr3
&
0x0f
)
|
0x10
);
/* enable MAPEN */
/* PCR1 -- Performance Control */
/* PCR1 -- Performance Control */
/* Incrementor on, whatever that is */
/* Incrementor on, whatever that is */
setCx86
(
CX86_PCR1
,
getCx86
(
CX86_PCR1
)
|
0x02
);
setCx86
_old
(
CX86_PCR1
,
getCx86_old
(
CX86_PCR1
)
|
0x02
);
/* PCR0 -- Performance Control */
/* PCR0 -- Performance Control */
/* Incrementor Margin 10 */
/* Incrementor Margin 10 */
setCx86
(
CX86_PCR0
,
getCx86
(
CX86_PCR0
)
|
0x04
);
setCx86
_old
(
CX86_PCR0
,
getCx86_old
(
CX86_PCR0
)
|
0x04
);
setCx86
(
CX86_CCR3
,
ccr3
);
/* disable MAPEN */
setCx86
(
CX86_CCR3
,
ccr3
);
/* disable MAPEN */
}
}
...
@@ -162,14 +162,14 @@ static void __cpuinit geode_configure(void)
...
@@ -162,14 +162,14 @@ static void __cpuinit geode_configure(void)
local_irq_save
(
flags
);
local_irq_save
(
flags
);
/* Suspend on halt power saving and enable #SUSP pin */
/* Suspend on halt power saving and enable #SUSP pin */
setCx86
(
CX86_CCR2
,
getCx86
(
CX86_CCR2
)
|
0x88
);
setCx86
_old
(
CX86_CCR2
,
getCx86_old
(
CX86_CCR2
)
|
0x88
);
ccr3
=
getCx86
(
CX86_CCR3
);
ccr3
=
getCx86
(
CX86_CCR3
);
setCx86
(
CX86_CCR3
,
(
ccr3
&
0x0f
)
|
0x10
);
/* enable MAPEN */
setCx86
(
CX86_CCR3
,
(
ccr3
&
0x0f
)
|
0x10
);
/* enable MAPEN */
/* FPU fast, DTE cache, Mem bypass */
/* FPU fast, DTE cache, Mem bypass */
setCx86
(
CX86_CCR4
,
getCx86
(
CX86_CCR4
)
|
0x38
);
setCx86
_old
(
CX86_CCR4
,
getCx86_old
(
CX86_CCR4
)
|
0x38
);
setCx86
(
CX86_CCR3
,
ccr3
);
/* disable MAPEN */
setCx86
(
CX86_CCR3
,
ccr3
);
/* disable MAPEN */
set_cx86_memwb
();
set_cx86_memwb
();
...
@@ -286,7 +286,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
...
@@ -286,7 +286,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
/* GXm supports extended cpuid levels 'ala' AMD */
/* GXm supports extended cpuid levels 'ala' AMD */
if
(
c
->
cpuid_level
==
2
)
{
if
(
c
->
cpuid_level
==
2
)
{
/* Enable cxMMX extensions (GX1 Datasheet 54) */
/* Enable cxMMX extensions (GX1 Datasheet 54) */
setCx86
(
CX86_CCR7
,
getCx86
(
CX86_CCR7
)
|
1
);
setCx86
_old
(
CX86_CCR7
,
getCx86_old
(
CX86_CCR7
)
|
1
);
/*
/*
* GXm : 0x30 ... 0x5f GXm datasheet 51
* GXm : 0x30 ... 0x5f GXm datasheet 51
...
@@ -309,7 +309,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
...
@@ -309,7 +309,7 @@ static void __cpuinit init_cyrix(struct cpuinfo_x86 *c)
if
(
dir1
>
7
)
{
if
(
dir1
>
7
)
{
dir0_msn
++
;
/* M II */
dir0_msn
++
;
/* M II */
/* Enable MMX extensions (App note 108) */
/* Enable MMX extensions (App note 108) */
setCx86
(
CX86_CCR7
,
getCx86
(
CX86_CCR7
)
|
1
);
setCx86
_old
(
CX86_CCR7
,
getCx86_old
(
CX86_CCR7
)
|
1
);
}
else
{
}
else
{
c
->
coma_bug
=
1
;
/* 6x86MX, it has the bug. */
c
->
coma_bug
=
1
;
/* 6x86MX, it has the bug. */
}
}
...
@@ -424,7 +424,7 @@ static void __cpuinit cyrix_identify(struct cpuinfo_x86 *c)
...
@@ -424,7 +424,7 @@ static void __cpuinit cyrix_identify(struct cpuinfo_x86 *c)
local_irq_save
(
flags
);
local_irq_save
(
flags
);
ccr3
=
getCx86
(
CX86_CCR3
);
ccr3
=
getCx86
(
CX86_CCR3
);
setCx86
(
CX86_CCR3
,
(
ccr3
&
0x0f
)
|
0x10
);
/* enable MAPEN */
setCx86
(
CX86_CCR3
,
(
ccr3
&
0x0f
)
|
0x10
);
/* enable MAPEN */
setCx86
(
CX86_CCR4
,
getCx86
(
CX86_CCR4
)
|
0x80
);
/* enable cpuid */
setCx86
_old
(
CX86_CCR4
,
getCx86_old
(
CX86_CCR4
)
|
0x80
);
/* enable cpuid */
setCx86
(
CX86_CCR3
,
ccr3
);
/* disable MAPEN */
setCx86
(
CX86_CCR3
,
ccr3
);
/* disable MAPEN */
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
}
}
...
...
include/asm-x86/processor-cyrix.h
浏览文件 @
026e2c05
...
@@ -28,3 +28,11 @@ static inline void setCx86(u8 reg, u8 data)
...
@@ -28,3 +28,11 @@ static inline void setCx86(u8 reg, u8 data)
outb
(
reg
,
0x22
);
outb
(
reg
,
0x22
);
outb
(
data
,
0x23
);
outb
(
data
,
0x23
);
}
}
#define getCx86_old(reg) ({ outb((reg), 0x22); inb(0x23); })
#define setCx86_old(reg, data) do { \
outb((reg), 0x22); \
outb((data), 0x23); \
} while (0)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录