Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 835928e

Browse files
author
IgnoreWarnings
committed
fix interrupts
1 parent 877fd5f commit 835928e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/core.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ std::list<std::shared_ptr<Core>> CoreFactory::make(Card *card,
184184
// return device.get_name() == nameToFind;
185185
// });
186186

187+
//! TODO: Order of interrupts is hardcoded and not tested (may be reversed). Aviable in vfio device irq.id .
187188
std::vector<const char *> intc_names = {"mm2s_introut", "s2mm_introut"};
189+
int num = 0;
188190
for (auto name : intc_names)
189191
{
190192
auto intc = new PlatformInterruptController();
@@ -193,11 +195,11 @@ std::list<std::shared_ptr<Core>> CoreFactory::make(Card *card,
193195

194196
const char *irqName = name;
195197
std::string irqControllerName = "PlatformInterruptController";
196-
int num = 0;
197198

198199
logger->debug("IRQ: {} -> {}:{}", irqName, irqControllerName, num);
199200
ip->irqs[irqName] = {num, intc, ""};
200201

202+
num++;
201203
}
202204
}
203205

0 commit comments

Comments
 (0)