This module implements the Nvme request/reply queues in RAM.
- Author
- Terry Barnaby (terry.nosp@m..bar.nosp@m.naby@.nosp@m.beam.nosp@m..ltd..nosp@m.uk)
- Date
- 2020-04-08
- Version
- 1.0.0
This module provides the ability to write a request to one of 4 Nvme request queues and receive the queued replies. This engine handles the queue location and informs the Nvme of the new queue entry by writing to the appropriate doorbell register. It supports queue memory reads from the Nvme device. When the Nvme writes to a reply queue, the queue reply message is directly sent on to the originator of the request as given in the CID field rather than stored in RAM. The process sending a requests simply uses a PcieWrite request to the appropriate queue's starting memory location. The NvmeQueue engine handles writing the queue entry data to the next available queue entry slot in RAM. The queue replies are converted into a PcieWrite request packet and sent on to the engine that created the original queue request. The address in the packet is set to the reply queues address (0x0201XXXXX) so that the originating engine can determine that this is a reply to its queued request. The module needs to know the dooerbell register stride of the actual NVMe devices in use. This is passed in as the NvmeRegStride parameter. The NumQueueEntries parameter defines the size of all queues.
- Copyright
- GNU GPL License Copyright (c) Beam Ltd, All rights reserved.
This code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this code. If not, see https://www.gnu.org/licenses/.