Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
7d977de7
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看板
提交
7d977de7
编写于
3月 14, 2004
作者:
B
bellard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
io port API change
git-svn-id:
svn://svn.savannah.nongnu.org/qemu/trunk@661
c046a42c-6fe2-441c-8c8c-71466251a162
上级
07d89866
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
22 deletion
+22
-22
hw/dma.c
hw/dma.c
+12
-12
hw/sb16.c
hw/sb16.c
+10
-10
未找到文件。
hw/dma.c
浏览文件 @
7d977de7
...
...
@@ -78,7 +78,7 @@ enum {
};
static
void
write_page
(
CPUState
*
env
,
uint32_t
nport
,
uint32_t
data
)
static
void
write_page
(
void
*
opaque
,
uint32_t
nport
,
uint32_t
data
)
{
int
ichan
;
int
ncont
;
...
...
@@ -113,7 +113,7 @@ static inline int getff (int ncont)
return
ff
;
}
static
uint32_t
read_chan
(
CPUState
*
env
,
uint32_t
nport
)
static
uint32_t
read_chan
(
void
*
opaque
,
uint32_t
nport
)
{
int
ff
;
int
ncont
,
ichan
,
nreg
;
...
...
@@ -135,7 +135,7 @@ static uint32_t read_chan (CPUState *env, uint32_t nport)
return
(
val
>>
(
ncont
+
(
ff
<<
3
)))
&
0xff
;
}
static
void
write_chan
(
CPUState
*
env
,
uint32_t
nport
,
uint32_t
data
)
static
void
write_chan
(
void
*
opaque
,
uint32_t
nport
,
uint32_t
data
)
{
int
ncont
,
ichan
,
nreg
;
struct
dma_regs
*
r
;
...
...
@@ -153,7 +153,7 @@ static void write_chan (CPUState *env, uint32_t nport, uint32_t data)
}
}
static
void
write_cont
(
CPUState
*
env
,
uint32_t
nport
,
uint32_t
data
)
static
void
write_cont
(
void
*
opaque
,
uint32_t
nport
,
uint32_t
data
)
{
int
iport
,
ichan
,
ncont
;
struct
dma_cont
*
d
;
...
...
@@ -345,22 +345,22 @@ void DMA_init (void)
int
page_port_list
[]
=
{
0x1
,
0x2
,
0x3
,
0x7
};
for
(
i
=
0
;
i
<
8
;
i
++
)
{
register_ioport_write
(
i
,
1
,
write_chan
,
1
);
register_ioport_write
(
i
,
1
,
1
,
write_chan
,
NULL
);
register_ioport_write
(
0xc0
+
(
i
<<
1
),
1
,
write_chan
,
1
);
register_ioport_write
(
0xc0
+
(
i
<<
1
),
1
,
1
,
write_chan
,
NULL
);
register_ioport_read
(
i
,
1
,
read_chan
,
1
);
register_ioport_read
(
0xc0
+
(
i
<<
1
),
1
,
read_chan
,
1
);
register_ioport_read
(
i
,
1
,
1
,
read_chan
,
NULL
);
register_ioport_read
(
0xc0
+
(
i
<<
1
),
1
,
1
,
read_chan
,
NULL
);
}
for
(
i
=
0
;
i
<
LENOFA
(
page_port_list
);
i
++
)
{
register_ioport_write
(
page_port_list
[
i
]
+
0x80
,
1
,
write_page
,
1
);
register_ioport_write
(
page_port_list
[
i
]
+
0x88
,
1
,
write_page
,
1
);
register_ioport_write
(
page_port_list
[
i
]
+
0x80
,
1
,
1
,
write_page
,
NULL
);
register_ioport_write
(
page_port_list
[
i
]
+
0x88
,
1
,
1
,
write_page
,
NULL
);
}
for
(
i
=
0
;
i
<
8
;
i
++
)
{
register_ioport_write
(
i
+
8
,
1
,
write_cont
,
1
);
register_ioport_write
(
0xd0
+
(
i
<<
1
),
1
,
write_cont
,
1
);
register_ioport_write
(
i
+
8
,
1
,
1
,
write_cont
,
NULL
);
register_ioport_write
(
0xd0
+
(
i
<<
1
),
1
,
1
,
write_cont
,
NULL
);
}
write_cont
(
NULL
,
0x0d
,
0
);
...
...
hw/sb16.c
浏览文件 @
7d977de7
...
...
@@ -50,9 +50,9 @@
#endif
#define IO_READ_PROTO(name) \
uint32_t name (
struct CPUState *env
, uint32_t nport)
uint32_t name (
void *opaque
, uint32_t nport)
#define IO_WRITE_PROTO(name) \
void name (
struct CPUState *env
, uint32_t nport, uint32_t val)
void name (
void *opaque
, uint32_t nport, uint32_t val)
static
struct
{
int
ver_lo
;
...
...
@@ -550,8 +550,8 @@ static IO_WRITE_PROTO(mixer_write_datab)
static
IO_WRITE_PROTO
(
mixer_write_indexw
)
{
mixer_write_indexb
(
env
,
nport
,
val
&
0xff
);
mixer_write_datab
(
env
,
nport
,
(
val
>>
8
)
&
0xff
);
mixer_write_indexb
(
opaque
,
nport
,
val
&
0xff
);
mixer_write_datab
(
opaque
,
nport
,
(
val
>>
8
)
&
0xff
);
}
static
IO_READ_PROTO
(
mixer_read
)
...
...
@@ -718,17 +718,17 @@ void SB16_init (void)
}
for
(
i
=
0
;
i
<
LENOFA
(
dsp_write_ports
);
i
++
)
{
register_ioport_write
(
sb
.
port
+
dsp_write_ports
[
i
],
1
,
dsp_write
,
1
);
register_ioport_write
(
sb
.
port
+
dsp_write_ports
[
i
],
1
,
1
,
dsp_write
,
NULL
);
}
for
(
i
=
0
;
i
<
LENOFA
(
dsp_read_ports
);
i
++
)
{
register_ioport_read
(
sb
.
port
+
dsp_read_ports
[
i
],
1
,
dsp_read
,
1
);
register_ioport_read
(
sb
.
port
+
dsp_read_ports
[
i
],
1
,
1
,
dsp_read
,
NULL
);
}
register_ioport_write
(
sb
.
port
+
0x4
,
1
,
mixer_write_indexb
,
1
);
register_ioport_write
(
sb
.
port
+
0x4
,
1
,
mixer_write_indexw
,
2
);
register_ioport_read
(
sb
.
port
+
0x5
,
1
,
mixer_read
,
1
);
register_ioport_write
(
sb
.
port
+
0x5
,
1
,
mixer_write_datab
,
1
);
register_ioport_write
(
sb
.
port
+
0x4
,
1
,
1
,
mixer_write_indexb
,
NULL
);
register_ioport_write
(
sb
.
port
+
0x4
,
1
,
2
,
mixer_write_indexw
,
NULL
);
register_ioport_read
(
sb
.
port
+
0x5
,
1
,
1
,
mixer_read
,
NULL
);
register_ioport_write
(
sb
.
port
+
0x5
,
1
,
1
,
mixer_write_datab
,
NULL
);
DMA_register_channel
(
sb
.
hdma
,
SB_read_DMA
,
NULL
);
DMA_register_channel
(
sb
.
dma
,
SB_read_DMA
,
NULL
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录