Member-only story

Data transfer and buffers — SSD Firmware Development — Part 14

Lan D. Phan
3 min readJul 13, 2019

--

Recall that host and device communication involves hand-shaking, submission of commands, and data transfer between host and device. Up to this point, we have actually been inaccurately representing part of that reality in our SsdSim. Specifically, the data transfer from host to device and vice versa. Reality is, in order for the device to work with information and data from the host, it needs to transfer it to the device’s memory (either to buffer or memory on the device’s Host Interface hardware component). Certain protocol data can be transferred to and fro between Host Controller and Host Interface Controller on the device, other bulk data are generally transferred to “buffer memory”. Figure 1 illustrates. This requires that the SSD implements the ability to manage buffers. In fact, it is one of the essential aspects of an SSD that we will talk a bit about in this part.

Note in the code up to the previous part, in SimpleFtl, we do have a notion of the “buffer”, within WriteToNand and ReadFromNand. However, we cheated a bit as we were able to access the buffer from the host’s side through the CustomProtocolInterface directly: U8* buffer = _CustomProtocolInterface->GetBuffer(command, bufferSizeInBytes. To reflect reality, the device must have its own buffer that it could allocate for usage. For SSD’s, buffers are not just memory…

--

--

No responses yet