Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
init.cpp
Go to the documentation of this file.
1#include "ahci/ahci.hpp"
2#include "ioforge/ioforge.h"
3#include <ioforge/ioforge.hpp>
4
6
9
13
15}
16
18
19 log(mod, "Module Loaded");
20 log(mod, "Looking for AHCI device 0x8086:0x2922");
21 dev_ = findDevice(0x8086, 0x2922);
22 if (!dev_) {
23 log(mod, "Device not found");
24 return;
25 }
26
27 log(mod, "Device found, calling setup");
28 setup();
29}
static AHCIModule instance
Definition init.cpp:5
void load() override
Definition init.cpp:17
struct ioforge_pci_device * dev_
Definition ahci.hpp:46
void unload() override
Definition init.cpp:14
void setup()
Definition ahci.cpp:568
static AHCIModule * getInstance()
Definition init.cpp:10
AHCIModule()
Definition init.cpp:7
const char * mod
Definition ioforge.hpp:65
struct ioforge_pci_device * findDevice(uint16_t vendor_id, uint16_t device_id)
IOforgePCI(const char *mod)
#define log(mod, fmt,...)
Definition ioforge.hpp:12
#define IoForgeModuleConstructor(Class)
Definition ioforge.hpp:7