Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
ffddfee3
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看板
提交
ffddfee3
编写于
6月 20, 2004
作者:
B
bellard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added cpu_reset()
git-svn-id:
svn://svn.savannah.nongnu.org/qemu/trunk@940
c046a42c-6fe2-441c-8c8c-71466251a162
上级
a2f659ee
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
29 deletion
+38
-29
target-i386/cpu.h
target-i386/cpu.h
+1
-0
target-i386/helper2.c
target-i386/helper2.c
+37
-29
未找到文件。
target-i386/cpu.h
浏览文件 @
ffddfee3
...
@@ -352,6 +352,7 @@ typedef struct CPUX86State {
...
@@ -352,6 +352,7 @@ typedef struct CPUX86State {
CPUTLBEntry
tlb_read
[
2
][
CPU_TLB_SIZE
];
CPUTLBEntry
tlb_read
[
2
][
CPU_TLB_SIZE
];
CPUTLBEntry
tlb_write
[
2
][
CPU_TLB_SIZE
];
CPUTLBEntry
tlb_write
[
2
][
CPU_TLB_SIZE
];
/* from this point: preserved by CPU reset */
/* ice debug support */
/* ice debug support */
uint32_t
breakpoints
[
MAX_BREAKPOINTS
];
uint32_t
breakpoints
[
MAX_BREAKPOINTS
];
int
nb_breakpoints
;
int
nb_breakpoints
;
...
...
target-i386/helper2.c
浏览文件 @
ffddfee3
...
@@ -45,7 +45,6 @@ _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
...
@@ -45,7 +45,6 @@ _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
CPUX86State
*
cpu_x86_init
(
void
)
CPUX86State
*
cpu_x86_init
(
void
)
{
{
CPUX86State
*
env
;
CPUX86State
*
env
;
int
i
;
static
int
inited
;
static
int
inited
;
cpu_exec_init
();
cpu_exec_init
();
...
@@ -54,10 +53,46 @@ CPUX86State *cpu_x86_init(void)
...
@@ -54,10 +53,46 @@ CPUX86State *cpu_x86_init(void)
if
(
!
env
)
if
(
!
env
)
return
NULL
;
return
NULL
;
memset
(
env
,
0
,
sizeof
(
CPUX86State
));
memset
(
env
,
0
,
sizeof
(
CPUX86State
));
/* init various static tables */
if
(
!
inited
)
{
inited
=
1
;
optimize_flags_init
();
}
#ifdef USE_CODE_COPY
/* testing code for code copy case */
{
struct
modify_ldt_ldt_s
ldt
;
/* init to reset state */
ldt
.
entry_number
=
1
;
ldt
.
base_addr
=
(
unsigned
long
)
env
;
ldt
.
limit
=
(
sizeof
(
CPUState
)
+
0xfff
)
>>
12
;
ldt
.
seg_32bit
=
1
;
ldt
.
contents
=
MODIFY_LDT_CONTENTS_DATA
;
ldt
.
read_exec_only
=
0
;
ldt
.
limit_in_pages
=
1
;
ldt
.
seg_not_present
=
0
;
ldt
.
useable
=
1
;
modify_ldt
(
1
,
&
ldt
,
sizeof
(
ldt
));
/* write ldt entry */
asm
volatile
(
"movl %0, %%fs"
:
:
"r"
((
1
<<
3
)
|
7
));
cpu_single_env
=
env
;
}
#endif
cpu_reset
(
env
);
return
env
;
}
/* NOTE: must be called outside the CPU execute loop */
void
cpu_reset
(
CPUX86State
*
env
)
{
int
i
;
memset
(
env
,
0
,
offsetof
(
CPUX86State
,
breakpoints
));
tlb_flush
(
env
,
1
);
tlb_flush
(
env
,
1
);
/* init to reset state */
#ifdef CONFIG_SOFTMMU
#ifdef CONFIG_SOFTMMU
env
->
hflags
|=
HF_SOFTMMU_MASK
;
env
->
hflags
|=
HF_SOFTMMU_MASK
;
#endif
#endif
...
@@ -89,33 +124,6 @@ CPUX86State *cpu_x86_init(void)
...
@@ -89,33 +124,6 @@ CPUX86State *cpu_x86_init(void)
for
(
i
=
0
;
i
<
8
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
env
->
fptags
[
i
]
=
1
;
env
->
fptags
[
i
]
=
1
;
env
->
fpuc
=
0x37f
;
env
->
fpuc
=
0x37f
;
/* init various static tables */
if
(
!
inited
)
{
inited
=
1
;
optimize_flags_init
();
}
#ifdef USE_CODE_COPY
/* testing code for code copy case */
{
struct
modify_ldt_ldt_s
ldt
;
ldt
.
entry_number
=
1
;
ldt
.
base_addr
=
(
unsigned
long
)
env
;
ldt
.
limit
=
(
sizeof
(
CPUState
)
+
0xfff
)
>>
12
;
ldt
.
seg_32bit
=
1
;
ldt
.
contents
=
MODIFY_LDT_CONTENTS_DATA
;
ldt
.
read_exec_only
=
0
;
ldt
.
limit_in_pages
=
1
;
ldt
.
seg_not_present
=
0
;
ldt
.
useable
=
1
;
modify_ldt
(
1
,
&
ldt
,
sizeof
(
ldt
));
/* write ldt entry */
asm
volatile
(
"movl %0, %%fs"
:
:
"r"
((
1
<<
3
)
|
7
));
cpu_single_env
=
env
;
}
#endif
return
env
;
}
}
void
cpu_x86_close
(
CPUX86State
*
env
)
void
cpu_x86_close
(
CPUX86State
*
env
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录