XenevaOS
Loading...
Searching...
No Matches
Macros | Functions | Variables
nvme.cpp File Reference
#include <aurora.h>
#include <aucon.h>
#include <Hal\hal.h>
#include <Hal\x86_64_hal.h>
#include <Hal\serial.h>
#include "nvme.h"
#include <pcie.h>
#include <Mm\kmalloc.h>
#include <Mm\vmmngr.h>
#include <_null.h>
#include <Mm\pmmngr.h>
#include "namespace.h"
#include <Fs/vdisk.h>
Include dependency graph for nvme.cpp:

Macros

#define MIN(x, y)   ((x > y) ? y : x)
 

Functions

void NVMeOutl (int reg, uint32_t value)
 
uint32_t NVMeInl (int reg)
 
void NVMeOutW (int reg, uint16_t value)
 
uint16_t NVMeInW (int reg)
 
void NVMeOutB (int reg, uint8_t value)
 
uint8_t NVMeInB (int reg)
 
void NVMeOutQ (int reg, uint64_t value)
 
uint64_t NVMeInQ (int reg)
 
void NVMeResetController ()
 
void NVMeDisable ()
 
void NVMeEnable ()
 
void NVMeSetMemoryPageSize (uint32_t size)
 
void NVMeSetCommandSet (uint8_t set)
 
void NVMeSetAdminCQSize (uint16_t sz)
 
void NVMeSetAdminSQSize (uint16_t sz)
 
uint32_t NVMeGetSubmissionDoorbell (uint16_t queueID)
 
uint32_t NVMeGetCompletionDoorbell (uint16_t queueID)
 
NVMeQueueNVMeCreateQueue (uint16_t queueID, uint64_t cqSize, uint64_t sqSize)
 
void NVMeInterrupt (size_t vector, void *param)
 
NVMeQueueNVMeGetQueue (uint16_t queueid)
 
long time_diff (timeval *old, timeval *newt)
 
void NVMeSubmitCommand (NVMeQueue *queue, NVMeCommand *cmd, NVMeCompletion *comp)
 
void NVMeAllocateQueues (uint16_t num)
 
NVMeQueueNVMeCreateIOQueue ()
 
void NVMeIdentifyController ()
 
int NVMeInitialise ()
 
AU_EXTERN AU_EXPORT int AuDriverUnload ()
 
AU_EXTERN AU_EXPORT int AuDriverMain ()
 

Variables

NVMeDevnvme
 

Macro Definition Documentation

◆ MIN

#define MIN (   x,
 
)    ((x > y) ? y : x)

Function Documentation

◆ AuDriverMain()

AU_EXTERN AU_EXPORT int AuDriverMain ( )

◆ AuDriverUnload()

AU_EXTERN AU_EXPORT int AuDriverUnload ( )

◆ NVMeAllocateQueues()

void NVMeAllocateQueues ( uint16_t  num)

◆ NVMeCreateIOQueue()

NVMeQueue * NVMeCreateIOQueue ( )

◆ NVMeCreateQueue()

NVMeQueue * NVMeCreateQueue ( uint16_t  queueID,
uint64_t  cqSize,
uint64_t  sqSize 
)

◆ NVMeDisable()

void NVMeDisable ( )

◆ NVMeEnable()

void NVMeEnable ( )

◆ NVMeGetCompletionDoorbell()

uint32_t NVMeGetCompletionDoorbell ( uint16_t  queueID)

◆ NVMeGetQueue()

NVMeQueue * NVMeGetQueue ( uint16_t  queueid)

◆ NVMeGetSubmissionDoorbell()

uint32_t NVMeGetSubmissionDoorbell ( uint16_t  queueID)

◆ NVMeIdentifyController()

void NVMeIdentifyController ( )

◆ NVMeInB()

uint8_t NVMeInB ( int  reg)

◆ NVMeInitialise()

int NVMeInitialise ( )

◆ NVMeInl()

uint32_t NVMeInl ( int  reg)

◆ NVMeInQ()

uint64_t NVMeInQ ( int  reg)

◆ NVMeInterrupt()

void NVMeInterrupt ( size_t  vector,
void *  param 
)

◆ NVMeInW()

uint16_t NVMeInW ( int  reg)

◆ NVMeOutB()

void NVMeOutB ( int  reg,
uint8_t  value 
)

◆ NVMeOutl()

void NVMeOutl ( int  reg,
uint32_t  value 
)

◆ NVMeOutQ()

void NVMeOutQ ( int  reg,
uint64_t  value 
)

◆ NVMeOutW()

void NVMeOutW ( int  reg,
uint16_t  value 
)

◆ NVMeResetController()

void NVMeResetController ( )

◆ NVMeSetAdminCQSize()

void NVMeSetAdminCQSize ( uint16_t  sz)

◆ NVMeSetAdminSQSize()

void NVMeSetAdminSQSize ( uint16_t  sz)

◆ NVMeSetCommandSet()

void NVMeSetCommandSet ( uint8_t  set)

◆ NVMeSetMemoryPageSize()

void NVMeSetMemoryPageSize ( uint32_t  size)

◆ NVMeSubmitCommand()

void NVMeSubmitCommand ( NVMeQueue queue,
NVMeCommand cmd,
NVMeCompletion comp 
)

◆ time_diff()

long time_diff ( timeval old,
timeval newt 
)

Variable Documentation

◆ nvme

NVMeDev* nvme

BSD 2-Clause License

Copyright (c) 2022-2024, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.