适用于Windows 2000的NVMe驱动程序,面向x86和Alpha AXP平台。
NVMe driver for Windows 2000, targeting both x86 and Alpha AXP platforms

原始链接: https://github.com/techomancer/nvme2k

## NVMe2K:Windows 2000 NVMe 驱动程序摘要 NVMe2K 是一个实验性的 SCSI 迷你端口驱动程序,旨在为 Windows 2000 带来 NVMe 固态驱动器支持,目标平台包括 x86 和 Alpha AXP。它基于 ScsiPort 框架构建,允许 Windows 2000 识别和利用通过 PCI 总线(类代码 01-08-02)连接的 NVMe 设备。 该驱动程序是一个概念验证,提供基本功能,但存在限制:单个 I/O 队列、传统中断处理(INTx)、有限的并发传输以及不支持命名空间或电源管理。配置通过 INF 文件实现,调整队列深度和散布/收集列表大小等参数。调试支持通过 WinDbg 和 ScsiDebugPrint 进行。 NVMe2K 使用 Visual C++ 6.0 和 Windows 2000 DDK 开发,并采用 3-Clause BSD 许可。**它不提供任何担保,仅供实验使用,存在数据丢失或系统不稳定的风险。** 未来的开发方向包括多队列支持、MSI-X 中断和性能优化。

黑客新闻 新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Windows 2000 的 NVMe 驱动程序,面向 x86 和 Alpha AXP 平台 (github.com/techomancer) 24 分,由 zdw 1 小时前发布 | 隐藏 | 过去 | 收藏 | 讨论 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

A NVMe (Non-Volatile Memory Express) storage controller driver for Windows 2000, targeting both x86 and Alpha AXP platforms.

NVMe2K is a SCSI miniport driver that provides NVMe device support for Windows 2000. It uses the ScsiPort framework to integrate NVMe solid-state drives with the Windows 2000 storage stack.

It seemed like a good idea at first.

Application Layer
       ↓
  SCSI Disk Driver
       ↓
   ScsiPort.sys
       ↓
   nvme2k.sys ← This driver
       ↓
  NVMe Controller (PCI)
  • nvme2k.c - Main driver logic
  • nvme2k_nvme.c - NVMe controller logic
  • nvme2k_scsi.c - SCSI command handling
  • nvme2k_cpl.c - NVMe completion handling
  • nvme2k.h - Data structures, constants, NVMe register definitions
  • nvme2k.inf - Multi-platform installation file
  • Windows 2000 DDK

    • Final version (5.00.2195.1) for x86
    • RC1 version for Alpha AXP (does anyone have RC2 besides hoarders at betanews?)
  • Visual C++ 6.0

    • x86 compiler for x86 builds
    • Alpha AXP compiler for Alpha builds
REM Set up build environment
cd C:\NTDDK\bin
setenv.bat C:\NTDDK free          REM or 'checked' for debug build

REM Navigate to driver directory
cd <path-to-nvme2k>

REM Build
build -cZ

Output: obj\i386\nvme2k.sys

REM Set up build environment for Alpha
cd C:\NTDDK\bin
setenv.bat C:\NTDDK free    REM or 'checked' for debug build

REM Navigate to driver directory
cd <path-to-nvme2k>

REM Build
build -cZ

Output: obj\alpha\nvme2k.sys

Edit nvme2k.h to configure:

#define NVME2K_DBG                    // Enable debug logging
// #define NVME2K_DBG_CMD             // Extra verbose command logging

Creating Installation Media

Create the following directory structure:

DriverDisk\
├── nvme2k.inf
├── i386\
│   └── nvme2k.sys    (x86 binary)
└── alpha\
    └── nvme2k.sys    (Alpha AXP binary)
  1. Copy driver files to installation media
  2. Boot Windows 2000
  3. Use Device Manager or Add Hardware Wizard
  4. Point to the driver location when prompted
  5. Select "NVMe Storage Controller (Windows 2000)"

Note: The driver requires NVMe devices to be visible on the PCI bus with class code 01-08-02 (Mass Storage - Non-Volatile Memory - NVMe).

The driver supports registry-based configuration via the INF file:

  • MaximumSGList (Default: 512) - Maximum scatter-gather list entries
  • NumberOfRequests (Default: 32) - Queue depth
  • MaxQueueDepth (Default: 32) - Tagged command queue depth

Enable checked (debug) builds and use WinDbg with the Windows 2000 kernel debugger:

!scsiport.miniport <DeviceExtension>
!devobj <DeviceObject>

Debug messages are output via ScsiDebugPrint() and visible in checked builds.

  • Single I/O queue pair (no multi-queue support)
  • No MSI/MSI-X interrupt support (uses legacy INTx)
  • Maximum 10 concurrent large transfers (PRP list pool limitation)
  • No namespace management (assumes namespace 1)
  • No power management features
  • Tested primarily in virtualized environments and Windows 2000 RC2 on Alpha
  1. NonTaggedInFlight - Ensures only one non-tagged request at a time

All locks can be disabled via #define for performance testing.

  • Uncached Extension - 64KB for queues and PRP lists (DMA-accessible)
  • Admin Queue - 4KB submission + 4KB completion (power-of-2 sized)
  • I/O Queue - 4KB submission + 4KB completion (power-of-2 sized)
  • PRP List Pool - 40KB (10 pages) for scatter-gather
Bit 15: Non-tagged flag (1 = non-tagged, 0 = tagged)
Bit 14: Ordered flush flag (for ORDERED queue tags)
Bits 0-13: QueueTag (tagged) or sequence number (non-tagged)
For admin queue command get log page, PRP slot is added to base CID
so we dont leak them if SRB is not available. For some reason SCSIPORT doesn't
return SRB when we ask it for SMART commands.

This project is licensed under the 3-Clause BSD License. See the LICENSE file for the full license text.

USE AT YOUR OWN RISK. This driver is experimental and may cause data loss, system instability, or hardware damage. Not recommended for production use.

  • ✅ Free to use, modify, and distribute
  • ✅ Commercial use permitted
  • ✅ Modification and redistribution allowed
  • ⚠️ No warranty provided
  • ⚠️ Use at your own risk

Feel free to submit issues or pull requests. Areas of interest:

  • Multi-queue support
  • MSI-X interrupt support (is it even possible?)
  • Power management
  • Additional SCSI command translations
  • Performance optimizations
  • NVMe specification authors
  • Windows 2000 DDK documentation
  • Alpha AXP architecture documentation
  • Everyone who thought this was a terrible idea (you were right)

Disclaimer: This is an unofficial, community-developed driver. Not affiliated with any company or the NVMe standards body.

联系我们 contact @ memedata.com