Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
virtio.c File Reference
#include "init/init.h"
#include "ioforge/ioforge.h"
#include "ioforge/ioforge_pci.h"
#include "ioforge/ioforge_virtio.h"
#include "libk/serial.h"
#include "type.h"
#include <virtio/virtio.h>
#include <str.h>
#include <hal/pci/pci.h>

Go to the source code of this file.

Functions

static void virtio_scan_capabilities (struct ioforge_pci_device *pci, uint16_t virtio_cap, struct ioforge_virtio_device *v)
 
static void for_each_virtio_device (struct ioforge_device *node)
 
 INIT (Virtio)
 
 __attribute__ ((used, visibility("default"), section(".export")))
 This function handles memory allocation for a new dentry using the slab allocator.
 

Variables

struct ioforge_devicevirtio_root = 0
 

Function Documentation

◆ __attribute__()

__attribute__ ( (used, visibility("default"), section(".export")) )

This function handles memory allocation for a new dentry using the slab allocator.

It also links the dentry to its corresponding VNode (if provided).

Note
This function performs lazy initialization of the dentry slab cache if it does not exist yet.
Parameters
nameThe name of the file or directory.
vnodePointer to the associated VNode (inode data). Pass NULL if the VNode is not yet available.
Returns
dentry_ptr A pointer to the newly allocated and initialized dentry.

Definition at line 195 of file virtio.c.

References ioforge_pci_device::device_id, IOFORGE_VIRTIO, KERNEL_API, ioforge_device::next_sibling, NULL, ioforge_virtio_device::pci, ioforge_device::type, ioforge_pci_device::vendor_id, and virtio_root.

◆ for_each_virtio_device()

◆ INIT()

◆ virtio_scan_capabilities()

Variable Documentation

◆ virtio_root

struct ioforge_device* virtio_root = 0

Definition at line 11 of file virtio.c.

Referenced by __attribute__(), for_each_virtio_device(), and INIT().