Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
29776739
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看板
提交
29776739
编写于
6月 06, 2013
作者:
P
Paolo Bonzini
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hw/s*: pass owner to memory_region_init* functions
Signed-off-by:
N
Paolo Bonzini
<
pbonzini@redhat.com
>
上级
40c5dce9
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
33 addition
and
26 deletion
+33
-26
hw/scsi/esp-pci.c
hw/scsi/esp-pci.c
+2
-1
hw/scsi/esp.c
hw/scsi/esp.c
+2
-2
hw/scsi/lsi53c895a.c
hw/scsi/lsi53c895a.c
+6
-3
hw/scsi/megasas.c
hw/scsi/megasas.c
+3
-3
hw/scsi/vmw_pvscsi.c
hw/scsi/vmw_pvscsi.c
+1
-1
hw/sd/milkymist-memcard.c
hw/sd/milkymist-memcard.c
+1
-1
hw/sd/pl181.c
hw/sd/pl181.c
+1
-1
hw/sd/sdhci.c
hw/sd/sdhci.c
+1
-1
hw/sh4/sh_pci.c
hw/sh4/sh_pci.c
+3
-3
hw/sparc/sun4m.c
hw/sparc/sun4m.c
+5
-4
hw/sparc64/sun4u.c
hw/sparc64/sun4u.c
+2
-2
hw/ssi/pl022.c
hw/ssi/pl022.c
+1
-1
hw/ssi/xilinx_spi.c
hw/ssi/xilinx_spi.c
+2
-1
hw/ssi/xilinx_spips.c
hw/ssi/xilinx_spips.c
+3
-2
未找到文件。
hw/scsi/esp-pci.c
浏览文件 @
29776739
...
...
@@ -349,7 +349,8 @@ static int esp_pci_scsi_init(PCIDevice *dev)
s
->
dma_memory_write
=
esp_pci_dma_memory_write
;
s
->
dma_opaque
=
pci
;
s
->
chip_id
=
TCHI_AM53C974
;
memory_region_init_io
(
&
pci
->
io
,
NULL
,
&
esp_pci_io_ops
,
pci
,
"esp-io"
,
0x80
);
memory_region_init_io
(
&
pci
->
io
,
OBJECT
(
pci
),
&
esp_pci_io_ops
,
pci
,
"esp-io"
,
0x80
);
pci_register_bar
(
&
pci
->
dev
,
0
,
PCI_BASE_ADDRESS_SPACE_IO
,
&
pci
->
io
);
s
->
irq
=
pci
->
dev
.
irq
[
0
];
...
...
hw/scsi/esp.c
浏览文件 @
29776739
...
...
@@ -675,8 +675,8 @@ static int sysbus_esp_init(SysBusDevice *dev)
assert
(
sysbus
->
it_shift
!=
-
1
);
s
->
chip_id
=
TCHI_FAS100A
;
memory_region_init_io
(
&
sysbus
->
iomem
,
NULL
,
&
sysbus_esp_mem_ops
,
sysbu
s
,
"esp"
,
ESP_REGS
<<
sysbus
->
it_shift
);
memory_region_init_io
(
&
sysbus
->
iomem
,
OBJECT
(
sysbus
),
&
sysbus_esp_mem_op
s
,
sysbus
,
"esp"
,
ESP_REGS
<<
sysbus
->
it_shift
);
sysbus_init_mmio
(
dev
,
&
sysbus
->
iomem
);
qdev_init_gpio_in
(
&
dev
->
qdev
,
sysbus_esp_gpio_demux
,
2
);
...
...
hw/scsi/lsi53c895a.c
浏览文件 @
29776739
...
...
@@ -2090,9 +2090,12 @@ static int lsi_scsi_init(PCIDevice *dev)
/* Interrupt pin A */
pci_conf
[
PCI_INTERRUPT_PIN
]
=
0x01
;
memory_region_init_io
(
&
s
->
mmio_io
,
NULL
,
&
lsi_mmio_ops
,
s
,
"lsi-mmio"
,
0x400
);
memory_region_init_io
(
&
s
->
ram_io
,
NULL
,
&
lsi_ram_ops
,
s
,
"lsi-ram"
,
0x2000
);
memory_region_init_io
(
&
s
->
io_io
,
NULL
,
&
lsi_io_ops
,
s
,
"lsi-io"
,
256
);
memory_region_init_io
(
&
s
->
mmio_io
,
OBJECT
(
s
),
&
lsi_mmio_ops
,
s
,
"lsi-mmio"
,
0x400
);
memory_region_init_io
(
&
s
->
ram_io
,
OBJECT
(
s
),
&
lsi_ram_ops
,
s
,
"lsi-ram"
,
0x2000
);
memory_region_init_io
(
&
s
->
io_io
,
OBJECT
(
s
),
&
lsi_io_ops
,
s
,
"lsi-io"
,
256
);
pci_register_bar
(
&
s
->
dev
,
0
,
PCI_BASE_ADDRESS_SPACE_IO
,
&
s
->
io_io
);
pci_register_bar
(
&
s
->
dev
,
1
,
0
,
&
s
->
mmio_io
);
...
...
hw/scsi/megasas.c
浏览文件 @
29776739
...
...
@@ -2098,11 +2098,11 @@ static int megasas_scsi_init(PCIDevice *dev)
/* Interrupt pin 1 */
pci_conf
[
PCI_INTERRUPT_PIN
]
=
0x01
;
memory_region_init_io
(
&
s
->
mmio_io
,
NULL
,
&
megasas_mmio_ops
,
s
,
memory_region_init_io
(
&
s
->
mmio_io
,
OBJECT
(
s
)
,
&
megasas_mmio_ops
,
s
,
"megasas-mmio"
,
0x4000
);
memory_region_init_io
(
&
s
->
port_io
,
NULL
,
&
megasas_port_ops
,
s
,
memory_region_init_io
(
&
s
->
port_io
,
OBJECT
(
s
)
,
&
megasas_port_ops
,
s
,
"megasas-io"
,
256
);
memory_region_init_io
(
&
s
->
queue_io
,
NULL
,
&
megasas_queue_ops
,
s
,
memory_region_init_io
(
&
s
->
queue_io
,
OBJECT
(
s
)
,
&
megasas_queue_ops
,
s
,
"megasas-queue"
,
0x40000
);
#ifdef USE_MSIX
...
...
hw/scsi/vmw_pvscsi.c
浏览文件 @
29776739
...
...
@@ -1075,7 +1075,7 @@ pvscsi_init(PCIDevice *pci_dev)
/* Interrupt pin A */
pci_config_set_interrupt_pin
(
pci_dev
->
config
,
1
);
memory_region_init_io
(
&
s
->
io_space
,
NULL
,
&
pvscsi_ops
,
s
,
memory_region_init_io
(
&
s
->
io_space
,
OBJECT
(
s
)
,
&
pvscsi_ops
,
s
,
"pvscsi-io"
,
PVSCSI_MEM_SPACE_SIZE
);
pci_register_bar
(
pci_dev
,
0
,
PCI_BASE_ADDRESS_SPACE_MEMORY
,
&
s
->
io_space
);
...
...
hw/sd/milkymist-memcard.c
浏览文件 @
29776739
...
...
@@ -253,7 +253,7 @@ static int milkymist_memcard_init(SysBusDevice *dev)
s
->
card
=
sd_init
(
dinfo
?
dinfo
->
bdrv
:
NULL
,
false
);
s
->
enabled
=
dinfo
?
bdrv_is_inserted
(
dinfo
->
bdrv
)
:
0
;
memory_region_init_io
(
&
s
->
regs_region
,
NULL
,
&
memcard_mmio_ops
,
s
,
memory_region_init_io
(
&
s
->
regs_region
,
OBJECT
(
s
)
,
&
memcard_mmio_ops
,
s
,
"milkymist-memcard"
,
R_MAX
*
4
);
sysbus_init_mmio
(
dev
,
&
s
->
regs_region
);
...
...
hw/sd/pl181.c
浏览文件 @
29776739
...
...
@@ -479,7 +479,7 @@ static int pl181_init(SysBusDevice *dev)
pl181_state
*
s
=
FROM_SYSBUS
(
pl181_state
,
dev
);
DriveInfo
*
dinfo
;
memory_region_init_io
(
&
s
->
iomem
,
NULL
,
&
pl181_ops
,
s
,
"pl181"
,
0x1000
);
memory_region_init_io
(
&
s
->
iomem
,
OBJECT
(
s
)
,
&
pl181_ops
,
s
,
"pl181"
,
0x1000
);
sysbus_init_mmio
(
dev
,
&
s
->
iomem
);
sysbus_init_irq
(
dev
,
&
s
->
irq
[
0
]);
sysbus_init_irq
(
dev
,
&
s
->
irq
[
1
]);
...
...
hw/sd/sdhci.c
浏览文件 @
29776739
...
...
@@ -1245,7 +1245,7 @@ static void sdhci_realize(DeviceState *dev, Error ** errp)
s
->
buf_maxsz
=
sdhci_get_fifolen
(
s
);
s
->
fifo_buffer
=
g_malloc0
(
s
->
buf_maxsz
);
sysbus_init_irq
(
sbd
,
&
s
->
irq
);
memory_region_init_io
(
&
s
->
iomem
,
NULL
,
&
sdhci_mmio_ops
,
s
,
"sdhci"
,
memory_region_init_io
(
&
s
->
iomem
,
OBJECT
(
s
)
,
&
sdhci_mmio_ops
,
s
,
"sdhci"
,
SDHC_REGISTERS_MAP_SIZE
);
sysbus_init_mmio
(
sbd
,
&
s
->
iomem
);
}
...
...
hw/sh4/sh_pci.c
浏览文件 @
29776739
...
...
@@ -125,10 +125,10 @@ static int sh_pci_device_init(SysBusDevice *dev)
get_system_memory
(),
get_system_io
(),
PCI_DEVFN
(
0
,
0
),
4
,
TYPE_PCI_BUS
);
memory_region_init_io
(
&
s
->
memconfig_p4
,
NULL
,
&
sh_pci_reg_ops
,
s
,
memory_region_init_io
(
&
s
->
memconfig_p4
,
OBJECT
(
s
)
,
&
sh_pci_reg_ops
,
s
,
"sh_pci"
,
0x224
);
memory_region_init_alias
(
&
s
->
memconfig_a7
,
NULL
,
"sh_pci.2"
,
&
s
->
memconfig_p4
,
0
,
0x224
);
memory_region_init_alias
(
&
s
->
memconfig_a7
,
OBJECT
(
s
),
"sh_pci.2"
,
&
s
->
memconfig_p4
,
0
,
0x224
);
isa_mmio_setup
(
&
s
->
isa
,
0x40000
);
sysbus_init_mmio
(
dev
,
&
s
->
memconfig_p4
);
sysbus_init_mmio
(
dev
,
&
s
->
memconfig_a7
);
...
...
hw/sparc/sun4m.c
浏览文件 @
29776739
...
...
@@ -582,7 +582,8 @@ static int idreg_init1(SysBusDevice *dev)
{
IDRegState
*
s
=
FROM_SYSBUS
(
IDRegState
,
dev
);
memory_region_init_ram
(
&
s
->
mem
,
NULL
,
"sun4m.idreg"
,
sizeof
(
idreg_data
));
memory_region_init_ram
(
&
s
->
mem
,
OBJECT
(
s
),
"sun4m.idreg"
,
sizeof
(
idreg_data
));
vmstate_register_ram_global
(
&
s
->
mem
);
memory_region_set_readonly
(
&
s
->
mem
,
true
);
sysbus_init_mmio
(
dev
,
&
s
->
mem
);
...
...
@@ -625,7 +626,7 @@ static int afx_init1(SysBusDevice *dev)
{
AFXState
*
s
=
FROM_SYSBUS
(
AFXState
,
dev
);
memory_region_init_ram
(
&
s
->
mem
,
NULL
,
"sun4m.afx"
,
4
);
memory_region_init_ram
(
&
s
->
mem
,
OBJECT
(
s
)
,
"sun4m.afx"
,
4
);
vmstate_register_ram_global
(
&
s
->
mem
);
sysbus_init_mmio
(
dev
,
&
s
->
mem
);
return
0
;
...
...
@@ -695,7 +696,7 @@ static int prom_init1(SysBusDevice *dev)
{
PROMState
*
s
=
FROM_SYSBUS
(
PROMState
,
dev
);
memory_region_init_ram
(
&
s
->
prom
,
NULL
,
"sun4m.prom"
,
PROM_SIZE_MAX
);
memory_region_init_ram
(
&
s
->
prom
,
OBJECT
(
s
)
,
"sun4m.prom"
,
PROM_SIZE_MAX
);
vmstate_register_ram_global
(
&
s
->
prom
);
memory_region_set_readonly
(
&
s
->
prom
,
true
);
sysbus_init_mmio
(
dev
,
&
s
->
prom
);
...
...
@@ -734,7 +735,7 @@ static int ram_init1(SysBusDevice *dev)
{
RamDevice
*
d
=
FROM_SYSBUS
(
RamDevice
,
dev
);
memory_region_init_ram
(
&
d
->
ram
,
NULL
,
"sun4m.ram"
,
d
->
size
);
memory_region_init_ram
(
&
d
->
ram
,
OBJECT
(
d
)
,
"sun4m.ram"
,
d
->
size
);
vmstate_register_ram_global
(
&
d
->
ram
);
sysbus_init_mmio
(
dev
,
&
d
->
ram
);
return
0
;
...
...
hw/sparc64/sun4u.c
浏览文件 @
29776739
...
...
@@ -680,7 +680,7 @@ static int prom_init1(SysBusDevice *dev)
{
PROMState
*
s
=
FROM_SYSBUS
(
PROMState
,
dev
);
memory_region_init_ram
(
&
s
->
prom
,
NULL
,
"sun4u.prom"
,
PROM_SIZE_MAX
);
memory_region_init_ram
(
&
s
->
prom
,
OBJECT
(
s
)
,
"sun4u.prom"
,
PROM_SIZE_MAX
);
vmstate_register_ram_global
(
&
s
->
prom
);
memory_region_set_readonly
(
&
s
->
prom
,
true
);
sysbus_init_mmio
(
dev
,
&
s
->
prom
);
...
...
@@ -720,7 +720,7 @@ static int ram_init1(SysBusDevice *dev)
{
RamDevice
*
d
=
FROM_SYSBUS
(
RamDevice
,
dev
);
memory_region_init_ram
(
&
d
->
ram
,
NULL
,
"sun4u.ram"
,
d
->
size
);
memory_region_init_ram
(
&
d
->
ram
,
OBJECT
(
d
)
,
"sun4u.ram"
,
d
->
size
);
vmstate_register_ram_global
(
&
d
->
ram
);
sysbus_init_mmio
(
dev
,
&
d
->
ram
);
return
0
;
...
...
hw/ssi/pl022.c
浏览文件 @
29776739
...
...
@@ -277,7 +277,7 @@ static int pl022_init(SysBusDevice *dev)
{
pl022_state
*
s
=
FROM_SYSBUS
(
pl022_state
,
dev
);
memory_region_init_io
(
&
s
->
iomem
,
NULL
,
&
pl022_ops
,
s
,
"pl022"
,
0x1000
);
memory_region_init_io
(
&
s
->
iomem
,
OBJECT
(
s
)
,
&
pl022_ops
,
s
,
"pl022"
,
0x1000
);
sysbus_init_mmio
(
dev
,
&
s
->
iomem
);
sysbus_init_irq
(
dev
,
&
s
->
irq
);
s
->
ssi
=
ssi_create_bus
(
&
dev
->
qdev
,
"ssi"
);
...
...
hw/ssi/xilinx_spi.c
浏览文件 @
29776739
...
...
@@ -330,7 +330,8 @@ static int xilinx_spi_init(SysBusDevice *dev)
sysbus_init_irq
(
dev
,
&
s
->
cs_lines
[
i
]);
}
memory_region_init_io
(
&
s
->
mmio
,
NULL
,
&
spi_ops
,
s
,
"xilinx-spi"
,
R_MAX
*
4
);
memory_region_init_io
(
&
s
->
mmio
,
OBJECT
(
s
),
&
spi_ops
,
s
,
"xilinx-spi"
,
R_MAX
*
4
);
sysbus_init_mmio
(
dev
,
&
s
->
mmio
);
s
->
irqline
=
-
1
;
...
...
hw/ssi/xilinx_spips.c
浏览文件 @
29776739
...
...
@@ -663,7 +663,8 @@ static void xilinx_spips_realize(DeviceState *dev, Error **errp)
sysbus_init_irq
(
sbd
,
&
s
->
cs_lines
[
i
]);
}
memory_region_init_io
(
&
s
->
iomem
,
NULL
,
xsc
->
reg_ops
,
s
,
"spi"
,
R_MAX
*
4
);
memory_region_init_io
(
&
s
->
iomem
,
OBJECT
(
s
),
xsc
->
reg_ops
,
s
,
"spi"
,
R_MAX
*
4
);
sysbus_init_mmio
(
sbd
,
&
s
->
iomem
);
s
->
irqline
=
-
1
;
...
...
@@ -685,7 +686,7 @@ static void xilinx_qspips_realize(DeviceState *dev, Error **errp)
s
->
num_txrx_bytes
=
4
;
xilinx_spips_realize
(
dev
,
errp
);
memory_region_init_io
(
&
s
->
mmlqspi
,
NULL
,
&
lqspi_ops
,
s
,
"lqspi"
,
memory_region_init_io
(
&
s
->
mmlqspi
,
OBJECT
(
s
)
,
&
lqspi_ops
,
s
,
"lqspi"
,
(
1
<<
LQSPI_ADDRESS_BITS
)
*
2
);
sysbus_init_mmio
(
sbd
,
&
s
->
mmlqspi
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录