|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#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_device * | virtio_root = 0 |
| __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).
| name | The name of the file or directory. |
| vnode | Pointer to the associated VNode (inode data). Pass NULL if the VNode is not yet available. |
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.
|
static |
Definition at line 78 of file virtio.c.
References ioforge_pci_device::bar, virtio_pci_cap::bar, ioforge_pci_device::base, ioforge_virtio_device::common_cfg, device, ioforge_device::first_child, for_each_virtio_device(), ioforge_attach(), IOFORGE_F_VIRTIO, IOFORGE_PCI, IOFORGE_VIRTIO, ioforge_pci_bar::iospace, ioforge_virtio_device::isr_cfg, kalloc(), kfree(), LOG2_ERROR, LOG2_INFO, memcopy(), memset(), ioforge_device::next_sibling, ioforge_virtio_device::notify_cfg, ioforge_virtio_device::pci, pci, pci_read8(), ioforge_device::type, VIRTIO_PCI_CAP, virtio_root, and virtio_scan_capabilities().
Referenced by for_each_virtio_device(), and INIT().
| INIT | ( | Virtio | ) |
Definition at line 179 of file virtio.c.
References for_each_virtio_device(), ioforge_attach(), ioforge_get_pci_root(), ioforge_get_root(), IOFORGE_ROOT, kalloc(), LOG2_INFO, memset(), pci_root, strcpy(), and virtio_root.
|
static |
Definition at line 14 of file virtio.c.
References bar, virtio_pci_cap::bar, cap_len, ioforge_virtio_device::common_cfg, ioforge_virtio_device::isr_cfg, LOG2_INFO, LOG2_WARN, ioforge_virtio_device::notify_cfg, offset, pci, pci_read32(), pci_read8(), VIRTIO_PCI_CAP_COMMON_CFG, VIRTIO_PCI_CAP_ISR_CFG, and VIRTIO_PCI_CAP_NOTIFY_CFG.
Referenced by for_each_virtio_device().
| struct ioforge_device* virtio_root = 0 |
Definition at line 11 of file virtio.c.
Referenced by __attribute__(), for_each_virtio_device(), and INIT().