Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
2dfcca9f
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2dfcca9f
编写于
11月 05, 2017
作者:
R
Richard Henderson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
target/hppa: Implement LPA
Signed-off-by:
N
Richard Henderson
<
richard.henderson@linaro.org
>
上级
d0a851cc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
58 addition
and
5 deletion
+58
-5
target/hppa/cpu.h
target/hppa/cpu.h
+1
-0
target/hppa/helper.h
target/hppa/helper.h
+1
-0
target/hppa/mem_helper.c
target/hppa/mem_helper.c
+21
-0
target/hppa/op_helper.c
target/hppa/op_helper.c
+5
-5
target/hppa/translate.c
target/hppa/translate.c
+30
-0
未找到文件。
target/hppa/cpu.h
浏览文件 @
2dfcca9f
...
...
@@ -345,5 +345,6 @@ int hppa_get_physical_address(CPUHPPAState *env, vaddr addr, int mmu_idx,
extern
const
MemoryRegionOps
hppa_io_eir_ops
;
void
hppa_cpu_alarm_timer
(
void
*
);
#endif
void
QEMU_NORETURN
hppa_dynamic_excp
(
CPUHPPAState
*
env
,
int
excp
,
uintptr_t
ra
);
#endif
/* HPPA_CPU_H */
target/hppa/helper.h
浏览文件 @
2dfcca9f
...
...
@@ -90,4 +90,5 @@ DEF_HELPER_FLAGS_3(itlba, TCG_CALL_NO_RWG, void, env, tl, tr)
DEF_HELPER_FLAGS_3
(
itlbp
,
TCG_CALL_NO_RWG
,
void
,
env
,
tl
,
tr
)
DEF_HELPER_FLAGS_2
(
ptlb
,
TCG_CALL_NO_RWG
,
void
,
env
,
tl
)
DEF_HELPER_FLAGS_1
(
ptlbe
,
TCG_CALL_NO_RWG
,
void
,
env
)
DEF_HELPER_FLAGS_2
(
lpa
,
TCG_CALL_NO_WG
,
tr
,
env
,
tl
)
#endif
target/hppa/mem_helper.c
浏览文件 @
2dfcca9f
...
...
@@ -314,4 +314,25 @@ void HELPER(ptlbe)(CPUHPPAState *env)
memset
(
env
->
tlb
,
0
,
sizeof
(
env
->
tlb
));
tlb_flush_by_mmuidx
(
src
,
0xf
);
}
target_ureg
HELPER
(
lpa
)(
CPUHPPAState
*
env
,
target_ulong
addr
)
{
hwaddr
phys
;
int
prot
,
excp
;
excp
=
hppa_get_physical_address
(
env
,
addr
,
MMU_KERNEL_IDX
,
0
,
&
phys
,
&
prot
);
if
(
excp
>=
0
)
{
if
(
env
->
psw
&
PSW_Q
)
{
/* ??? Needs tweaking for hppa64. */
env
->
cr
[
CR_IOR
]
=
addr
;
env
->
cr
[
CR_ISR
]
=
addr
>>
32
;
}
if
(
excp
==
EXCP_DTLB_MISS
)
{
excp
=
EXCP_NA_DTLB_MISS
;
}
hppa_dynamic_excp
(
env
,
excp
,
GETPC
());
}
return
phys
;
}
#endif
/* CONFIG_USER_ONLY */
target/hppa/op_helper.c
浏览文件 @
2dfcca9f
...
...
@@ -34,7 +34,7 @@ void QEMU_NORETURN HELPER(excp)(CPUHPPAState *env, int excp)
cpu_loop_exit
(
cs
);
}
static
void
QEMU_NORETURN
dyn
excp
(
CPUHPPAState
*
env
,
int
excp
,
uintptr_t
ra
)
void
QEMU_NORETURN
hppa_dynamic_
excp
(
CPUHPPAState
*
env
,
int
excp
,
uintptr_t
ra
)
{
HPPACPU
*
cpu
=
hppa_env_get_cpu
(
env
);
CPUState
*
cs
=
CPU
(
cpu
);
...
...
@@ -46,14 +46,14 @@ static void QEMU_NORETURN dynexcp(CPUHPPAState *env, int excp, uintptr_t ra)
void
HELPER
(
tsv
)(
CPUHPPAState
*
env
,
target_ureg
cond
)
{
if
(
unlikely
((
target_sreg
)
cond
<
0
))
{
dyn
excp
(
env
,
EXCP_OVERFLOW
,
GETPC
());
hppa_dynamic_
excp
(
env
,
EXCP_OVERFLOW
,
GETPC
());
}
}
void
HELPER
(
tcond
)(
CPUHPPAState
*
env
,
target_ureg
cond
)
{
if
(
unlikely
(
cond
))
{
dyn
excp
(
env
,
EXCP_COND
,
GETPC
());
hppa_dynamic_
excp
(
env
,
EXCP_COND
,
GETPC
());
}
}
...
...
@@ -237,7 +237,7 @@ static void update_fr0_op(CPUHPPAState *env, uintptr_t ra)
env
->
fr
[
0
]
=
(
uint64_t
)
shadow
<<
32
;
if
(
hard_exp
&
shadow
)
{
dyn
excp
(
env
,
EXCP_ASSIST
,
ra
);
hppa_dynamic_
excp
(
env
,
EXCP_ASSIST
,
ra
);
}
}
...
...
@@ -645,7 +645,7 @@ target_ureg HELPER(swap_system_mask)(CPUHPPAState *env, target_ureg nsm)
/* ??? On second reading this condition simply seems
to be undefined rather than a diagnosed trap. */
if
(
nsm
&
~
psw
&
PSW_Q
)
{
dyn
excp
(
env
,
EXCP_ILL
,
GETPC
());
hppa_dynamic_
excp
(
env
,
EXCP_ILL
,
GETPC
());
}
env
->
psw
=
(
psw
&
~
PSW_SM
)
|
(
nsm
&
PSW_SM
);
return
psw
&
PSW_SM
;
...
...
target/hppa/translate.c
浏览文件 @
2dfcca9f
...
...
@@ -2433,6 +2433,35 @@ static DisasJumpType trans_pxtlbx(DisasContext *ctx, uint32_t insn,
return
nullify_end
(
ctx
,
!
is_data
&&
(
ctx
->
base
.
tb
->
flags
&
PSW_C
)
?
DISAS_IAQ_N_STALE
:
DISAS_NEXT
);
}
static
DisasJumpType
trans_lpa
(
DisasContext
*
ctx
,
uint32_t
insn
,
const
DisasInsn
*
di
)
{
unsigned
rt
=
extract32
(
insn
,
0
,
5
);
unsigned
m
=
extract32
(
insn
,
5
,
1
);
unsigned
sp
=
extract32
(
insn
,
14
,
2
);
unsigned
rx
=
extract32
(
insn
,
16
,
5
);
unsigned
rb
=
extract32
(
insn
,
21
,
5
);
TCGv_tl
vaddr
;
TCGv_reg
ofs
,
paddr
;
CHECK_MOST_PRIVILEGED
(
EXCP_PRIV_OPR
);
nullify_over
(
ctx
);
form_gva
(
ctx
,
&
vaddr
,
&
ofs
,
rb
,
rx
,
0
,
0
,
sp
,
m
,
false
);
paddr
=
tcg_temp_new
();
gen_helper_lpa
(
paddr
,
cpu_env
,
vaddr
);
/* Note that physical address result overrides base modification. */
if
(
m
)
{
save_gpr
(
ctx
,
rb
,
ofs
);
}
save_gpr
(
ctx
,
rt
,
paddr
);
tcg_temp_free
(
paddr
);
return
nullify_end
(
ctx
,
DISAS_NEXT
);
}
#endif
/* !CONFIG_USER_ONLY */
static
const
DisasInsn
table_mem_mgmt
[]
=
{
...
...
@@ -2460,6 +2489,7 @@ static const DisasInsn table_mem_mgmt[] = {
{
0x04000240u
,
0xfc001fdfu
,
trans_pxtlbx
},
/* pitlbe */
{
0x04001200u
,
0xfc001fdfu
,
trans_pxtlbx
},
/* pdtlb */
{
0x04001240u
,
0xfc001fdfu
,
trans_pxtlbx
},
/* pdtlbe */
{
0x04001340u
,
0xfc003fc0u
,
trans_lpa
},
#endif
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录