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.
4#include "virtio/virtio.h"
5
7
9}
10
14
16}
17
19 log(mod, "Module Loaded");
20
21 dev_ = find_virtio_device_by_id(0x1AF4, 0x1050);
22 if (!dev_) {
23 log(mod, "No Virtio-GPU device found");
24 return;
25 }
26
27 log(mod, "Found Virtio-GPU device at %d:%d:%d", dev_->pci.pci_bus,
28 dev_->pci.pci_dev, dev_->pci.pci_func);
29 setup();
30}
static AHCIModule instance
Definition init.cpp:5
const char * mod
Definition ioforge.hpp:65
IoForgeVirtio(const char *mod)
void load() override
Definition init.cpp:18
void setup()
ioforge_virtio_device * dev_
static VirtioGpu * getInstance()
Definition init.cpp:11
VirtioGpu()
Definition init.cpp:8
void unload() override
Definition init.cpp:15
#define log(mod, fmt,...)
Definition ioforge.hpp:12
#define IoForgeModuleConstructor(Class)
Definition ioforge.hpp:7
struct ioforge_virtio_device * find_virtio_device_by_id(uint16_t vendor_id, uint16_t device_id)