Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jan 2025 13:24:14 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        j_yoon.choi@samsung.com
Cc:        "freebsd-hackers@FreeBSD.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Universal Flash Storage Driver Proposal
Message-ID:  <CANCZdfotpi0W8ivsShzvWqgaCQhCOU0enb_RrPn7QdMEvvXpnw@mail.gmail.com>
In-Reply-To: <20250117045346epcms2p61099ea651d3ca3f00e3134dd00e6a9ac@epcms2p6>
References:  <CGME20250117045346epcms2p61099ea651d3ca3f00e3134dd00e6a9ac@epcms2p6> <20250117045346epcms2p61099ea651d3ca3f00e3134dd00e6a9ac@epcms2p6>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000004280a8062c00d07d
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Jaeyoon

This sounds really cool!

What layering scheme did you have in mind to allow multiple storage devices
per
controller? Will it be a new kind of SIM in the CAM layer, or will it be
SCSI with
a different transport? Is this a full SCSI implementation, or will the CAM
periph
drivers need to restrict the requests they send down for this? We already
have a
number of subsets that we handle in an ad-hoc way, but maybe we need to be
a little
more organized about it.

In the past, I've helped with the MMC and NVMe integration intro CAM, so I
have
an interest....

Warner

On Thu, Jan 16, 2025 at 9:54=E2=80=AFPM Jaeyoon Choi <j_yoon.choi@samsung.c=
om>
wrote:

> Hello,
>
> As I mentioned in my previous email to the mailing list last year, I am
> planning
> to start developing a Universal Flash Storage Driver.
> - https://lists.freebsd.org/archives/freebsd-hackers/2024-July/003385.htm=
l
> Before I begin working on the driver, I would like to share my developmen=
t
> plan
> with you.
>
> Universal Flash Storage (UFS) is a storage device for mobile devices whic=
h
> aims
> for high performance and low power consumption.
> UFS is currently used in most smartphones and tablets, and I believe ther=
e
> is a
> demand for UFS support in FreeBSD.
>
> The Universal Flash Storage Driver is named UFSHCI to avoid confusion wit=
h
> the
> UFS filesystem, and is located in the /sys/dev/ufshci folder.
>
> The driver will be developed based on the UFS 4.1 (JESD220G) and UFSHCI 4=
.1
> (JESD223F) specification documents, which are the latest versions
> available.
> The latest specifications can be found at the following link:
> -
> https://www.jedec.org/standards-documents/focus/flash/universal-flash-sto=
rage-ufs
>
> My plan is to first implement a PCIe-based driver and then make it
> compatible
> with various smartphone application processors.
> Since UFS uses SCSI commands, we need to use the SCSI I/O path of the CAM=
.
>
> Please note that there is currently a UFSHCI driver in development for
> OpenBSD,
> but due to its low spec version (UFSHCI 2.1) and lack of compatibility wi=
th
> FreeBSD, I have decided to start from scratch.
>
> The following platforms will be used for testing:
> - QEMU with Emulated UFS device
> - Samsung Galaxy Book S (Intel Lakefield + eUFS)
> - Lenovo Duet3 11ian8 (Intel N100 + eUFS)
>
> After developing the UFSHCI driver, I will continue to work on additional
> features and keep the driver up-to-date with the latest specs.
> The approximate development plan is as follows:
>
> - 2025 1H: Implementation of initialization, basic operations, and single
>            doorbell-based read/write I/O on Intel CPU-based platforms
> - 2025 2H: Implementation of MCQ-based read/write I/O, and implementation
> of
>            additional features such as writebooster
>
> I look forward to receiving your feedback and suggestions.
>
> Best regards,
> Jaeyoon
>
>

