Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
86394e96
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看板
提交
86394e96
编写于
5月 14, 2009
作者:
P
Paul Brook
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
PL050 qdev conversion
Signed-off-by:
N
Paul Brook
<
paul@codesourcery.com
>
上级
a7d518a6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
34 addition
and
17 deletion
+34
-17
hw/integratorcp.c
hw/integratorcp.c
+2
-2
hw/pl050.c
hw/pl050.c
+27
-8
hw/primecell.h
hw/primecell.h
+0
-3
hw/realview.c
hw/realview.c
+2
-2
hw/versatilepb.c
hw/versatilepb.c
+3
-2
未找到文件。
hw/integratorcp.c
浏览文件 @
86394e96
...
...
@@ -485,8 +485,8 @@ static void integratorcp_init(ram_addr_t ram_size,
sysbus_create_simple
(
"pl011"
,
0x16000000
,
pic
[
1
]);
sysbus_create_simple
(
"pl011"
,
0x17000000
,
pic
[
2
]);
icp_control_init
(
0xcb000000
);
pl050_init
(
0x18000000
,
pic
[
3
],
0
);
pl050_init
(
0x19000000
,
pic
[
4
],
1
);
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
"
);
...
...
hw/pl050.c
浏览文件 @
86394e96
...
...
@@ -7,11 +7,11 @@
* This code is licenced under the GPL.
*/
#include "hw.h"
#include "primecell.h"
#include "sysbus.h"
#include "ps2.h"
typedef
struct
{
SysBusDevice
busdev
;
void
*
dev
;
uint32_t
cr
;
uint32_t
clk
;
...
...
@@ -122,20 +122,39 @@ static CPUWriteMemoryFunc *pl050_writefn[] = {
pl050_write
};
void
pl050_init
(
uint32_t
base
,
qemu_irq
irq
,
int
is_mouse
)
static
void
pl050_init
(
SysBusDevice
*
dev
,
int
is_mouse
)
{
pl050_state
*
s
=
FROM_SYSBUS
(
pl050_state
,
dev
);
int
iomemtype
;
pl050_state
*
s
;
s
=
(
pl050_state
*
)
qemu_mallocz
(
sizeof
(
pl050_state
));
iomemtype
=
cpu_register_io_memory
(
0
,
pl050_readfn
,
pl050_writefn
,
s
);
cpu_register_physical_memory
(
base
,
0x0000
1000
,
iomemtype
);
s
->
irq
=
irq
;
sysbus_init_mmio
(
dev
,
0x
1000
,
iomemtype
);
s
ysbus_init_irq
(
dev
,
&
s
->
irq
)
;
s
->
is_mouse
=
is_mouse
;
if
(
is_mouse
)
if
(
s
->
is_mouse
)
s
->
dev
=
ps2_mouse_init
(
pl050_update
,
s
);
else
s
->
dev
=
ps2_kbd_init
(
pl050_update
,
s
);
/* ??? Save/restore. */
}
static
void
pl050_init_keyboard
(
SysBusDevice
*
dev
)
{
pl050_init
(
dev
,
0
);
}
static
void
pl050_init_mouse
(
SysBusDevice
*
dev
)
{
pl050_init
(
dev
,
1
);
}
static
void
pl050_register_devices
(
void
)
{
sysbus_register_dev
(
"pl050_keyboard"
,
sizeof
(
pl050_state
),
pl050_init_keyboard
);
sysbus_register_dev
(
"pl050_mouse"
,
sizeof
(
pl050_state
),
pl050_init_mouse
);
}
device_init
(
pl050_register_devices
)
hw/primecell.h
浏览文件 @
86394e96
...
...
@@ -13,9 +13,6 @@ typedef int (*ssi_xfer_cb)(void *, int);
void
pl022_init
(
uint32_t
base
,
qemu_irq
irq
,
ssi_xfer_cb
xfer_cb
,
void
*
opaque
);
/* pl050.c */
void
pl050_init
(
uint32_t
base
,
qemu_irq
irq
,
int
is_mouse
);
/* pl061.c */
void
pl061_float_high
(
void
*
opaque
,
uint8_t
mask
);
qemu_irq
*
pl061_init
(
uint32_t
base
,
qemu_irq
irq
,
qemu_irq
**
out
);
...
...
hw/realview.c
浏览文件 @
86394e96
...
...
@@ -82,8 +82,8 @@ static void realview_init(ram_addr_t ram_size,
pic
=
mpcore_irq_init
(
cpu_irq
);
}
pl050_init
(
0x10006000
,
pic
[
20
],
0
);
pl050_init
(
0x10007000
,
pic
[
21
],
1
);
sysbus_create_simple
(
"pl050_keyboard"
,
0x10006000
,
pic
[
20
]
);
sysbus_create_simple
(
"pl050_mouse"
,
0x10007000
,
pic
[
21
]
);
sysbus_create_simple
(
"pl011"
,
0x10009000
,
pic
[
12
]);
sysbus_create_simple
(
"pl011"
,
0x1000a000
,
pic
[
13
]);
...
...
hw/versatilepb.c
浏览文件 @
86394e96
...
...
@@ -186,8 +186,9 @@ static void versatile_init(ram_addr_t ram_size,
pic
=
arm_pic_init_cpu
(
env
);
pic
=
pl190_init
(
0x10140000
,
pic
[
0
],
pic
[
1
]);
sic
=
vpb_sic_init
(
0x10003000
,
pic
,
31
);
pl050_init
(
0x10006000
,
sic
[
3
],
0
);
pl050_init
(
0x10007000
,
sic
[
4
],
1
);
sysbus_create_simple
(
"pl050_keyboard"
,
0x10006000
,
sic
[
3
]);
sysbus_create_simple
(
"pl050_mouse"
,
0x10007000
,
sic
[
4
]);
pci_bus
=
pci_vpb_init
(
sic
,
27
,
0
);
/* The Versatile PCI bridge does not provide access to PCI IO space,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录