Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
5b450407
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看板
提交
5b450407
编写于
4月 18, 2011
作者:
R
Richard Henderson
提交者:
Richard Henderson
5月 31, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
target-alpha: Trap for unassigned and unaligned addresses.
Signed-off-by:
N
Richard Henderson
<
rth@twiddle.net
>
上级
fa6e0a63
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
38 addition
and
8 deletion
+38
-8
exec-all.h
exec-all.h
+1
-1
exec.c
exec.c
+6
-6
target-alpha/cpu.h
target-alpha/cpu.h
+5
-1
target-alpha/op_helper.c
target-alpha/op_helper.c
+26
-0
未找到文件。
exec-all.h
浏览文件 @
5b450407
...
...
@@ -325,7 +325,7 @@ static inline tb_page_addr_t get_page_addr_code(CPUState *env1, target_ulong add
}
pd
=
env1
->
tlb_table
[
mmu_idx
][
page_index
].
addr_code
&
~
TARGET_PAGE_MASK
;
if
(
pd
>
IO_MEM_ROM
&&
!
(
pd
&
IO_MEM_ROMD
))
{
#if defined(TARGET_
SPARC) || defined(TARGET_MIPS
)
#if defined(TARGET_
ALPHA) || defined(TARGET_MIPS) || defined(TARGET_SPARC
)
do_unassigned_access
(
addr
,
0
,
1
,
0
,
4
);
#else
cpu_abort
(
env1
,
"Trying to execute code outside RAM or ROM at 0x"
TARGET_FMT_lx
"
\n
"
,
addr
);
...
...
exec.c
浏览文件 @
5b450407
...
...
@@ -3181,7 +3181,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) || defined(TARGET_MICROBLAZE)
#if defined(TARGET_
ALPHA) || defined(TARGET_
SPARC) || defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
0
,
0
,
0
,
1
);
#endif
return
0
;
...
...
@@ -3192,7 +3192,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) || defined(TARGET_MICROBLAZE)
#if defined(TARGET_
ALPHA) || defined(TARGET_
SPARC) || defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
0
,
0
,
0
,
2
);
#endif
return
0
;
...
...
@@ -3203,7 +3203,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) || defined(TARGET_MICROBLAZE)
#if defined(TARGET_
ALPHA) || defined(TARGET_
SPARC) || defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
0
,
0
,
0
,
4
);
#endif
return
0
;
...
...
@@ -3214,7 +3214,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) || defined(TARGET_MICROBLAZE)
#if defined(TARGET_
ALPHA) || defined(TARGET_
SPARC) || defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
1
,
0
,
0
,
1
);
#endif
}
...
...
@@ -3224,7 +3224,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) || defined(TARGET_MICROBLAZE)
#if defined(TARGET_
ALPHA) || defined(TARGET_
SPARC) || defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
1
,
0
,
0
,
2
);
#endif
}
...
...
@@ -3234,7 +3234,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) || defined(TARGET_MICROBLAZE)
#if defined(TARGET_
ALPHA) || defined(TARGET_
SPARC) || defined(TARGET_MICROBLAZE)
do_unassigned_access
(
addr
,
1
,
0
,
0
,
4
);
#endif
}
...
...
target-alpha/cpu.h
浏览文件 @
5b450407
...
...
@@ -434,7 +434,11 @@ void do_interrupt (CPUState *env);
uint64_t
cpu_alpha_load_fpcr
(
CPUState
*
env
);
void
cpu_alpha_store_fpcr
(
CPUState
*
env
,
uint64_t
val
);
extern
void
swap_shadow_regs
(
CPUState
*
env
);
#ifndef CONFIG_USER_ONLY
void
swap_shadow_regs
(
CPUState
*
env
);
extern
QEMU_NORETURN
void
do_unassigned_access
(
target_phys_addr_t
addr
,
int
,
int
,
int
,
int
);
#endif
/* Bits in TB->FLAGS that control how translation is processed. */
enum
{
...
...
target-alpha/op_helper.c
浏览文件 @
5b450407
...
...
@@ -1265,7 +1265,33 @@ uint64_t helper_stq_c_phys(uint64_t p, uint64_t v)
return
ret
;
}
static
void
QEMU_NORETURN
do_unaligned_access
(
target_ulong
addr
,
int
is_write
,
int
is_user
,
void
*
retaddr
)
{
uint64_t
pc
;
uint32_t
insn
;
do_restore_state
(
retaddr
);
pc
=
env
->
pc
;
insn
=
ldl_code
(
pc
);
env
->
trap_arg0
=
addr
;
env
->
trap_arg1
=
insn
>>
26
;
/* opcode */
env
->
trap_arg2
=
(
insn
>>
21
)
&
31
;
/* dest regno */
helper_excp
(
EXCP_UNALIGN
,
0
);
}
void
QEMU_NORETURN
do_unassigned_access
(
target_phys_addr_t
addr
,
int
is_write
,
int
is_exec
,
int
unused
,
int
size
)
{
env
->
trap_arg0
=
addr
;
env
->
trap_arg1
=
is_write
;
dynamic_excp
(
EXCP_MCHK
,
0
);
}
#define MMUSUFFIX _mmu
#define ALIGNED_ONLY
#define SHIFT 0
#include "softmmu_template.h"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录