69#include "../memory_map.h"
76 unsigned int rstCnt = 0;
78 xil_printf(
"!!! Wait until FTL reset complete !!! \r\n");
82 xil_printf(
"\r\nFTL reset complete!!! \r\n");
83 xil_printf(
"Turn on the host PC \r\n");
106 xil_printf(
"\r\nNVMe ready!!!\r\n");
112 unsigned int cmdValid;
132 if (nvmeCmd.
qID == 0)
148 if (nvmeReg.
ccShn != 0)
153 for (qID = 0; qID < 8; qID++)
167 xil_printf(
"\r\nNVMe shutdown!!!\r\n");
180 xil_printf(
"\r\nNVMe disable!!!\r\n");
186 for (qID = 0; qID < 8; qID++)
196 xil_printf(
"\r\nPcie iink disable!!!\r\n");
197 xil_printf(
"Wait few minute or reconnect the PCIe cable\r\n");
208 xil_printf(
"\r\nNVMe reset!!!\r\n");
void UpdateBadBlockTableForGrownBadBlock(unsigned int tempBufAddr)
Update the bad block table and persist to the specified block.
void InitFTL()
The entry function for FTL initialization.
void set_nvme_admin_queue(unsigned int sqValid, unsigned int cqValid, unsigned int cqIrqEn)
unsigned int check_nvme_cc_en()
void set_nvme_csts_shst(unsigned int shst)
void set_nvme_csts_rdy(unsigned int rdy)
void pcie_async_reset(unsigned int rstCnt)
unsigned int get_nvme_cmd(unsigned short *qID, unsigned short *cmdSlotTag, unsigned int *cmdSeqNum, unsigned int *cmdDword)
void set_io_sq(unsigned int ioSqIdx, unsigned int valid, unsigned int cqVector, unsigned int qSzie, unsigned int pcieBaseAddrL, unsigned int pcieBaseAddrH)
void set_io_cq(unsigned int ioCqIdx, unsigned int valid, unsigned int irqEn, unsigned int irqVector, unsigned int qSzie, unsigned int pcieBaseAddrL, unsigned int pcieBaseAddrH)
#define NVME_STATUS_REG_ADDR
#define RESERVED_DATA_BUFFER_BASE_ADDR
#define NVME_TASK_WAIT_RESET
#define NVME_TASK_WAIT_CC_EN
#define NVME_TASK_RUNNING
#define NVME_TASK_SHUTDOWN
void handle_nvme_admin_cmd(NVME_COMMAND *nvmeCmd)
void handle_nvme_io_cmd(NVME_COMMAND *nvmeCmd)
volatile NVME_CONTEXT g_nvmeTask
unsigned int blockedReqCnt
NVME_DMA_REQUEST_QUEUE nvmeDmaReqQ
unsigned int notCompletedNandReqCnt
#define REQ_SLOT_TAG_NONE
void SchedulingNandReq()
Iteratively do schedule on each channel by calling SchedulingNandReqPerCh.
unsigned short cmdSlotTag
unsigned int cmdDword[16]