Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
faed1c2a
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
faed1c2a
编写于
9月 03, 2009
作者:
E
Edgar E. Iglesias
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
microblaze: Trap on bus accesses to unmapped areas.
Signed-off-by:
N
Edgar E. Iglesias
<
edgar.iglesias@gmail.com
>
上级
3c50a71f
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
36 addition
and
6 deletion
+36
-6
exec.c
exec.c
+6
-6
target-microblaze/cpu.h
target-microblaze/cpu.h
+3
-0
target-microblaze/op_helper.c
target-microblaze/op_helper.c
+27
-0
未找到文件。
exec.c
浏览文件 @
faed1c2a
...
...
@@ -2492,7 +2492,7 @@ static uint32_t unassigned_mem_readb(void *opaque, target_phys_addr_t addr)
#ifdef DEBUG_UNASSIGNED
printf
(
"Unassigned mem read "
TARGET_FMT_plx
"
\n
"
,
addr
);
#endif
#if defined(TARGET_SPARC)
#if defined(TARGET_SPARC)
|| defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
0
,
0
,
0
,
1
);
#endif
return
0
;
...
...
@@ -2503,7 +2503,7 @@ static uint32_t unassigned_mem_readw(void *opaque, target_phys_addr_t addr)
#ifdef DEBUG_UNASSIGNED
printf
(
"Unassigned mem read "
TARGET_FMT_plx
"
\n
"
,
addr
);
#endif
#if defined(TARGET_SPARC)
#if defined(TARGET_SPARC)
|| defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
0
,
0
,
0
,
2
);
#endif
return
0
;
...
...
@@ -2514,7 +2514,7 @@ static uint32_t unassigned_mem_readl(void *opaque, target_phys_addr_t addr)
#ifdef DEBUG_UNASSIGNED
printf
(
"Unassigned mem read "
TARGET_FMT_plx
"
\n
"
,
addr
);
#endif
#if defined(TARGET_SPARC)
#if defined(TARGET_SPARC)
|| defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
0
,
0
,
0
,
4
);
#endif
return
0
;
...
...
@@ -2525,7 +2525,7 @@ static void unassigned_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_
#ifdef DEBUG_UNASSIGNED
printf
(
"Unassigned mem write "
TARGET_FMT_plx
" = 0x%x
\n
"
,
addr
,
val
);
#endif
#if defined(TARGET_SPARC)
#if defined(TARGET_SPARC)
|| defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
1
,
0
,
0
,
1
);
#endif
}
...
...
@@ -2535,7 +2535,7 @@ static void unassigned_mem_writew(void *opaque, target_phys_addr_t addr, uint32_
#ifdef DEBUG_UNASSIGNED
printf
(
"Unassigned mem write "
TARGET_FMT_plx
" = 0x%x
\n
"
,
addr
,
val
);
#endif
#if defined(TARGET_SPARC)
#if defined(TARGET_SPARC)
|| defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
1
,
0
,
0
,
2
);
#endif
}
...
...
@@ -2545,7 +2545,7 @@ static void unassigned_mem_writel(void *opaque, target_phys_addr_t addr, uint32_
#ifdef DEBUG_UNASSIGNED
printf
(
"Unassigned mem write "
TARGET_FMT_plx
" = 0x%x
\n
"
,
addr
,
val
);
#endif
#if defined(TARGET_SPARC)
#if defined(TARGET_SPARC)
|| defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
1
,
0
,
0
,
4
);
#endif
}
...
...
target-microblaze/cpu.h
浏览文件 @
faed1c2a
...
...
@@ -323,4 +323,7 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
env
->
iflags
|=
env
->
sregs
[
SR_MSR
]
&
MSR_EE
;
*
flags
=
env
->
iflags
&
IFLAGS_TB_MASK
;
}
void
do_unassigned_access
(
target_phys_addr_t
addr
,
int
is_write
,
int
is_exec
,
int
is_asi
,
int
size
);
#endif
target-microblaze/op_helper.c
浏览文件 @
faed1c2a
...
...
@@ -245,3 +245,30 @@ void helper_mmu_write(uint32_t rn, uint32_t v)
mmu_write
(
env
,
rn
,
v
);
}
#endif
void
do_unassigned_access
(
target_phys_addr_t
addr
,
int
is_write
,
int
is_exec
,
int
is_asi
,
int
size
)
{
CPUState
*
saved_env
;
/* XXX: hack to restore env in all cases, even if not called from
generated code */
saved_env
=
env
;
env
=
cpu_single_env
;
qemu_log
(
"Unassigned "
TARGET_FMT_plx
" wr=%d exe=%d
\n
"
,
addr
,
is_write
,
is_exec
);
if
(
!
(
env
->
sregs
[
SR_MSR
]
&
MSR_EE
))
{
return
;
}
if
(
is_exec
)
{
if
(
!
(
env
->
pvr
.
regs
[
2
]
&
PVR2_IOPB_BUS_EXC_MASK
))
{
env
->
sregs
[
SR_ESR
]
=
ESR_EC_INSN_BUS
;
helper_raise_exception
(
EXCP_HW_EXCP
);
}
}
else
{
if
(
!
(
env
->
pvr
.
regs
[
2
]
&
PVR2_DOPB_BUS_EXC_MASK
))
{
env
->
sregs
[
SR_ESR
]
=
ESR_EC_DATA_BUS
;
helper_raise_exception
(
EXCP_HW_EXCP
);
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录