Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
c6017850
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c6017850
编写于
10月 06, 2011
作者:
A
Avi Kivity
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
jazz_led: convert to memory API
Signed-off-by:
N
Avi Kivity
<
avi@redhat.com
>
上级
0af58e58
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
17 deletion
+14
-17
hw/jazz_led.c
hw/jazz_led.c
+10
-15
hw/mips.h
hw/mips.h
+3
-1
hw/mips_jazz.c
hw/mips_jazz.c
+1
-1
未找到文件。
hw/jazz_led.c
浏览文件 @
c6017850
...
...
@@ -43,6 +43,7 @@ typedef enum {
}
screen_state_t
;
typedef
struct
LedState
{
MemoryRegion
iomem
;
uint8_t
segments
;
DisplayState
*
ds
;
screen_state_t
state
;
...
...
@@ -140,16 +141,12 @@ static void led_writel(void *opaque, target_phys_addr_t addr, uint32_t val)
#endif
}
static
CPUReadMemoryFunc
*
const
led_read
[
3
]
=
{
led_readb
,
led_readw
,
led_readl
,
};
static
CPUWriteMemoryFunc
*
const
led_write
[
3
]
=
{
led_writeb
,
led_writew
,
led_writel
,
static
const
MemoryRegionOps
led_ops
=
{
.
old_mmio
=
{
.
read
=
{
led_readb
,
led_readw
,
led_readl
,
},
.
write
=
{
led_writeb
,
led_writew
,
led_writel
,
},
},
.
endianness
=
DEVICE_NATIVE_ENDIAN
,
};
/***********************************************************/
...
...
@@ -307,18 +304,16 @@ static void jazz_led_text_update(void *opaque, console_ch_t *chardata)
dpy_update
(
s
->
ds
,
0
,
0
,
2
,
1
);
}
void
jazz_led_init
(
target_phys_addr_t
base
)
void
jazz_led_init
(
MemoryRegion
*
address_space
,
target_phys_addr_t
base
)
{
LedState
*
s
;
int
io
;
s
=
g_malloc0
(
sizeof
(
LedState
));
s
->
state
=
REDRAW_SEGMENTS
|
REDRAW_BACKGROUND
;
io
=
cpu_register_io_memory
(
led_read
,
led_write
,
s
,
DEVICE_NATIVE_ENDIAN
);
cpu_register_physical_memory
(
base
,
1
,
io
);
memory_region_init_io
(
&
s
->
iomem
,
&
led_ops
,
s
,
"led"
,
1
);
memory_region_add_subregion
(
address_space
,
base
,
&
s
->
iomem
);
s
->
ds
=
graphic_console_init
(
jazz_led_update_display
,
jazz_led_invalidate_display
,
...
...
hw/mips.h
浏览文件 @
c6017850
...
...
@@ -2,6 +2,8 @@
#define HW_MIPS_H
/* Definitions for mips board emulation. */
#include "memory.h"
/* gt64xxx.c */
PCIBus
*
gt64120_register
(
qemu_irq
*
pic
);
...
...
@@ -9,7 +11,7 @@ PCIBus *gt64120_register(qemu_irq *pic);
PCIBus
*
bonito_init
(
qemu_irq
*
pic
);
/* jazz_led.c */
void
jazz_led_init
(
target_phys_addr_t
base
);
void
jazz_led_init
(
MemoryRegion
*
address_space
,
target_phys_addr_t
base
);
/* rc4030.c */
typedef
struct
rc4030DMAState
*
rc4030_dma
;
...
...
hw/mips_jazz.c
浏览文件 @
c6017850
...
...
@@ -287,7 +287,7 @@ static void mips_jazz_init(MemoryRegion *address_space,
sysbus_mmio_map
(
sysbus
,
0
,
0x80009000
);
/* LED indicator */
jazz_led_init
(
0x8000f000
);
jazz_led_init
(
address_space
,
0x8000f000
);
}
static
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录