Turnstone Operating System
Loading...
Searching...
No Matches
nvme.64.c File Reference

nvme driver. More...

#include <driver/nvme.h>
#include <pci.h>
#include <logging.h>
#include <memory/frame.h>
#include <memory/paging.h>
#include <time/timer.h>
#include <apic.h>
#include <hashmap.h>
#include <cpu/task.h>
#include <utils.h>

Functions

 MODULE ("turnstone.kernel.hw.drivers")
 
void video_text_print (const char *str)
 
int8_t nvme_isr (interrupt_frame_ext_t *frame)
 
int8_t nvme_format (nvme_disk_t *nvme_disk)
 
int8_t nvme_identify (nvme_disk_t *nvme_disk, uint32_t cns, uint32_t nsid, uint64_t data_address)
 
int8_t nvme_enable_cache (nvme_disk_t *nvme_disk)
 
int8_t nvme_set_queue_count (nvme_disk_t *nvme_disk, uint16_t io_sq_count, uint16_t io_cq_count)
 
future_tnvme_read_write (uint64_t disk_id, uint64_t lba, uint32_t size, uint8_t *buffer, boolean_t write)
 
int8_t nvme_send_admin_command (nvme_disk_t *nvme_disk, uint8_t opcode, uint8_t fuse, uint32_t nsid, uint64_t mptr, uint64_t prp1, uint64_t prp2, uint32_t cdw10, uint32_t cdw11, uint32_t cdw12, uint32_t cdw13, uint32_t cdw14, uint32_t cdw15, uint32_t *sdw0)
 
static void video_int_print (uint64_t i)
 
const nvme_disk_tnvme_get_disk_by_id (uint64_t disk_id)
 
int8_t nvme_init (memory_heap_t *heap, list_t *nvme_pci_devices)
 initialize nvme devices More...
 
future_tnvme_read (uint64_t disk_id, uint64_t lba, uint32_t size, uint8_t *buffer)
 
future_tnvme_write (uint64_t disk_id, uint64_t lba, uint32_t size, uint8_t *buffer)
 
future_tnvme_flush (uint64_t disk_id)
 

Variables

hashmap_tnvme_disks = NULL
 
hashmap_tnvme_disk_isr_map = NULL
 

Detailed Description

nvme driver.

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Function Documentation

◆ nvme_init()

int8_t nvme_init ( memory_heap_t heap,
list_t nvme_pci_devices 
)

initialize nvme devices

Parameters
[in]heapthe heap for storing data
[in]nvme_pci_devicespci device list contains nvmes
Returns
nvme disk count