Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
639b0ae7
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
639b0ae7
编写于
9月 06, 2008
作者:
R
Russell King
提交者:
Russell King
10月 01, 2008
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ARM] Convert ARMv6 and ARMv7 to use new memory types
Signed-off-by:
N
Russell King
<
rmk+kernel@arm.linux.org.uk
>
上级
9e8b5199
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
40 addition
and
18 deletion
+40
-18
arch/arm/include/asm/pgtable.h
arch/arm/include/asm/pgtable.h
+2
-6
arch/arm/mm/mmu.c
arch/arm/mm/mmu.c
+0
-4
arch/arm/mm/proc-macros.S
arch/arm/mm/proc-macros.S
+28
-2
arch/arm/mm/proc-v6.S
arch/arm/mm/proc-v6.S
+3
-1
arch/arm/mm/proc-v7.S
arch/arm/mm/proc-v7.S
+3
-1
arch/arm/mm/proc-xsc3.S
arch/arm/mm/proc-xsc3.S
+2
-2
arch/arm/mm/proc-xscale.S
arch/arm/mm/proc-xscale.S
+2
-2
未找到文件。
arch/arm/include/asm/pgtable.h
浏览文件 @
639b0ae7
...
...
@@ -175,8 +175,6 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
/*
* These are the memory types, defined to be compatible with
* pre-ARMv6 CPUs cacheable and bufferable bits: XXCB
* (note: build_mem_type_table modifies these bits
* to work with our existing proc-*.S setup.)
*/
#define L_PTE_MT_UNCACHED (0x00 << 2)
/* 0000 */
#define L_PTE_MT_BUFFERABLE (0x01 << 2)
/* 0001 */
...
...
@@ -184,12 +182,10 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
#define L_PTE_MT_WRITEBACK (0x03 << 2)
/* 0011 */
#define L_PTE_MT_MINICACHE (0x06 << 2)
/* 0110 (sa1100, xscale) */
#define L_PTE_MT_WRITEALLOC (0x07 << 2)
/* 0111 */
#define L_PTE_MT_DEV_SHARED (0x04 << 2)
/* 0100 (pre-v6) */
#define L_PTE_MT_DEV_SHARED2 (0x05 << 2)
/* 0101 (v6) */
#define L_PTE_MT_DEV_SHARED (0x04 << 2)
/* 0100 */
#define L_PTE_MT_DEV_NONSHARED (0x0c << 2)
/* 1100 */
#define L_PTE_MT_DEV_IXP2000 (0x0d << 2)
/* 1101 */
#define L_PTE_MT_DEV_WC (0x09 << 2)
/* 1001 (pre-v6) */
#define L_PTE_MT_DEV_WC2 (0x08 << 2)
/* 1000 (v6) */
#define L_PTE_MT_DEV_WC (0x09 << 2)
/* 1001 */
#define L_PTE_MT_DEV_CACHED (0x0b << 2)
/* 1011 */
#define L_PTE_MT_MASK (0x0f << 2)
...
...
arch/arm/mm/mmu.c
浏览文件 @
639b0ae7
...
...
@@ -194,7 +194,6 @@ static struct mem_type mem_types[] = {
},
[
MT_DEVICE_NONSHARED
]
=
{
/* ARMv6 non-shared device */
.
prot_pte
=
PROT_PTE_DEVICE
|
L_PTE_MT_DEV_NONSHARED
,
.
prot_pte_ext
=
PTE_EXT_TEX
(
2
),
.
prot_l1
=
PMD_TYPE_TABLE
,
.
prot_sect
=
PROT_SECT_DEVICE
|
PMD_SECT_TEX
(
2
),
.
domain
=
DOMAIN_IO
,
...
...
@@ -289,8 +288,6 @@ static void __init build_mem_type_table(void)
* in xsc3 parlance, Uncached Normal in ARMv6 parlance).
*/
if
(
cpu_is_xsc3
()
||
cpu_arch
>=
CPU_ARCH_ARMv6
)
{
mem_types
[
MT_DEVICE_WC
].
prot_pte_ext
|=
PTE_EXT_TEX
(
1
);
mem_types
[
MT_DEVICE_WC
].
prot_pte
&=
~
L_PTE_BUFFERABLE
;
mem_types
[
MT_DEVICE_WC
].
prot_sect
|=
PMD_SECT_TEX
(
1
);
mem_types
[
MT_DEVICE_WC
].
prot_sect
&=
~
PMD_SECT_BUFFERABLE
;
}
...
...
@@ -351,7 +348,6 @@ static void __init build_mem_type_table(void)
/*
* Mark the device area as "shared device"
*/
mem_types
[
MT_DEVICE
].
prot_pte
|=
L_PTE_BUFFERABLE
;
mem_types
[
MT_DEVICE
].
prot_sect
|=
PMD_SECT_BUFFERED
;
#ifdef CONFIG_SMP
...
...
arch/arm/mm/proc-macros.S
浏览文件 @
639b0ae7
...
...
@@ -104,14 +104,38 @@
*
11
x0
0
1
0
r
/
w
r
/
o
*
1111
0
1
1
r
/
w
r
/
w
*/
.
macro
armv6_set_pte_ext
.
macro
armv6_mt_table
pfx
\
pfx
\()
_mt_table
:
.
long
0x00
@
L_PTE_MT_UNCACHED
.
long
PTE_EXT_TEX
(
1
)
@
L_PTE_MT_BUFFERABLE
.
long
PTE_CACHEABLE
@
L_PTE_MT_WRITETHROUGH
.
long
PTE_CACHEABLE
|
PTE_BUFFERABLE
@
L_PTE_MT_WRITEBACK
.
long
PTE_BUFFERABLE
@
L_PTE_MT_DEV_SHARED
.
long
0x00
@
unused
.
long
0x00
@
L_PTE_MT_MINICACHE
(
not
present
)
.
long
PTE_EXT_TEX
(
1
)
| PTE_CACHEABLE |
PTE_BUFFERABLE
@
L_PTE_MT_WRITEALLOC
.
long
0x00
@
unused
.
long
PTE_EXT_TEX
(
1
)
@
L_PTE_MT_DEV_WC
.
long
0x00
@
unused
.
long
PTE_CACHEABLE
|
PTE_BUFFERABLE
@
L_PTE_MT_DEV_CACHED
.
long
PTE_EXT_TEX
(
2
)
@
L_PTE_MT_DEV_NONSHARED
.
long
0x00
@
L_PTE_MT_DEV_IXP2000
.
long
0x00
@
unused
.
long
0x00
@
unused
.
endm
.
macro
armv6_set_pte_ext
pfx
str
r1
,
[
r0
],
#-
2048
@
linux
version
bic
r3
,
r1
,
#
0x000003f
0
bic
r3
,
r1
,
#
0x000003f
c
bic
r3
,
r3
,
#
PTE_TYPE_MASK
orr
r3
,
r3
,
r2
orr
r3
,
r3
,
#
PTE_EXT_AP0
|
2
adr
ip
,
\
pfx
\
()
_mt_table
and
r2
,
r1
,
#
L_PTE_MT_MASK
ldr
r2
,
[
ip
,
r2
]
tst
r1
,
#
L_PTE_WRITE
tstne
r1
,
#
L_PTE_DIRTY
orreq
r3
,
r3
,
#
PTE_EXT_APX
...
...
@@ -124,6 +148,8 @@
tst
r1
,
#
L_PTE_EXEC
orreq
r3
,
r3
,
#
PTE_EXT_XN
orr
r3
,
r3
,
r2
tst
r1
,
#
L_PTE_YOUNG
tstne
r1
,
#
L_PTE_PRESENT
moveq
r3
,
#
0
...
...
arch/arm/mm/proc-v6.S
浏览文件 @
639b0ae7
...
...
@@ -115,9 +115,11 @@ ENTRY(cpu_v6_switch_mm)
*
-
pte
-
PTE
value
to
store
*
-
ext
-
value
for
extended
PTE
bits
*/
armv6_mt_table
cpu_v6
ENTRY
(
cpu_v6_set_pte_ext
)
#ifdef CONFIG_MMU
armv6_set_pte_ext
armv6_set_pte_ext
cpu_v6
#endif
mov
pc
,
lr
...
...
arch/arm/mm/proc-v7.S
浏览文件 @
639b0ae7
...
...
@@ -100,9 +100,11 @@ ENTRY(cpu_v7_switch_mm)
*
-
pte
-
PTE
value
to
store
*
-
ext
-
value
for
extended
PTE
bits
*/
armv6_mt_table
cpu_v7
ENTRY
(
cpu_v7_set_pte_ext
)
#ifdef CONFIG_MMU
armv6_set_pte_ext
armv6_set_pte_ext
cpu_v7
#endif
mov
pc
,
lr
...
...
arch/arm/mm/proc-xsc3.S
浏览文件 @
639b0ae7
...
...
@@ -354,10 +354,10 @@ cpu_xsc3_mt_table:
.
long
PTE_EXT_TEX
(
5
)
|
PTE_CACHEABLE
@
L_PTE_MT_WRITETHROUGH
.
long
PTE_EXT_TEX
(
5
)
| PTE_CACHEABLE |
PTE_BUFFERABLE
@
L_PTE_MT_WRITEBACK
.
long
0x00
@
L_PTE_MT_DEV_SHARED
.
long
0x00
@
L_PTE_MT_DEV_SHARED2
.
long
0x00
@
unused
.
long
0x00
@
L_PTE_MT_MINICACHE
(
not
present
)
.
long
PTE_EXT_TEX
(
5
)
| PTE_CACHEABLE |
PTE_BUFFERABLE
@
L_PTE_MT_WRITEALLOC
(
not
present
?)
.
long
PTE_EXT_TEX
(
1
)
@
L_PTE_MT_DEV_WC2
.
long
0x00
@
unused
.
long
PTE_EXT_TEX
(
1
)
@
L_PTE_MT_DEV_WC
.
long
0x00
@
unused
.
long
PTE_EXT_TEX
(
5
)
| PTE_CACHEABLE |
PTE_BUFFERABLE
@
L_PTE_MT_DEV_CACHED
...
...
arch/arm/mm/proc-xscale.S
浏览文件 @
639b0ae7
...
...
@@ -435,10 +435,10 @@ cpu_xscale_mt_table:
.
long
PTE_CACHEABLE
@
L_PTE_MT_WRITETHROUGH
.
long
PTE_CACHEABLE
|
PTE_BUFFERABLE
@
L_PTE_MT_WRITEBACK
.
long
0x00
@
L_PTE_MT_DEV_SHARED
.
long
0x00
@
L_PTE_MT_DEV_SHARED2
.
long
0x00
@
unused
.
long
PTE_EXT_TEX
(
1
)
|
PTE_CACHEABLE
@
L_PTE_MT_MINICACHE
.
long
PTE_EXT_TEX
(
1
)
| PTE_CACHEABLE |
PTE_BUFFERABLE
@
L_PTE_MT_WRITEALLOC
.
long
PTE_BUFFERABLE
@
L_PTE_MT_DEV_WC2
.
long
0x00
@
unused
.
long
PTE_BUFFERABLE
@
L_PTE_MT_DEV_WC
.
long
0x00
@
unused
.
long
PTE_CACHEABLE
|
PTE_BUFFERABLE
@
L_PTE_MT_DEV_CACHED
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录