Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
ad6d45fa
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看板
提交
ad6d45fa
编写于
12月 12, 2011
作者:
A
Anthony Liguori
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qom: add vga node to the pc composition tree
Signed-off-by:
N
Anthony Liguori
<
aliguori@us.ibm.com
>
上级
b2b6c39a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
38 addition
and
27 deletion
+38
-27
hw/cirrus_vga.c
hw/cirrus_vga.c
+5
-3
hw/pc.c
hw/pc.c
+16
-10
hw/pc.h
hw/pc.h
+7
-7
hw/pc_piix.c
hw/pc_piix.c
+5
-1
hw/vga-pci.c
hw/vga-pci.c
+2
-3
hw/vmware_vga.h
hw/vmware_vga.h
+3
-3
未找到文件。
hw/cirrus_vga.c
浏览文件 @
ad6d45fa
...
@@ -2899,7 +2899,7 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci,
...
@@ -2899,7 +2899,7 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci,
*
*
***************************************/
***************************************/
void
isa_cirrus_vga_init
(
MemoryRegion
*
system_memory
)
DeviceState
*
isa_cirrus_vga_init
(
MemoryRegion
*
system_memory
)
{
{
CirrusVGAState
*
s
;
CirrusVGAState
*
s
;
...
@@ -2913,6 +2913,8 @@ void isa_cirrus_vga_init(MemoryRegion *system_memory)
...
@@ -2913,6 +2913,8 @@ void isa_cirrus_vga_init(MemoryRegion *system_memory)
vmstate_register
(
NULL
,
0
,
&
vmstate_cirrus_vga
,
s
);
vmstate_register
(
NULL
,
0
,
&
vmstate_cirrus_vga
,
s
);
rom_add_vga
(
VGABIOS_CIRRUS_FILENAME
);
rom_add_vga
(
VGABIOS_CIRRUS_FILENAME
);
/* XXX ISA-LFB support */
/* XXX ISA-LFB support */
/* FIXME not qdev yet */
return
NULL
;
}
}
/***************************************
/***************************************
...
@@ -2955,9 +2957,9 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
...
@@ -2955,9 +2957,9 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
return
0
;
return
0
;
}
}
void
pci_cirrus_vga_init
(
PCIBus
*
bus
)
DeviceState
*
pci_cirrus_vga_init
(
PCIBus
*
bus
)
{
{
pci_create_simple
(
bus
,
-
1
,
"cirrus-vga"
)
;
return
&
pci_create_simple
(
bus
,
-
1
,
"cirrus-vga"
)
->
qdev
;
}
}
static
PCIDeviceInfo
cirrus_vga_info
=
{
static
PCIDeviceInfo
cirrus_vga_info
=
{
...
...
hw/pc.c
浏览文件 @
ad6d45fa
...
@@ -1069,38 +1069,44 @@ qemu_irq *pc_allocate_cpu_irq(void)
...
@@ -1069,38 +1069,44 @@ qemu_irq *pc_allocate_cpu_irq(void)
return
qemu_allocate_irqs
(
pic_irq_request
,
NULL
,
1
);
return
qemu_allocate_irqs
(
pic_irq_request
,
NULL
,
1
);
}
}
void
pc_vga_init
(
PCIBus
*
pci_bus
)
DeviceState
*
pc_vga_init
(
PCIBus
*
pci_bus
)
{
{
DeviceState
*
dev
=
NULL
;
if
(
cirrus_vga_enabled
)
{
if
(
cirrus_vga_enabled
)
{
if
(
pci_bus
)
{
if
(
pci_bus
)
{
pci_cirrus_vga_init
(
pci_bus
);
dev
=
pci_cirrus_vga_init
(
pci_bus
);
}
else
{
}
else
{
isa_cirrus_vga_init
(
get_system_memory
());
dev
=
isa_cirrus_vga_init
(
get_system_memory
());
}
}
}
else
if
(
vmsvga_enabled
)
{
}
else
if
(
vmsvga_enabled
)
{
if
(
pci_bus
)
{
if
(
pci_bus
)
{
if
(
!
pci_vmsvga_init
(
pci_bus
))
{
dev
=
pci_vmsvga_init
(
pci_bus
);
if
(
!
dev
)
{
fprintf
(
stderr
,
"Warning: vmware_vga not available,"
fprintf
(
stderr
,
"Warning: vmware_vga not available,"
" using standard VGA instead
\n
"
);
" using standard VGA instead
\n
"
);
pci_vga_init
(
pci_bus
);
dev
=
pci_vga_init
(
pci_bus
);
}
}
}
else
{
}
else
{
fprintf
(
stderr
,
"%s: vmware_vga: no PCI bus
\n
"
,
__FUNCTION__
);
fprintf
(
stderr
,
"%s: vmware_vga: no PCI bus
\n
"
,
__FUNCTION__
);
}
}
#ifdef CONFIG_SPICE
#ifdef CONFIG_SPICE
}
else
if
(
qxl_enabled
)
{
}
else
if
(
qxl_enabled
)
{
if
(
pci_bus
)
if
(
pci_bus
)
{
pci_create_simple
(
pci_bus
,
-
1
,
"qxl-vga"
)
;
dev
=
&
pci_create_simple
(
pci_bus
,
-
1
,
"qxl-vga"
)
->
qdev
;
else
}
else
{
fprintf
(
stderr
,
"%s: qxl: no PCI bus
\n
"
,
__FUNCTION__
);
fprintf
(
stderr
,
"%s: qxl: no PCI bus
\n
"
,
__FUNCTION__
);
}
#endif
#endif
}
else
if
(
std_vga_enabled
)
{
}
else
if
(
std_vga_enabled
)
{
if
(
pci_bus
)
{
if
(
pci_bus
)
{
pci_vga_init
(
pci_bus
);
dev
=
pci_vga_init
(
pci_bus
);
}
else
{
}
else
{
isa_vga_init
();
dev
=
isa_vga_init
();
}
}
}
}
return
dev
;
}
}
static
void
cpu_request_exit
(
void
*
opaque
,
int
irq
,
int
level
)
static
void
cpu_request_exit
(
void
*
opaque
,
int
irq
,
int
level
)
...
...
hw/pc.h
浏览文件 @
ad6d45fa
...
@@ -140,7 +140,7 @@ void pc_memory_init(MemoryRegion *system_memory,
...
@@ -140,7 +140,7 @@ void pc_memory_init(MemoryRegion *system_memory,
MemoryRegion
*
rom_memory
,
MemoryRegion
*
rom_memory
,
MemoryRegion
**
ram_memory
);
MemoryRegion
**
ram_memory
);
qemu_irq
*
pc_allocate_cpu_irq
(
void
);
qemu_irq
*
pc_allocate_cpu_irq
(
void
);
void
pc_vga_init
(
PCIBus
*
pci_bus
);
DeviceState
*
pc_vga_init
(
PCIBus
*
pci_bus
);
void
pc_basic_device_init
(
qemu_irq
*
gsi
,
void
pc_basic_device_init
(
qemu_irq
*
gsi
,
ISADevice
**
rtc_state
,
ISADevice
**
rtc_state
,
ISADevice
**
floppy
,
ISADevice
**
floppy
,
...
@@ -205,27 +205,27 @@ enum vga_retrace_method {
...
@@ -205,27 +205,27 @@ enum vga_retrace_method {
extern
enum
vga_retrace_method
vga_retrace_method
;
extern
enum
vga_retrace_method
vga_retrace_method
;
static
inline
int
isa_vga_init
(
void
)
static
inline
DeviceState
*
isa_vga_init
(
void
)
{
{
ISADevice
*
dev
;
ISADevice
*
dev
;
dev
=
isa_try_create
(
"isa-vga"
);
dev
=
isa_try_create
(
"isa-vga"
);
if
(
!
dev
)
{
if
(
!
dev
)
{
fprintf
(
stderr
,
"Warning: isa-vga not available
\n
"
);
fprintf
(
stderr
,
"Warning: isa-vga not available
\n
"
);
return
0
;
return
NULL
;
}
}
qdev_init_nofail
(
&
dev
->
qdev
);
qdev_init_nofail
(
&
dev
->
qdev
);
return
1
;
return
&
dev
->
qdev
;
}
}
int
pci_vga_init
(
PCIBus
*
bus
);
DeviceState
*
pci_vga_init
(
PCIBus
*
bus
);
int
isa_vga_mm_init
(
target_phys_addr_t
vram_base
,
int
isa_vga_mm_init
(
target_phys_addr_t
vram_base
,
target_phys_addr_t
ctrl_base
,
int
it_shift
,
target_phys_addr_t
ctrl_base
,
int
it_shift
,
MemoryRegion
*
address_space
);
MemoryRegion
*
address_space
);
/* cirrus_vga.c */
/* cirrus_vga.c */
void
pci_cirrus_vga_init
(
PCIBus
*
bus
);
DeviceState
*
pci_cirrus_vga_init
(
PCIBus
*
bus
);
void
isa_cirrus_vga_init
(
MemoryRegion
*
address_space
);
DeviceState
*
isa_cirrus_vga_init
(
MemoryRegion
*
address_space
);
/* ne2000.c */
/* ne2000.c */
static
inline
bool
isa_ne2000_init
(
int
base
,
int
irq
,
NICInfo
*
nd
)
static
inline
bool
isa_ne2000_init
(
int
base
,
int
irq
,
NICInfo
*
nd
)
...
...
hw/pc_piix.c
浏览文件 @
ad6d45fa
...
@@ -99,6 +99,7 @@ static void pc_init1(MemoryRegion *system_memory,
...
@@ -99,6 +99,7 @@ static void pc_init1(MemoryRegion *system_memory,
MemoryRegion
*
ram_memory
;
MemoryRegion
*
ram_memory
;
MemoryRegion
*
pci_memory
;
MemoryRegion
*
pci_memory
;
MemoryRegion
*
rom_memory
;
MemoryRegion
*
rom_memory
;
DeviceState
*
dev
;
pc_cpus_init
(
cpu_model
);
pc_cpus_init
(
cpu_model
);
...
@@ -168,7 +169,10 @@ static void pc_init1(MemoryRegion *system_memory,
...
@@ -168,7 +169,10 @@ static void pc_init1(MemoryRegion *system_memory,
pc_register_ferr_irq
(
gsi
[
13
]);
pc_register_ferr_irq
(
gsi
[
13
]);
pc_vga_init
(
pci_enabled
?
pci_bus
:
NULL
);
dev
=
pc_vga_init
(
pci_enabled
?
pci_bus
:
NULL
);
if
(
dev
)
{
qdev_property_add_child
(
qdev_get_root
(),
"vga"
,
dev
,
NULL
);
}
if
(
xen_enabled
())
{
if
(
xen_enabled
())
{
pci_create_simple
(
pci_bus
,
-
1
,
"xen-platform"
);
pci_create_simple
(
pci_bus
,
-
1
,
"xen-platform"
);
...
...
hw/vga-pci.c
浏览文件 @
ad6d45fa
...
@@ -70,10 +70,9 @@ static int pci_vga_initfn(PCIDevice *dev)
...
@@ -70,10 +70,9 @@ static int pci_vga_initfn(PCIDevice *dev)
return
0
;
return
0
;
}
}
int
pci_vga_init
(
PCIBus
*
bus
)
DeviceState
*
pci_vga_init
(
PCIBus
*
bus
)
{
{
pci_create_simple
(
bus
,
-
1
,
"VGA"
);
return
&
pci_create_simple
(
bus
,
-
1
,
"VGA"
)
->
qdev
;
return
0
;
}
}
static
PCIDeviceInfo
vga_info
=
{
static
PCIDeviceInfo
vga_info
=
{
...
...
hw/vmware_vga.h
浏览文件 @
ad6d45fa
...
@@ -4,15 +4,15 @@
...
@@ -4,15 +4,15 @@
#include "qemu-common.h"
#include "qemu-common.h"
/* vmware_vga.c */
/* vmware_vga.c */
static
inline
bool
pci_vmsvga_init
(
PCIBus
*
bus
)
static
inline
DeviceState
*
pci_vmsvga_init
(
PCIBus
*
bus
)
{
{
PCIDevice
*
dev
;
PCIDevice
*
dev
;
dev
=
pci_try_create
(
bus
,
-
1
,
"vmware-svga"
);
dev
=
pci_try_create
(
bus
,
-
1
,
"vmware-svga"
);
if
(
!
dev
||
qdev_init
(
&
dev
->
qdev
)
<
0
)
{
if
(
!
dev
||
qdev_init
(
&
dev
->
qdev
)
<
0
)
{
return
false
;
return
NULL
;
}
else
{
}
else
{
return
true
;
return
&
dev
->
qdev
;
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录