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
2ddf5f12
Commit
2ddf5f12
authored
Jan 24, 2022
by
Antoine Kaufmann
Browse files
lib/nicbm: add support for legacy interrupts
parent
1576ecf9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
lib/simbricks/nicbm/nicbm.cc
lib/simbricks/nicbm/nicbm.cc
+15
-0
lib/simbricks/nicbm/nicbm.h
lib/simbricks/nicbm/nicbm.h
+1
-0
No files found.
lib/simbricks/nicbm/nicbm.cc
View file @
2ddf5f12
...
...
@@ -233,6 +233,21 @@ void Runner::MsiXIssue(uint8_t vec) {
SIMBRICKS_PROTO_PCIE_D2H_OWN_HOST
;
}
void
Runner
::
IntXIssue
(
bool
level
)
{
volatile
union
SimbricksProtoPcieD2H
*
msg
=
D2HAlloc
();
#ifdef DEBUG_NICBM
printf
(
"nicbm: set intx interrupt %u
\n
"
,
level
);
#endif
volatile
struct
SimbricksProtoPcieD2HInterrupt
*
intr
=
&
msg
->
interrupt
;
intr
->
vector
=
0
;
intr
->
inttype
=
(
level
?
SIMBRICKS_PROTO_PCIE_INT_LEGACY_HI
:
SIMBRICKS_PROTO_PCIE_INT_LEGACY_LO
);
// WMB();
intr
->
own_type
=
SIMBRICKS_PROTO_PCIE_D2H_MSG_INTERRUPT
|
SIMBRICKS_PROTO_PCIE_D2H_OWN_HOST
;
}
void
Runner
::
EventSchedule
(
TimedEvent
&
evt
)
{
events_
.
insert
(
&
evt
);
}
...
...
lib/simbricks/nicbm/nicbm.h
View file @
2ddf5f12
...
...
@@ -161,6 +161,7 @@ class Runner {
void
IssueDma
(
DMAOp
&
op
);
void
MsiIssue
(
uint8_t
vec
);
void
MsiXIssue
(
uint8_t
vec
);
void
IntXIssue
(
bool
level
);
void
EthSend
(
const
void
*
data
,
size_t
len
);
void
EventSchedule
(
TimedEvent
&
evt
);
...
...
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