2
0
mirror of https://git.missingno.dev/kolibrios-nvme-driver/ synced 2024-12-23 06:18:47 +01:00
Commit Graph

214 Commits

Author SHA1 Message Date
4a1f7a5475 fix: add check to make sure p_nvme_devices isnt null 2024-08-03 13:05:12 -04:00
b2f63c4997 refactor(nvme_cleanup): add proper cleanup 2024-08-02 14:01:20 -04:00
e1ad8f643d fix: dont load driver if no NVMe disk was successfully initialized 2024-08-02 13:37:32 -04:00
c9d58c1ec7 fix: add null terminator to IDENTC ASCII strings
This prevents garbage and redundant values from being printed to the
debug log.
2024-08-02 13:17:16 -04:00
0f140a9c90 chore: remove useless fields from pcidev struct 2024-08-02 13:16:09 -04:00
f40321f869 refactor: dont map MMIO registers twice 2024-08-02 12:54:41 -04:00
404f451e0c fix PRP list allocation regression 2024-08-01 13:49:18 -04:00
365ccac9eb fix regression 2024-08-01 12:25:30 -04:00
d36f13f7af fix: initialize command mutexes correctly 2024-08-01 12:08:41 -04:00
0cbf662a9f perf: use memcpyd instead of memcpy 2024-08-01 12:02:07 -04:00
7cc1601d90 add assertions to make sure submission and completion queue sizes are the same 2024-07-31 16:05:55 -04:00
e9f371d20b fix: assign CDW10.QSIZE in create I/O queues to correct value 2024-07-31 15:48:38 -04:00
1463187a62 add debug message for showcasing CAP.MQES 2024-07-31 15:36:37 -04:00
9998faa834 build: add proper nvme.asm dependencies 2024-07-31 15:26:06 -04:00
edafe73367 rename: lib.asm -> lib.inc 2024-07-31 15:25:23 -04:00
e8a5910681 refactor: move NVMe commands to a separate file 2024-07-31 15:24:54 -04:00
534103061c important bug fix and some micro optimizations
As for the fix, the submission queues weren't properly being zeroed out
due to a small typo. The other stuff has some commented out stuff that
I'm currently debugging and working on.
2024-07-31 15:11:21 -04:00
a88a44c627 initialize command entries 2024-07-30 17:22:28 -04:00
6a8ab65661 another bug fix (2) 2024-07-30 15:09:49 -04:00
25ee3eb491 another bug fix 2024-07-30 14:59:46 -04:00
c3901b163e bug fixes 2024-07-30 14:38:53 -04:00
dd4db45869 fix: use correct NVMe disk parameter 2024-07-30 13:52:37 -04:00
362a97ab12 chore: remove useless constants 2024-07-30 13:49:27 -04:00
6262634324 feat: implement support for multiple NVMe drives 2024-07-30 13:48:50 -04:00
0d7f6b1c8f misc: set vim syntax to fasm 2024-07-30 12:39:00 -04:00
13f65bea18 ignore: *.py 2024-07-30 11:32:19 -04:00
d153c63abb remove CNS byte check in nvme_identify 2024-07-30 11:31:51 -04:00
c9e138d89f add verbose debug logs in nvme_init 2024-07-27 12:16:56 -04:00
bee583765f disable MSI interrupts if present 2024-07-26 14:42:46 -04:00
3d78f22409 make sure interrupts are enabled in PCI header 2024-07-26 13:14:50 -04:00
18b76f70b2 fix(nvme_poll): jump after timeout 2024-07-26 06:14:45 -04:00
7c4626b5f1 fix: initialize NSINFO.nsid in nvme_init 2024-07-25 18:50:01 -04:00
4b9fe7f4c0 significant refactoring
* Removed useless `nvme_wait` call
* Remove phase tag bit check in favor of spinlock checking
* Added back in queue wrapping (though, it still needs work)
* Fix in `is_queue_full` which didn't pop bx off the stack when
returning in some circumstances
2024-07-25 18:34:54 -04:00
0a2b3bfe9d remove useless phase_tag field 2024-07-25 18:31:15 -04:00
80e64d4d70 add LOCK_SPINLOCK macro 2024-07-25 18:30:28 -04:00
01fc77ba69 refactor: print controller version during initialization 2024-07-25 14:14:29 -04:00
6c120b8767 add TODO 2024-07-23 19:43:37 -04:00
a5c1920c0e more bloat removal 2024-07-23 14:59:08 -04:00
835840231f more code removal 2024-07-23 14:14:43 -04:00
39dcfd2edc perf: remove some unneeded code bloat 2024-07-23 14:10:42 -04:00
1b88a4ff17 feat: add in write to disk functions and remove unnecessary div in nvme_init 2024-07-23 13:04:52 -04:00
e3241e35cc perf(size): remove useless pow2 implementation 2024-07-22 14:19:54 -04:00
1ea8733a66 fix: PRP list creation bug 2024-07-21 17:08:51 -04:00
1599185ef4 fix(nvme_readwrite): free allocated PRP list after I/O command completion 2024-07-21 14:21:10 -04:00
7e71c33f3f fix: nvme_readwrite and build_prp_list
This fixes the number of PRPs calculation before build_prp_list is
invoked. It also accounts for the fact that the NLB field in the NVMe
I/O read and write commands is a 0-based value, unlike numsectors.
start_sector is also converted into the appropriate LBA number as it
should be before sending the I/O command.
2024-07-21 14:14:04 -04:00
bb952838ca fix: DiskAdd string 2024-07-20 17:20:32 -04:00
0eea7a6130 refactor: tweak some things
First of all, the driver will now abort initialization if it encounters
the first found namespace LBADS is not 512, since KolibriOS doesn't
support a LBADS greater than 512 as of now.

This commit also removes verbose debug logs and adds appropriate error
codes to nvme_readwrite
2024-07-20 16:38:12 -04:00
c21376dde4 add IOCTL error codes 2024-07-18 17:58:15 -04:00
9632b2841d fix: apply PRP offset error fix 2024-07-18 17:24:28 -04:00
1e315791fb fix: PRP list allocation 2024-07-18 17:01:26 -04:00