1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

platform intc

This commit is contained in:
Pascal Bauer 2024-09-20 17:13:25 +02:00
parent 14a8c67bd2
commit aee77860ba

View file

@ -0,0 +1,22 @@
#pragma once
#include <villas/fpga/ips/intc.hpp>
#include <villas/kernel/vfio_device.hpp>
class PlatformInterruptController
: public villas::fpga::ip::InterruptController {
public:
PlatformInterruptController(
std::shared_ptr<villas::kernel::vfio::Device> vfioDevice) {
//TODO: efds
this->num_irqs = vfioDevice->platformInterruptInit(efds);
}
bool enableInterrupt(IrqMaskType mask, bool polling) override {
for (int i = 0; i < num_irqs; i++) {
if (mask & (1 << i))
this->polling[i] = polling;
}
return true;
}
};