--0000000000004280a8062c00d07d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Jaeyoon<div><br></div><div>This sounds really cool!=C2=
=A0</div><div><br></div><div>What layering scheme did you have in mind to a=
llow multiple storage devices per</div><div>controller? Will it be a new ki=
nd of SIM in the CAM layer, or will it be SCSI with</div><div>a different t=
ransport? Is this a full SCSI implementation, or will the CAM periph</div><=
div>drivers need to restrict the requests they send down for this? We alrea=
dy have a</div><div>number of subsets that we handle in an ad-hoc way, but =
maybe we need to be a little</div><div>more organized about it.</div><div><=
br></div><div>In the past, I&#39;ve helped with the MMC and NVMe integratio=
n intro=C2=A0CAM, so I have</div><div>an interest....</div><div><br></div><=
div>Warner</div></div><br><div class=3D"gmail_quote gmail_quote_container">=
<div dir=3D"ltr" class=3D"gmail_attr">On Thu, Jan 16, 2025 at 9:54=E2=80=AF=
PM Jaeyoon Choi &lt;<a href=3D"mailto:j_yoon.choi@samsung.com">j_yoon.choi@=
samsung.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">Hello,<br>
<br>
As I mentioned in my previous email to the mailing list last year, I am pla=
nning<br>
to start developing a Universal Flash Storage Driver.<br>
- <a href=3D"https://lists.freebsd.org/archives/freebsd-hackers/2024-July/0=
03385.html" rel=3D"noreferrer" target=3D"_blank">https://lists.freebsd.org/=
archives/freebsd-hackers/2024-July/003385.html</a><br>
Before I begin working on the driver, I would like to share my development =
plan<br>
with you.<br>
<br>
Universal Flash Storage (UFS) is a storage device for mobile devices which =
aims<br>
for high performance and low power consumption.<br>
UFS is currently used in most smartphones and tablets, and I believe there =
is a<br>
demand for UFS support in FreeBSD.<br>
<br>
The Universal Flash Storage Driver is named UFSHCI to avoid confusion with =
the <br>
UFS filesystem, and is located in the /sys/dev/ufshci folder.<br>
<br>
The driver will be developed based on the UFS 4.1 (JESD220G) and UFSHCI 4.1=
<br>
(JESD223F) specification documents, which are the latest versions available=
.<br>
The latest specifications can be found at the following link:<br>
- <a href=3D"https://www.jedec.org/standards-documents/focus/flash/universa=
l-flash-storage-ufs" rel=3D"noreferrer" target=3D"_blank">https://www.jedec=
.org/standards-documents/focus/flash/universal-flash-storage-ufs</a><br>
<br>
My plan is to first implement a PCIe-based driver and then make it compatib=
le<br>
with various smartphone application processors.<br>
Since UFS uses SCSI commands, we need to use the SCSI I/O path of the CAM.<=
br>
<br>
Please note that there is currently a UFSHCI driver in development for Open=
BSD,<br>
but due to its low spec version (UFSHCI 2.1) and lack of compatibility with=
<br>
FreeBSD, I have decided to start from scratch.<br>
<br>
The following platforms will be used for testing:<br>
- QEMU with Emulated UFS device<br>
- Samsung Galaxy Book S (Intel Lakefield + eUFS)<br>
- Lenovo Duet3 11ian8 (Intel N100 + eUFS)<br>
<br>
After developing the UFSHCI driver, I will continue to work on additional<b=
r>
features and keep the driver up-to-date with the latest specs.<br>
The approximate development plan is as follows:<br>
<br>
- 2025 1H: Implementation of initialization, basic operations, and single<b=
r>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0doorbell-based read/write I/O on I=
ntel CPU-based platforms<br>
- 2025 2H: Implementation of MCQ-based read/write I/O, and implementation o=
f<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0additional features such as writeb=
ooster<br>
<br>
I look forward to receiving your feedback and suggestions.<br>
<br>
Best regards,<br>
Jaeyoon<br>
<br>
</blockquote></div>

--0000000000004280a8062c00d07d--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfotpi0W8ivsShzvWqgaCQhCOU0enb_RrPn7QdMEvvXpnw>