Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
aa9311d8
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看板
提交
aa9311d8
编写于
5月 14, 2009
作者:
P
Paul Brook
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
PL181 qdev conversion
Signed-off-by:
N
Paul Brook
<
paul@codesourcery.com
>
上级
a63bdb31
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
39 deletion
+21
-39
hw/integratorcp.c
hw/integratorcp.c
+1
-7
hw/pl181.c
hw/pl181.c
+17
-9
hw/primecell.h
hw/primecell.h
+0
-4
hw/realview.c
hw/realview.c
+1
-7
hw/versatilepb.c
hw/versatilepb.c
+2
-12
未找到文件。
hw/integratorcp.c
浏览文件 @
aa9311d8
...
...
@@ -458,7 +458,6 @@ static void integratorcp_init(ram_addr_t ram_size,
ram_addr_t
ram_offset
;
qemu_irq
*
pic
;
qemu_irq
*
cpu_pic
;
int
sd
;
if
(
!
cpu_model
)
cpu_model
=
"arm926"
;
...
...
@@ -487,12 +486,7 @@ static void integratorcp_init(ram_addr_t ram_size,
icp_control_init
(
0xcb000000
);
sysbus_create_simple
(
"pl050_keyboard"
,
0x18000000
,
pic
[
3
]);
sysbus_create_simple
(
"pl050_mouse"
,
0x19000000
,
pic
[
4
]);
sd
=
drive_get_index
(
IF_SD
,
0
,
0
);
if
(
sd
==
-
1
)
{
fprintf
(
stderr
,
"qemu: missing SecureDigital card
\n
"
);
exit
(
1
);
}
pl181_init
(
0x1c000000
,
drives_table
[
sd
].
bdrv
,
pic
[
23
],
pic
[
24
]);
sysbus_create_varargs
(
"pl181"
,
0x1c000000
,
pic
[
23
],
pic
[
24
],
NULL
);
if
(
nd_table
[
0
].
vlan
)
smc91c111_init
(
&
nd_table
[
0
],
0xc8000000
,
pic
[
27
]);
...
...
hw/pl181.c
浏览文件 @
aa9311d8
...
...
@@ -7,9 +7,9 @@
* This code is licenced under the GPL.
*/
#include "hw.h"
#include "primecell.h"
#include "sysbus.h"
#include "sd.h"
#include "sysemu.h"
//#define DEBUG_PL181 1
...
...
@@ -23,6 +23,7 @@ do { printf("pl181: " fmt , ## __VA_ARGS__); } while (0)
#define PL181_FIFO_LEN 16
typedef
struct
{
SysBusDevice
busdev
;
SDState
*
card
;
uint32_t
clock
;
uint32_t
power
;
...
...
@@ -444,20 +445,27 @@ static void pl181_reset(void *opaque)
s
->
mask
[
1
]
=
0
;
}
void
pl181_init
(
uint32_t
base
,
BlockDriverState
*
bd
,
qemu_irq
irq0
,
qemu_irq
irq1
)
static
void
pl181_init
(
SysBusDevice
*
dev
)
{
int
iomemtype
;
pl181_state
*
s
;
pl181_state
*
s
=
FROM_SYSBUS
(
pl181_state
,
dev
);
BlockDriverState
*
bd
;
s
=
(
pl181_state
*
)
qemu_mallocz
(
sizeof
(
pl181_state
));
iomemtype
=
cpu_register_io_memory
(
0
,
pl181_readfn
,
pl181_writefn
,
s
);
cpu_register_physical_memory
(
base
,
0x00001000
,
iomemtype
);
sysbus_init_mmio
(
dev
,
0x1000
,
iomemtype
);
sysbus_init_irq
(
dev
,
&
s
->
irq
[
0
]);
sysbus_init_irq
(
dev
,
&
s
->
irq
[
1
]);
bd
=
qdev_init_bdrv
(
&
dev
->
qdev
,
IF_SD
);
s
->
card
=
sd_init
(
bd
,
0
);
s
->
irq
[
0
]
=
irq0
;
s
->
irq
[
1
]
=
irq1
;
qemu_register_reset
(
pl181_reset
,
s
);
pl181_reset
(
s
);
/* ??? Save/restore. */
}
static
void
pl181_register_devices
(
void
)
{
sysbus_register_dev
(
"pl181"
,
sizeof
(
pl181_state
),
pl181_init
);
}
device_init
(
pl181_register_devices
)
hw/primecell.h
浏览文件 @
aa9311d8
...
...
@@ -17,10 +17,6 @@ qemu_irq *pl061_init(uint32_t base, qemu_irq irq, qemu_irq **out);
/* pl080.c */
void
*
pl080_init
(
uint32_t
base
,
qemu_irq
irq
,
int
nchannels
);
/* pl181.c */
void
pl181_init
(
uint32_t
base
,
BlockDriverState
*
bd
,
qemu_irq
irq0
,
qemu_irq
irq1
);
/* pl190.c */
qemu_irq
*
pl190_init
(
uint32_t
base
,
qemu_irq
irq
,
qemu_irq
fiq
);
...
...
hw/realview.c
浏览文件 @
aa9311d8
...
...
@@ -38,7 +38,6 @@ static void realview_init(ram_addr_t ram_size,
int
done_smc
=
0
;
qemu_irq
cpu_irq
[
4
];
int
ncpu
;
int
index
;
if
(
!
cpu_model
)
cpu_model
=
"arm926"
;
...
...
@@ -97,12 +96,7 @@ static void realview_init(ram_addr_t ram_size,
sysbus_create_simple
(
"pl110_versatile"
,
0x10020000
,
pic
[
23
]);
index
=
drive_get_index
(
IF_SD
,
0
,
0
);
if
(
index
==
-
1
)
{
fprintf
(
stderr
,
"qemu: missing SecureDigital card
\n
"
);
exit
(
1
);
}
pl181_init
(
0x10005000
,
drives_table
[
index
].
bdrv
,
pic
[
17
],
pic
[
18
]);
sysbus_create_varargs
(
"pl181"
,
0x10005000
,
pic
[
17
],
pic
[
18
],
NULL
);
sysbus_create_simple
(
"pl031"
,
0x10017000
,
pic
[
10
]);
...
...
hw/versatilepb.c
浏览文件 @
aa9311d8
...
...
@@ -167,7 +167,6 @@ static void versatile_init(ram_addr_t ram_size,
NICInfo
*
nd
;
int
n
;
int
done_smc
=
0
;
int
index
;
if
(
!
cpu_model
)
cpu_model
=
"arm926"
;
...
...
@@ -224,17 +223,8 @@ static void versatile_init(ram_addr_t ram_size,
that includes hardware cursor support from the PL111. */
sysbus_create_simple
(
"pl110_versatile"
,
0x10120000
,
pic
[
16
]);
index
=
drive_get_index
(
IF_SD
,
0
,
0
);
if
(
index
==
-
1
)
{
fprintf
(
stderr
,
"qemu: missing SecureDigital card
\n
"
);
exit
(
1
);
}
pl181_init
(
0x10005000
,
drives_table
[
index
].
bdrv
,
sic
[
22
],
sic
[
1
]);
#if 0
/* Disabled because there's no way of specifying a block device. */
pl181_init(0x1000b000, NULL, sic, 23, 2);
#endif
sysbus_create_varargs
(
"pl181"
,
0x10005000
,
sic
[
22
],
sic
[
1
],
NULL
);
sysbus_create_varargs
(
"pl181"
,
0x1000b000
,
sic
[
23
],
sic
[
2
],
NULL
);
/* Add PL031 Real Time Clock. */
sysbus_create_simple
(
"pl031"
,
0x101e8000
,
pic
[
10
]);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录