Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
8ac02ff8
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看板
提交
8ac02ff8
编写于
5月 29, 2010
作者:
B
Blue Swirl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
i8259: improve debugging
Add a DPRINTF macro. Signed-off-by:
N
Blue Swirl
<
blauwirbel@gmail.com
>
上级
03ae77d6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
12 deletion
+11
-12
hw/i8259.c
hw/i8259.c
+11
-12
未找到文件。
hw/i8259.c
浏览文件 @
8ac02ff8
...
...
@@ -30,6 +30,13 @@
/* debug PIC */
//#define DEBUG_PIC
#ifdef DEBUG_PIC
#define DPRINTF(fmt, ...) \
do { printf("pic: " fmt , ## __VA_ARGS__); } while (0)
#else
#define DPRINTF(fmt, ...)
#endif
//#define DEBUG_IRQ_LATENCY
//#define DEBUG_IRQ_COUNT
...
...
@@ -185,9 +192,7 @@ static void i8259_set_irq(void *opaque, int irq, int level)
#if defined(DEBUG_PIC) || defined(DEBUG_IRQ_COUNT)
if
(
level
!=
irq_level
[
irq
])
{
#if defined(DEBUG_PIC)
printf
(
"i8259_set_irq: irq=%d level=%d
\n
"
,
irq
,
level
);
#endif
DPRINTF
(
"i8259_set_irq: irq=%d level=%d
\n
"
,
irq
,
level
);
irq_level
[
irq
]
=
level
;
#ifdef DEBUG_IRQ_COUNT
if
(
level
==
1
)
...
...
@@ -253,9 +258,7 @@ int pic_read_irq(PicState2 *s)
(
double
)(
qemu_get_clock
(
vm_clock
)
-
irq_time
[
irq
])
*
1000000
.
0
/
get_ticks_per_sec
());
#endif
#if defined(DEBUG_PIC)
printf
(
"pic_interrupt: irq=%d
\n
"
,
irq
);
#endif
DPRINTF
(
"pic_interrupt: irq=%d
\n
"
,
irq
);
return
intno
;
}
...
...
@@ -286,9 +289,7 @@ static void pic_ioport_write(void *opaque, uint32_t addr, uint32_t val)
PicState
*
s
=
opaque
;
int
priority
,
cmd
,
irq
;
#ifdef DEBUG_PIC
printf
(
"pic_write: addr=0x%02x val=0x%02x
\n
"
,
addr
,
val
);
#endif
DPRINTF
(
"write: addr=0x%02x val=0x%02x
\n
"
,
addr
,
val
);
addr
&=
1
;
if
(
addr
==
0
)
{
if
(
val
&
0x10
)
{
...
...
@@ -416,9 +417,7 @@ static uint32_t pic_ioport_read(void *opaque, uint32_t addr1)
ret
=
s
->
imr
;
}
}
#ifdef DEBUG_PIC
printf
(
"pic_read: addr=0x%02x val=0x%02x
\n
"
,
addr1
,
ret
);
#endif
DPRINTF
(
"read: addr=0x%02x val=0x%02x
\n
"
,
addr1
,
ret
);
return
ret
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录