Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
4e3db917
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,发现更多精彩内容 >>
提交
4e3db917
编写于
10月 05, 2009
作者:
A
Aurelien Jarno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "eepro100: Remove unused device status entries"
This reverts commit
3031efab
.
上级
09d85fb8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
62 addition
and
16 deletion
+62
-16
hw/eepro100.c
hw/eepro100.c
+62
-16
未找到文件。
hw/eepro100.c
浏览文件 @
4e3db917
...
@@ -195,6 +195,19 @@ typedef struct {
...
@@ -195,6 +195,19 @@ typedef struct {
uint8_t
cmd
;
uint8_t
cmd
;
uint32_t
start
;
uint32_t
start
;
uint32_t
stop
;
uint32_t
stop
;
uint8_t
boundary
;
uint8_t
tsr
;
uint8_t
tpsr
;
uint16_t
tcnt
;
uint16_t
rcnt
;
uint32_t
rsar
;
uint8_t
rsr
;
uint8_t
rxcr
;
uint8_t
isr
;
uint8_t
dcfg
;
uint8_t
imr
;
uint8_t
phys
[
6
];
/* mac address */
uint8_t
curpag
;
uint8_t
mult
[
8
];
/* multicast mask array */
uint8_t
mult
[
8
];
/* multicast mask array */
int
mmio_index
;
int
mmio_index
;
VLANClientState
*
vc
;
VLANClientState
*
vc
;
...
@@ -203,6 +216,7 @@ typedef struct {
...
@@ -203,6 +216,7 @@ typedef struct {
uint8_t
int_stat
;
/* PCI interrupt status */
uint8_t
int_stat
;
/* PCI interrupt status */
uint32_t
region
[
3
];
/* PCI region addresses */
uint32_t
region
[
3
];
/* PCI region addresses */
uint8_t
macaddr
[
6
];
uint8_t
macaddr
[
6
];
uint32_t
statcounter
[
19
];
uint16_t
mdimem
[
32
];
uint16_t
mdimem
[
32
];
eeprom_t
*
eeprom
;
eeprom_t
*
eeprom
;
uint32_t
device
;
/* device variant */
uint32_t
device
;
/* device variant */
...
@@ -214,8 +228,7 @@ typedef struct {
...
@@ -214,8 +228,7 @@ typedef struct {
uint32_t
ru_base
;
/* RU base address */
uint32_t
ru_base
;
/* RU base address */
uint32_t
ru_offset
;
/* RU address offset */
uint32_t
ru_offset
;
/* RU address offset */
uint32_t
statsaddr
;
/* pointer to eepro100_stats_t */
uint32_t
statsaddr
;
/* pointer to eepro100_stats_t */
/* Statistical counters. Also used for wake-up packet (i82559). */
eepro100_stats_t
statistics
;
/* statistical counters */
eepro100_stats_t
statistics
;
#if 0
#if 0
uint16_t status;
uint16_t status;
#endif
#endif
...
@@ -227,10 +240,6 @@ typedef struct {
...
@@ -227,10 +240,6 @@ typedef struct {
uint8_t
mem
[
PCI_MEM_SIZE
];
uint8_t
mem
[
PCI_MEM_SIZE
];
}
EEPRO100State
;
}
EEPRO100State
;
/* Parameters for nic_save, nic_load. */
static
const
int
eepro100_instance
=
-
1
;
static
const
int
eepro100_version
=
20090807
;
/* Default values for MDI (PHY) registers */
/* Default values for MDI (PHY) registers */
static
const
uint16_t
eepro100_mdi_default
[]
=
{
static
const
uint16_t
eepro100_mdi_default
[]
=
{
/* MDI Registers 0 - 6, 7 */
/* MDI Registers 0 - 6, 7 */
...
@@ -1579,29 +1588,50 @@ static int nic_load(QEMUFile * f, void *opaque, int version_id)
...
@@ -1579,29 +1588,50 @@ static int nic_load(QEMUFile * f, void *opaque, int version_id)
int
i
;
int
i
;
int
ret
;
int
ret
;
if
(
version_id
!=
eepro100_version
)
{
if
(
version_id
>
3
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
version_id
>=
3
)
{
ret
=
pci_device_load
(
&
s
->
dev
,
f
);
if
(
ret
<
0
)
return
ret
;
}
}
ret
=
pci_device_load
(
&
s
->
dev
,
f
);
if
(
version_id
>=
2
)
{
if
(
ret
<
0
)
{
qemu_get_8s
(
f
,
&
s
->
rxcr
);
return
ret
;
}
else
{
s
->
rxcr
=
0x0c
;
}
}
qemu_get_8s
(
f
,
&
s
->
cmd
);
qemu_get_8s
(
f
,
&
s
->
cmd
);
qemu_get_be32s
(
f
,
&
s
->
start
);
qemu_get_be32s
(
f
,
&
s
->
start
);
qemu_get_be32s
(
f
,
&
s
->
stop
);
qemu_get_be32s
(
f
,
&
s
->
stop
);
qemu_get_8s
(
f
,
&
s
->
boundary
);
qemu_get_8s
(
f
,
&
s
->
tsr
);
qemu_get_8s
(
f
,
&
s
->
tpsr
);
qemu_get_be16s
(
f
,
&
s
->
tcnt
);
qemu_get_be16s
(
f
,
&
s
->
rcnt
);
qemu_get_be32s
(
f
,
&
s
->
rsar
);
qemu_get_8s
(
f
,
&
s
->
rsr
);
qemu_get_8s
(
f
,
&
s
->
isr
);
qemu_get_8s
(
f
,
&
s
->
dcfg
);
qemu_get_8s
(
f
,
&
s
->
imr
);
qemu_get_buffer
(
f
,
s
->
phys
,
6
);
qemu_get_8s
(
f
,
&
s
->
curpag
);
qemu_get_buffer
(
f
,
s
->
mult
,
8
);
qemu_get_buffer
(
f
,
s
->
mult
,
8
);
qemu_get_buffer
(
f
,
s
->
mem
,
sizeof
(
s
->
mem
));
qemu_get_buffer
(
f
,
s
->
mem
,
sizeof
(
s
->
mem
));
/* Restore all members of struct between scv_stat and mem. */
/* Restore all members of struct between scv_stat and mem. */
qemu_get_8s
(
f
,
&
s
->
scb_stat
);
qemu_get_8s
(
f
,
&
s
->
scb_stat
);
qemu_get_8s
(
f
,
&
s
->
int_stat
);
qemu_get_8s
(
f
,
&
s
->
int_stat
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
s
->
region
)
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
qemu_get_be32s
(
f
,
&
s
->
region
[
i
]);
qemu_get_be32s
(
f
,
&
s
->
region
[
i
]);
}
}
qemu_get_buffer
(
f
,
s
->
macaddr
,
6
);
qemu_get_buffer
(
f
,
s
->
macaddr
,
6
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
s
->
mdimem
);
i
++
)
{
for
(
i
=
0
;
i
<
19
;
i
++
)
{
qemu_get_be32s
(
f
,
&
s
->
statcounter
[
i
]);
}
for
(
i
=
0
;
i
<
32
;
i
++
)
{
qemu_get_be16s
(
f
,
&
s
->
mdimem
[
i
]);
qemu_get_be16s
(
f
,
&
s
->
mdimem
[
i
]);
}
}
/* The eeprom should be saved and restored by its own routines. */
/* The eeprom should be saved and restored by its own routines. */
...
@@ -1652,20 +1682,37 @@ static void nic_save(QEMUFile * f, void *opaque)
...
@@ -1652,20 +1682,37 @@ static void nic_save(QEMUFile * f, void *opaque)
pci_device_save
(
&
s
->
dev
,
f
);
pci_device_save
(
&
s
->
dev
,
f
);
qemu_put_8s
(
f
,
&
s
->
rxcr
);
qemu_put_8s
(
f
,
&
s
->
cmd
);
qemu_put_8s
(
f
,
&
s
->
cmd
);
qemu_put_be32s
(
f
,
&
s
->
start
);
qemu_put_be32s
(
f
,
&
s
->
start
);
qemu_put_be32s
(
f
,
&
s
->
stop
);
qemu_put_be32s
(
f
,
&
s
->
stop
);
qemu_put_8s
(
f
,
&
s
->
boundary
);
qemu_put_8s
(
f
,
&
s
->
tsr
);
qemu_put_8s
(
f
,
&
s
->
tpsr
);
qemu_put_be16s
(
f
,
&
s
->
tcnt
);
qemu_put_be16s
(
f
,
&
s
->
rcnt
);
qemu_put_be32s
(
f
,
&
s
->
rsar
);
qemu_put_8s
(
f
,
&
s
->
rsr
);
qemu_put_8s
(
f
,
&
s
->
isr
);
qemu_put_8s
(
f
,
&
s
->
dcfg
);
qemu_put_8s
(
f
,
&
s
->
imr
);
qemu_put_buffer
(
f
,
s
->
phys
,
6
);
qemu_put_8s
(
f
,
&
s
->
curpag
);
qemu_put_buffer
(
f
,
s
->
mult
,
8
);
qemu_put_buffer
(
f
,
s
->
mult
,
8
);
qemu_put_buffer
(
f
,
s
->
mem
,
sizeof
(
s
->
mem
));
qemu_put_buffer
(
f
,
s
->
mem
,
sizeof
(
s
->
mem
));
/* Save all members of struct between scv_stat and mem. */
/* Save all members of struct between scv_stat and mem. */
qemu_put_8s
(
f
,
&
s
->
scb_stat
);
qemu_put_8s
(
f
,
&
s
->
scb_stat
);
qemu_put_8s
(
f
,
&
s
->
int_stat
);
qemu_put_8s
(
f
,
&
s
->
int_stat
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
s
->
region
)
;
i
++
)
{
for
(
i
=
0
;
i
<
3
;
i
++
)
{
qemu_put_be32s
(
f
,
&
s
->
region
[
i
]);
qemu_put_be32s
(
f
,
&
s
->
region
[
i
]);
}
}
qemu_put_buffer
(
f
,
s
->
macaddr
,
6
);
qemu_put_buffer
(
f
,
s
->
macaddr
,
6
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
s
->
mdimem
);
i
++
)
{
for
(
i
=
0
;
i
<
19
;
i
++
)
{
qemu_put_be32s
(
f
,
&
s
->
statcounter
[
i
]);
}
for
(
i
=
0
;
i
<
32
;
i
++
)
{
qemu_put_be16s
(
f
,
&
s
->
mdimem
[
i
]);
qemu_put_be16s
(
f
,
&
s
->
mdimem
[
i
]);
}
}
/* The eeprom should be saved and restored by its own routines. */
/* The eeprom should be saved and restored by its own routines. */
...
@@ -1768,8 +1815,7 @@ static int nic_init(PCIDevice *pci_dev, uint32_t device)
...
@@ -1768,8 +1815,7 @@ static int nic_init(PCIDevice *pci_dev, uint32_t device)
qemu_register_reset
(
nic_reset
,
s
);
qemu_register_reset
(
nic_reset
,
s
);
register_savevm
(
s
->
vc
->
model
,
eepro100_instance
,
eepro100_version
,
register_savevm
(
s
->
vc
->
model
,
-
1
,
3
,
nic_save
,
nic_load
,
s
);
nic_save
,
nic_load
,
s
);
return
0
;
return
0
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录