Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
26e92f65
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看板
提交
26e92f65
编写于
11月 13, 2009
作者:
P
Paul Brook
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Realview/EB procid hacks
Guess core tile ID based on CPU type. Signed-off-by:
N
Paul Brook
<
paul@codesourcery.com
>
上级
dbe73d7f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
6 deletion
+18
-6
hw/arm_sysctl.c
hw/arm_sysctl.c
+5
-3
hw/primecell.h
hw/primecell.h
+1
-1
hw/realview.c
hw/realview.c
+11
-1
hw/versatilepb.c
hw/versatilepb.c
+1
-1
未找到文件。
hw/arm_sysctl.c
浏览文件 @
26e92f65
...
...
@@ -25,6 +25,7 @@ typedef struct {
uint32_t
flags
;
uint32_t
nvflags
;
uint32_t
resetlevel
;
uint32_t
proc_id
;
}
arm_sysctl_state
;
static
void
arm_sysctl_reset
(
DeviceState
*
d
)
...
...
@@ -89,8 +90,7 @@ static uint32_t arm_sysctl_read(void *opaque, target_phys_addr_t offset)
case
0x60
:
/* MISC */
return
0
;
case
0x84
:
/* PROCID0 */
/* ??? Don't know what the proper value for the core tile ID is. */
return
0x02000000
;
return
s
->
proc_id
;
case
0x88
:
/* PROCID1 */
return
0xff000000
;
case
0x64
:
/* DMAPSR0 */
...
...
@@ -215,13 +215,14 @@ static int arm_sysctl_init1(SysBusDevice *dev)
}
/* Legacy helper function. */
void
arm_sysctl_init
(
uint32_t
base
,
uint32_t
sys_id
)
void
arm_sysctl_init
(
uint32_t
base
,
uint32_t
sys_id
,
uint32_t
proc_id
)
{
DeviceState
*
dev
;
dev
=
qdev_create
(
NULL
,
"realview_sysctl"
);
qdev_prop_set_uint32
(
dev
,
"sys_id"
,
sys_id
);
qdev_init_nofail
(
dev
);
qdev_prop_set_uint32
(
dev
,
"proc_id"
,
proc_id
);
sysbus_mmio_map
(
sysbus_from_qdev
(
dev
),
0
,
base
);
}
...
...
@@ -232,6 +233,7 @@ static SysBusDeviceInfo arm_sysctl_info = {
.
qdev
.
reset
=
arm_sysctl_reset
,
.
qdev
.
props
=
(
Property
[])
{
DEFINE_PROP_UINT32
(
"sys_id"
,
arm_sysctl_state
,
sys_id
,
0
),
DEFINE_PROP_UINT32
(
"proc_id"
,
arm_sysctl_state
,
proc_id
,
0
),
DEFINE_PROP_END_OF_LIST
(),
}
};
...
...
hw/primecell.h
浏览文件 @
26e92f65
...
...
@@ -9,6 +9,6 @@
void
*
pl080_init
(
uint32_t
base
,
qemu_irq
irq
,
int
nchannels
);
/* arm_sysctl.c */
void
arm_sysctl_init
(
uint32_t
base
,
uint32_t
sys_id
);
void
arm_sysctl_init
(
uint32_t
base
,
uint32_t
sys_id
,
uint32_t
proc_id
);
#endif
hw/realview.c
浏览文件 @
26e92f65
...
...
@@ -51,6 +51,7 @@ static void realview_init(ram_addr_t ram_size,
int
done_smc
=
0
;
qemu_irq
cpu_irq
[
4
];
int
ncpu
;
uint32_t
proc_id
=
0
;
if
(
!
cpu_model
)
cpu_model
=
"arm926"
;
...
...
@@ -73,13 +74,22 @@ static void realview_init(ram_addr_t ram_size,
qemu_register_reset
(
secondary_cpu_reset
,
env
);
}
}
if
(
arm_feature
(
env
,
ARM_FEATURE_V7
))
{
proc_id
=
0x0e000000
;
}
else
if
(
arm_feature
(
env
,
ARM_FEATURE_V6K
))
{
proc_id
=
0x06000000
;
}
else
if
(
arm_feature
(
env
,
ARM_FEATURE_V6
))
{
proc_id
=
0x04000000
;
}
else
{
proc_id
=
0x02000000
;
}
ram_offset
=
qemu_ram_alloc
(
ram_size
);
/* ??? RAM should repeat to fill physical memory space. */
/* SDRAM at address zero. */
cpu_register_physical_memory
(
0
,
ram_size
,
ram_offset
|
IO_MEM_RAM
);
arm_sysctl_init
(
0x10000000
,
0xc1400400
);
arm_sysctl_init
(
0x10000000
,
0xc1400400
,
proc_id
);
if
(
ncpu
==
1
)
{
/* ??? The documentation says GIC1 is nFIQ and either GIC2 or GIC3
...
...
hw/versatilepb.c
浏览文件 @
26e92f65
...
...
@@ -184,7 +184,7 @@ static void versatile_init(ram_addr_t ram_size,
/* SDRAM at address zero. */
cpu_register_physical_memory
(
0
,
ram_size
,
ram_offset
|
IO_MEM_RAM
);
arm_sysctl_init
(
0x10000000
,
0x41007004
);
arm_sysctl_init
(
0x10000000
,
0x41007004
,
0x02000000
);
cpu_pic
=
arm_pic_init_cpu
(
env
);
dev
=
sysbus_create_varargs
(
"pl190"
,
0x10140000
,
cpu_pic
[
0
],
cpu_pic
[
1
],
NULL
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录