Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
e110ddd0
Commit
e110ddd0
authored
Jun 07, 2020
by
Antoine Kaufmann
Browse files
proto,dummy_nic: pass vendor/device/revision/class ids to host
parent
ff94c928
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
dummy_nic/dummy_nic.c
dummy_nic/dummy_nic.c
+6
-0
proto/cosim_pcie_proto.h
proto/cosim_pcie_proto.h
+11
-0
No files found.
dummy_nic/dummy_nic.c
View file @
e110ddd0
...
@@ -81,6 +81,12 @@ int main(int argc, char *argv[])
...
@@ -81,6 +81,12 @@ int main(int argc, char *argv[])
di
.
bars
[
2
].
len
=
128
;
di
.
bars
[
2
].
len
=
128
;
di
.
bars
[
2
].
flags
=
COSIM_PCIE_PROTO_BAR_IO
;
di
.
bars
[
2
].
flags
=
COSIM_PCIE_PROTO_BAR_IO
;
di
.
pci_vendor_id
=
0x4321
;
di
.
pci_device_id
=
0x1234
;
di
.
pci_class
=
0x02
;
di
.
pci_subclass
=
0x00
;
di
.
pci_revision
=
0x00
;
if
(
uxsocket_send
(
pci_cfd
,
&
di
,
sizeof
(
di
),
shm_fd
))
{
if
(
uxsocket_send
(
pci_cfd
,
&
di
,
sizeof
(
di
),
shm_fd
))
{
return
EXIT_FAILURE
;
return
EXIT_FAILURE
;
}
}
...
...
proto/cosim_pcie_proto.h
View file @
e110ddd0
...
@@ -48,6 +48,17 @@ struct cosim_pcie_proto_dev_intro {
...
@@ -48,6 +48,17 @@ struct cosim_pcie_proto_dev_intro {
/** flags (see COSIM_PCIE_PROTO_BAR_*) */
/** flags (see COSIM_PCIE_PROTO_BAR_*) */
uint64_t
flags
;
uint64_t
flags
;
}
__attribute__
((
packed
))
bars
[
COSIM_PCIE_PROTO_NBARS
];
}
__attribute__
((
packed
))
bars
[
COSIM_PCIE_PROTO_NBARS
];
/** PCI vendor id */
uint16_t
pci_vendor_id
;
/** PCI device id */
uint16_t
pci_device_id
;
/* PCI class */
uint8_t
pci_class
;
/* PCI subclass */
uint8_t
pci_subclass
;
/* PCI revision */
uint8_t
pci_revision
;
}
__attribute__
((
packed
));
}
__attribute__
((
packed
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment