Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
0a9ee1a7
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看板
提交
0a9ee1a7
编写于
11月 24, 2011
作者:
A
Avi Kivity
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
omap_tap: convert to memory API
Signed-off-by:
N
Avi Kivity
<
avi@redhat.com
>
上级
c304fed7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
15 deletion
+19
-15
hw/omap.h
hw/omap.h
+1
-0
hw/omap_tap.c
hw/omap_tap.c
+18
-15
未找到文件。
hw/omap.h
浏览文件 @
0a9ee1a7
...
@@ -827,6 +827,7 @@ struct omap_mpu_state_s {
...
@@ -827,6 +827,7 @@ struct omap_mpu_state_s {
MemoryRegion
pwl_iomem
;
MemoryRegion
pwl_iomem
;
MemoryRegion
pwt_iomem
;
MemoryRegion
pwt_iomem
;
MemoryRegion
mpui_io_iomem
;
MemoryRegion
mpui_io_iomem
;
MemoryRegion
tap_iomem
;
MemoryRegion
imif_ram
;
MemoryRegion
imif_ram
;
MemoryRegion
emiff_ram
;
MemoryRegion
emiff_ram
;
...
...
hw/omap_tap.c
浏览文件 @
0a9ee1a7
...
@@ -22,10 +22,15 @@
...
@@ -22,10 +22,15 @@
#include "omap.h"
#include "omap.h"
/* TEST-Chip-level TAP */
/* TEST-Chip-level TAP */
static
uint32_t
omap_tap_read
(
void
*
opaque
,
target_phys_addr_t
addr
)
static
uint64_t
omap_tap_read
(
void
*
opaque
,
target_phys_addr_t
addr
,
unsigned
size
)
{
{
struct
omap_mpu_state_s
*
s
=
(
struct
omap_mpu_state_s
*
)
opaque
;
struct
omap_mpu_state_s
*
s
=
(
struct
omap_mpu_state_s
*
)
opaque
;
if
(
size
!=
4
)
{
return
omap_badwidth_read32
(
opaque
,
addr
);
}
switch
(
addr
)
{
switch
(
addr
)
{
case
0x204
:
/* IDCODE_reg */
case
0x204
:
/* IDCODE_reg */
switch
(
s
->
mpu_model
)
{
switch
(
s
->
mpu_model
)
{
...
@@ -87,27 +92,25 @@ static uint32_t omap_tap_read(void *opaque, target_phys_addr_t addr)
...
@@ -87,27 +92,25 @@ static uint32_t omap_tap_read(void *opaque, target_phys_addr_t addr)
}
}
static
void
omap_tap_write
(
void
*
opaque
,
target_phys_addr_t
addr
,
static
void
omap_tap_write
(
void
*
opaque
,
target_phys_addr_t
addr
,
uint32_t
valu
e
)
uint64_t
value
,
unsigned
siz
e
)
{
{
if
(
size
!=
4
)
{
return
omap_badwidth_write32
(
opaque
,
addr
,
value
);
}
OMAP_BAD_REG
(
addr
);
OMAP_BAD_REG
(
addr
);
}
}
static
CPUReadMemoryFunc
*
const
omap_tap_readfn
[]
=
{
static
const
MemoryRegionOps
omap_tap_ops
=
{
omap_badwidth_read32
,
.
read
=
omap_tap_read
,
omap_badwidth_read32
,
.
write
=
omap_tap_write
,
omap_tap_read
,
.
endianness
=
DEVICE_NATIVE_ENDIAN
,
};
static
CPUWriteMemoryFunc
*
const
omap_tap_writefn
[]
=
{
omap_badwidth_write32
,
omap_badwidth_write32
,
omap_tap_write
,
};
};
void
omap_tap_init
(
struct
omap_target_agent_s
*
ta
,
void
omap_tap_init
(
struct
omap_target_agent_s
*
ta
,
struct
omap_mpu_state_s
*
mpu
)
struct
omap_mpu_state_s
*
mpu
)
{
{
omap_l4_attach
(
ta
,
0
,
cpu_register_io_memory
(
memory_region_init_io
(
&
mpu
->
tap_iomem
,
&
omap_tap_ops
,
mpu
,
"omap.tap"
,
omap_tap_readfn
,
omap_tap_writefn
,
mpu
,
omap_l4_region_size
(
ta
,
0
));
DEVICE_NATIVE_ENDIAN
)
);
omap_l4_attach_region
(
ta
,
0
,
&
mpu
->
tap_iomem
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录