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

implement probe

Signed-off-by: Pascal Bauer <pascal.bauer@rwth-aachen.de>
This commit is contained in:
Pascal Bauer 2024-08-24 12:19:44 +02:00 committed by Niklas Eiling
parent 30db5090db
commit 9d16687539
2 changed files with 6 additions and 1 deletions

View file

@ -62,6 +62,7 @@ struct Region {
class PciDevice : public Device {
private:
static constexpr char PROBE_DEFAULT[] = "/sys/bus/pci/drivers_probe";
static constexpr char OVERRIDE_DEFAULT[] = "driver_override";
public:
@ -79,11 +80,11 @@ public:
std::string name() const override;
std::filesystem::path override_path() const override;
std::filesystem::path path() const override;
void probe() const override;
// Bind a new LKM to the PCI device
bool attachDriver(const std::string &driver) const;
std::list<Region> getRegions() const;
// Write 32-bit BAR value from to the PCI configuration space

View file

@ -485,3 +485,7 @@ std::filesystem::path PciDevice::override_path() const {
return this->path() / OVERRIDE_DEFAULT;
}
void PciDevice::probe() const {
write_to_file(this->name(), this->PROBE_DEFAULT);
}