Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
22fc860b
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看板
提交
22fc860b
编写于
6月 06, 2013
作者:
P
Paolo Bonzini
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hw/[u-x]*: pass owner to memory_region_init* functions
Signed-off-by:
N
Paolo Bonzini
<
pbonzini@redhat.com
>
上级
853dca12
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
31 addition
and
25 deletion
+31
-25
hw/usb/hcd-ehci-sysbus.c
hw/usb/hcd-ehci-sysbus.c
+1
-1
hw/usb/hcd-ehci.c
hw/usb/hcd-ehci.c
+4
-4
hw/usb/hcd-ohci.c
hw/usb/hcd-ohci.c
+2
-1
hw/usb/hcd-uhci.c
hw/usb/hcd-uhci.c
+3
-1
hw/usb/hcd-xhci.c
hw/usb/hcd-xhci.c
+6
-6
hw/virtio/virtio-pci.c
hw/virtio/virtio-pci.c
+2
-2
hw/watchdog/wdt_i6300esb.c
hw/watchdog/wdt_i6300esb.c
+2
-1
hw/xen/xen_apic.c
hw/xen/xen_apic.c
+2
-2
hw/xen/xen_platform.c
hw/xen/xen_platform.c
+4
-3
hw/xen/xen_pt.c
hw/xen/xen_pt.c
+2
-2
hw/xen/xen_pt_msi.c
hw/xen/xen_pt_msi.c
+2
-1
hw/xtensa/xtensa_lx60.c
hw/xtensa/xtensa_lx60.c
+1
-1
未找到文件。
hw/usb/hcd-ehci-sysbus.c
浏览文件 @
22fc860b
...
...
@@ -173,7 +173,7 @@ static void fusbh200_ehci_init(Object *obj)
FUSBH200EHCIState
*
f
=
FUSBH200_EHCI
(
obj
);
EHCIState
*
s
=
&
i
->
ehci
;
memory_region_init_io
(
&
f
->
mem_vendor
,
NULL
,
&
fusbh200_ehci_mmio_ops
,
s
,
memory_region_init_io
(
&
f
->
mem_vendor
,
OBJECT
(
f
)
,
&
fusbh200_ehci_mmio_ops
,
s
,
"fusbh200"
,
0x4c
);
memory_region_add_subregion
(
&
s
->
mem
,
s
->
opregbase
+
s
->
portscbase
+
4
*
s
->
portnr
,
...
...
hw/usb/hcd-ehci.c
浏览文件 @
22fc860b
...
...
@@ -2553,12 +2553,12 @@ void usb_ehci_init(EHCIState *s, DeviceState *dev)
QTAILQ_INIT
(
&
s
->
pqueues
);
usb_packet_init
(
&
s
->
ipacket
);
memory_region_init
(
&
s
->
mem
,
NULL
,
"ehci"
,
MMIO_SIZE
);
memory_region_init_io
(
&
s
->
mem_caps
,
NULL
,
&
ehci_mmio_caps_ops
,
s
,
memory_region_init
(
&
s
->
mem
,
OBJECT
(
dev
)
,
"ehci"
,
MMIO_SIZE
);
memory_region_init_io
(
&
s
->
mem_caps
,
OBJECT
(
dev
)
,
&
ehci_mmio_caps_ops
,
s
,
"capabilities"
,
CAPA_SIZE
);
memory_region_init_io
(
&
s
->
mem_opreg
,
NULL
,
&
ehci_mmio_opreg_ops
,
s
,
memory_region_init_io
(
&
s
->
mem_opreg
,
OBJECT
(
dev
)
,
&
ehci_mmio_opreg_ops
,
s
,
"operational"
,
s
->
portscbase
);
memory_region_init_io
(
&
s
->
mem_ports
,
NULL
,
&
ehci_mmio_port_ops
,
s
,
memory_region_init_io
(
&
s
->
mem_ports
,
OBJECT
(
dev
)
,
&
ehci_mmio_port_ops
,
s
,
"ports"
,
4
*
s
->
portnr
);
memory_region_add_subregion
(
&
s
->
mem
,
s
->
capsbase
,
&
s
->
mem_caps
);
...
...
hw/usb/hcd-ohci.c
浏览文件 @
22fc860b
...
...
@@ -1830,7 +1830,8 @@ static int usb_ohci_init(OHCIState *ohci, DeviceState *dev,
}
}
memory_region_init_io
(
&
ohci
->
mem
,
NULL
,
&
ohci_mem_ops
,
ohci
,
"ohci"
,
256
);
memory_region_init_io
(
&
ohci
->
mem
,
OBJECT
(
dev
),
&
ohci_mem_ops
,
ohci
,
"ohci"
,
256
);
ohci
->
localmem_base
=
localmem_base
;
ohci
->
name
=
object_get_typename
(
OBJECT
(
dev
));
...
...
hw/usb/hcd-uhci.c
浏览文件 @
22fc860b
...
...
@@ -1259,7 +1259,9 @@ static int usb_uhci_common_initfn(PCIDevice *dev)
qemu_register_reset
(
uhci_reset
,
s
);
memory_region_init_io
(
&
s
->
io_bar
,
NULL
,
&
uhci_ioport_ops
,
s
,
"uhci"
,
0x20
);
memory_region_init_io
(
&
s
->
io_bar
,
OBJECT
(
s
),
&
uhci_ioport_ops
,
s
,
"uhci"
,
0x20
);
/* Use region 4 for consistency with real hardware. BSD guests seem
to rely on this. */
pci_register_bar
(
&
s
->
dev
,
4
,
PCI_BASE_ADDRESS_SPACE_IO
,
&
s
->
io_bar
);
...
...
hw/usb/hcd-xhci.c
浏览文件 @
22fc860b
...
...
@@ -3342,14 +3342,14 @@ static int usb_xhci_initfn(struct PCIDevice *dev)
xhci
->
irq
=
xhci
->
pci_dev
.
irq
[
0
];
memory_region_init
(
&
xhci
->
mem
,
NULL
,
"xhci"
,
LEN_REGS
);
memory_region_init_io
(
&
xhci
->
mem_cap
,
NULL
,
&
xhci_cap_ops
,
xhci
,
memory_region_init
(
&
xhci
->
mem
,
OBJECT
(
xhci
)
,
"xhci"
,
LEN_REGS
);
memory_region_init_io
(
&
xhci
->
mem_cap
,
OBJECT
(
xhci
)
,
&
xhci_cap_ops
,
xhci
,
"capabilities"
,
LEN_CAP
);
memory_region_init_io
(
&
xhci
->
mem_oper
,
NULL
,
&
xhci_oper_ops
,
xhci
,
memory_region_init_io
(
&
xhci
->
mem_oper
,
OBJECT
(
xhci
)
,
&
xhci_oper_ops
,
xhci
,
"operational"
,
0x400
);
memory_region_init_io
(
&
xhci
->
mem_runtime
,
NULL
,
&
xhci_runtime_ops
,
xhci
,
memory_region_init_io
(
&
xhci
->
mem_runtime
,
OBJECT
(
xhci
)
,
&
xhci_runtime_ops
,
xhci
,
"runtime"
,
LEN_RUNTIME
);
memory_region_init_io
(
&
xhci
->
mem_doorbell
,
NULL
,
&
xhci_doorbell_ops
,
xhci
,
memory_region_init_io
(
&
xhci
->
mem_doorbell
,
OBJECT
(
xhci
)
,
&
xhci_doorbell_ops
,
xhci
,
"doorbell"
,
LEN_DOORBELL
);
memory_region_add_subregion
(
&
xhci
->
mem
,
0
,
&
xhci
->
mem_cap
);
...
...
@@ -3361,7 +3361,7 @@ static int usb_xhci_initfn(struct PCIDevice *dev)
XHCIPort
*
port
=
&
xhci
->
ports
[
i
];
uint32_t
offset
=
OFF_OPER
+
0x400
+
0x10
*
i
;
port
->
xhci
=
xhci
;
memory_region_init_io
(
&
port
->
mem
,
NULL
,
&
xhci_port_ops
,
port
,
memory_region_init_io
(
&
port
->
mem
,
OBJECT
(
xhci
)
,
&
xhci_port_ops
,
port
,
port
->
name
,
0x10
);
memory_region_add_subregion
(
&
xhci
->
mem
,
offset
,
&
port
->
mem
);
}
...
...
hw/virtio/virtio-pci.c
浏览文件 @
22fc860b
...
...
@@ -966,8 +966,8 @@ static void virtio_pci_device_plugged(DeviceState *d)
size
=
1
<<
qemu_fls
(
size
);
}
memory_region_init_io
(
&
proxy
->
bar
,
NULL
,
&
virtio_pci_config_ops
,
proxy
,
"virtio-pci"
,
size
);
memory_region_init_io
(
&
proxy
->
bar
,
OBJECT
(
proxy
),
&
virtio_pci_config_ops
,
proxy
,
"virtio-pci"
,
size
);
pci_register_bar
(
&
proxy
->
pci_dev
,
0
,
PCI_BASE_ADDRESS_SPACE_IO
,
&
proxy
->
bar
);
...
...
hw/watchdog/wdt_i6300esb.c
浏览文件 @
22fc860b
...
...
@@ -417,7 +417,8 @@ static int i6300esb_init(PCIDevice *dev)
d
->
timer
=
qemu_new_timer_ns
(
vm_clock
,
i6300esb_timer_expired
,
d
);
d
->
previous_reboot_flag
=
0
;
memory_region_init_io
(
&
d
->
io_mem
,
NULL
,
&
i6300esb_ops
,
d
,
"i6300esb"
,
0x10
);
memory_region_init_io
(
&
d
->
io_mem
,
OBJECT
(
d
),
&
i6300esb_ops
,
d
,
"i6300esb"
,
0x10
);
pci_register_bar
(
&
d
->
dev
,
0
,
0
,
&
d
->
io_mem
);
/* qemu_register_coalesced_mmio (addr, 0x10); ? */
...
...
hw/xen/xen_apic.c
浏览文件 @
22fc860b
...
...
@@ -38,8 +38,8 @@ static const MemoryRegionOps xen_apic_io_ops = {
static
void
xen_apic_init
(
APICCommonState
*
s
)
{
memory_region_init_io
(
&
s
->
io_memory
,
NULL
,
&
xen_apic_io_ops
,
s
,
"xen-apic-msi"
,
APIC_SPACE_SIZE
);
memory_region_init_io
(
&
s
->
io_memory
,
OBJECT
(
s
),
&
xen_apic_io_ops
,
s
,
"xen-apic-msi"
,
APIC_SPACE_SIZE
);
#if defined(CONFIG_XEN_CTRL_INTERFACE_VERSION) \
&& CONFIG_XEN_CTRL_INTERFACE_VERSION >= 420
...
...
hw/xen/xen_platform.c
浏览文件 @
22fc860b
...
...
@@ -275,7 +275,7 @@ static const MemoryRegionOps platform_fixed_io_ops = {
static
void
platform_fixed_ioport_init
(
PCIXenPlatformState
*
s
)
{
memory_region_init_io
(
&
s
->
fixed_io
,
NULL
,
&
platform_fixed_io_ops
,
s
,
memory_region_init_io
(
&
s
->
fixed_io
,
OBJECT
(
s
)
,
&
platform_fixed_io_ops
,
s
,
"xen-fixed"
,
16
);
memory_region_add_subregion
(
get_system_io
(),
XEN_PLATFORM_IOPORT
,
&
s
->
fixed_io
);
...
...
@@ -319,7 +319,8 @@ static const MemoryRegionOps xen_pci_io_ops = {
static
void
platform_ioport_bar_setup
(
PCIXenPlatformState
*
d
)
{
memory_region_init_io
(
&
d
->
bar
,
NULL
,
&
xen_pci_io_ops
,
d
,
"xen-pci"
,
0x100
);
memory_region_init_io
(
&
d
->
bar
,
OBJECT
(
d
),
&
xen_pci_io_ops
,
d
,
"xen-pci"
,
0x100
);
}
static
uint64_t
platform_mmio_read
(
void
*
opaque
,
hwaddr
addr
,
...
...
@@ -347,7 +348,7 @@ static const MemoryRegionOps platform_mmio_handler = {
static
void
platform_mmio_setup
(
PCIXenPlatformState
*
d
)
{
memory_region_init_io
(
&
d
->
mmio_bar
,
NULL
,
&
platform_mmio_handler
,
d
,
memory_region_init_io
(
&
d
->
mmio_bar
,
OBJECT
(
d
)
,
&
platform_mmio_handler
,
d
,
"xen-mmio"
,
0x1000000
);
}
...
...
hw/xen/xen_pt.c
浏览文件 @
22fc860b
...
...
@@ -416,7 +416,7 @@ static int xen_pt_register_regions(XenPCIPassthroughState *s)
}
}
memory_region_init_io
(
&
s
->
bar
[
i
],
NULL
,
&
ops
,
&
s
->
dev
,
memory_region_init_io
(
&
s
->
bar
[
i
],
OBJECT
(
s
)
,
&
ops
,
&
s
->
dev
,
"xen-pci-pt-bar"
,
r
->
size
);
pci_register_bar
(
&
s
->
dev
,
i
,
type
,
&
s
->
bar
[
i
]);
...
...
@@ -440,7 +440,7 @@ static int xen_pt_register_regions(XenPCIPassthroughState *s)
s
->
bases
[
PCI_ROM_SLOT
].
access
.
maddr
=
d
->
rom
.
base_addr
;
memory_region_init_rom_device
(
&
s
->
rom
,
NULL
,
NULL
,
NULL
,
memory_region_init_rom_device
(
&
s
->
rom
,
OBJECT
(
s
)
,
NULL
,
NULL
,
"xen-pci-pt-rom"
,
d
->
rom
.
size
);
pci_register_bar
(
&
s
->
dev
,
PCI_ROM_SLOT
,
PCI_BASE_ADDRESS_MEM_PREFETCH
,
&
s
->
rom
);
...
...
hw/xen/xen_pt_msi.c
浏览文件 @
22fc860b
...
...
@@ -544,7 +544,8 @@ int xen_pt_msix_init(XenPCIPassthroughState *s, uint32_t base)
msix
->
msix_entry
[
i
].
pirq
=
XEN_PT_UNASSIGNED_PIRQ
;
}
memory_region_init_io
(
&
msix
->
mmio
,
NULL
,
&
pci_msix_ops
,
s
,
"xen-pci-pt-msix"
,
memory_region_init_io
(
&
msix
->
mmio
,
OBJECT
(
s
),
&
pci_msix_ops
,
s
,
"xen-pci-pt-msix"
,
(
total_entries
*
PCI_MSIX_ENTRY_SIZE
+
XC_PAGE_SIZE
-
1
)
&
XC_PAGE_MASK
);
...
...
hw/xtensa/xtensa_lx60.c
浏览文件 @
22fc860b
...
...
@@ -139,7 +139,7 @@ static void lx60_net_init(MemoryRegion *address_space,
sysbus_mmio_get_region
(
s
,
1
));
ram
=
g_malloc
(
sizeof
(
*
ram
));
memory_region_init_ram
(
ram
,
NULL
,
"open_eth.ram"
,
16384
);
memory_region_init_ram
(
ram
,
OBJECT
(
s
)
,
"open_eth.ram"
,
16384
);
vmstate_register_ram_global
(
ram
);
memory_region_add_subregion
(
address_space
,
buffers
,
ram
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录