Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Jan 2025 09:26:02 +0900
From:      Jaeyoon Choi <j_yoon.choi@samsung.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        "freebsd-hackers@FreeBSD.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Universal Flash Storage Driver Proposal
Message-ID:  <20250121002602epcms2p6067990e98b8143ff596d90af0ec54492@epcms2p6>
In-Reply-To: <CANCZdfotpi0W8ivsShzvWqgaCQhCOU0enb_RrPn7QdMEvvXpnw@mail.gmail.com>
References:  <CANCZdfotpi0W8ivsShzvWqgaCQhCOU0enb_RrPn7QdMEvvXpnw@mail.gmail.com> <20250117045346epcms2p61099ea651d3ca3f00e3134dd00e6a9ac@epcms2p6> <CGME20250117045346epcms2p61099ea651d3ca3f00e3134dd00e6a9ac@epcms2p6>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Warner

Thank you for your reply.
I have learned a lot from your presentation and paper.

Universal Flash Storage (UFS) only attaches one device to a single controll=
er,
meaning there is only one SCSI target.
UFS supports a subset of SCSI commands, so the CAM periph driver may need t=
o
restrict requests for certain commands.
(e.g. UFS does not support the MODE SENSE(6), READ(12)/WRITE(12) commands).

So, I think I can just use the existing SCSI transport. Am I right?
(I'm referring to sys/dev/usb/storage/umass.c and sys/dev/virtio/scsi/virti=
o_scsi.c).

I would greatly appreciate your advice.

Thank you,
Jaeyoon

> Hi Jaeyoon
>=20
> This sounds really cool=21
>=20
> What layering scheme did you have in mind to allow multiple storage devic=
es
> 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 CA=
M
> 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 b=
e
> a little
> more organized about it.
>=20
> In the past, I've helped with the MMC and NVMe integration intro CAM, so =
I
> have
> an interest....
>=20
> Warner
>=20
> On Thu, Jan 16, 2025 at 9:54=E2=80=AFPM=20Jaeyoon=20Choi=20<j_yoon.choi=
=40samsung.com>=0D=0A>=20wrote:=0D=0A>=20=0D=0A>=20>=20Hello,=0D=0A>=20>=0D=
=0A>=20>=20As=20I=20mentioned=20in=20my=20previous=20email=20to=20the=20mai=
ling=20list=20last=20year,=20I=20am=0D=0A>=20>=20planning=0D=0A>=20>=20to=
=20start=20developing=20a=20Universal=20Flash=20Storage=20Driver.=0D=0A>=20=
>=20-=20https://lists.freebsd.org/archives/freebsd-hackers/2024-July/003385=
.html=0D=0A>=20>=20Before=20I=20begin=20working=20on=20the=20driver,=20I=20=
would=20like=20to=20share=20my=20development=0D=0A>=20>=20plan=0D=0A>=20>=
=20with=20you.=0D=0A>=20>=0D=0A>=20>=20Universal=20Flash=20Storage=20(UFS)=
=20is=20a=20storage=20device=20for=20mobile=20devices=20which=0D=0A>=20>=20=
aims=0D=0A>=20>=20for=20high=20performance=20and=20low=20power=20consumptio=
n.=0D=0A>=20>=20UFS=20is=20currently=20used=20in=20most=20smartphones=20and=
=20tablets,=20and=20I=20believe=20there=0D=0A>=20>=20is=20a=0D=0A>=20>=20de=
mand=20for=20UFS=20support=20in=20FreeBSD.=0D=0A>=20>=0D=0A>=20>=20The=20Un=
iversal=20Flash=20Storage=20Driver=20is=20named=20UFSHCI=20to=20avoid=20con=
fusion=20with=0D=0A>=20>=20the=0D=0A>=20>=20UFS=20filesystem,=20and=20is=20=
located=20in=20the=20/sys/dev/ufshci=20folder.=0D=0A>=20>=0D=0A>=20>=20The=
=20driver=20will=20be=20developed=20based=20on=20the=20UFS=204.1=20(JESD220=
G)=20and=20UFSHCI=204.1=0D=0A>=20>=20(JESD223F)=20specification=20documents=
,=20which=20are=20the=20latest=20versions=0D=0A>=20>=20available.=0D=0A>=20=
>=20The=20latest=20specifications=20can=20be=20found=20at=20the=20following=
=20link:=0D=0A>=20>=20-=0D=0A>=20>=20https://www.jedec.org/standards-docume=
nts/focus/flash/universal-flash-storage-ufs=0D=0A>=20>=0D=0A>=20>=20My=20pl=
an=20is=20to=20first=20implement=20a=20PCIe-based=20driver=20and=20then=20m=
ake=20it=0D=0A>=20>=20compatible=0D=0A>=20>=20with=20various=20smartphone=
=20application=20processors.=0D=0A>=20>=20Since=20UFS=20uses=20SCSI=20comma=
nds,=20we=20need=20to=20use=20the=20SCSI=20I/O=20path=20of=20the=20CAM.=0D=
=0A>=20>=0D=0A>=20>=20Please=20note=20that=20there=20is=20currently=20a=20U=
FSHCI=20driver=20in=20development=20for=0D=0A>=20>=20OpenBSD,=0D=0A>=20>=20=
but=20due=20to=20its=20low=20spec=20version=20(UFSHCI=202.1)=20and=20lack=
=20of=20compatibility=20with=0D=0A>=20>=20FreeBSD,=20I=20have=20decided=20t=
o=20start=20from=20scratch.=0D=0A>=20>=0D=0A>=20>=20The=20following=20platf=
orms=20will=20be=20used=20for=20testing:=0D=0A>=20>=20-=20QEMU=20with=20Emu=
lated=20UFS=20device=0D=0A>=20>=20-=20Samsung=20Galaxy=20Book=20S=20(Intel=
=20Lakefield=20+=20eUFS)=0D=0A>=20>=20-=20Lenovo=20Duet3=2011ian8=20(Intel=
=20N100=20+=20eUFS)=0D=0A>=20>=0D=0A>=20>=20After=20developing=20the=20UFSH=
CI=20driver,=20I=20will=20continue=20to=20work=20on=20additional=0D=0A>=20>=
=20features=20and=20keep=20the=20driver=20up-to-date=20with=20the=20latest=
=20specs.=0D=0A>=20>=20The=20approximate=20development=20plan=20is=20as=20f=
ollows:=0D=0A>=20>=0D=0A>=20>=20-=202025=201H:=20Implementation=20of=20init=
ialization,=20basic=20operations,=20and=20single=0D=0A>=20>=20=20=20=20=20=
=20=20=20=20=20=20=20doorbell-based=20read/write=20I/O=20on=20Intel=20CPU-b=
ased=20platforms=0D=0A>=20>=20-=202025=202H:=20Implementation=20of=20MCQ-ba=
sed=20read/write=20I/O,=20and=20implementation=0D=0A>=20>=20of=0D=0A>=20>=
=20=20=20=20=20=20=20=20=20=20=20=20additional=20features=20such=20as=20wri=
tebooster=0D=0A>=20>=0D=0A>=20>=20I=20look=20forward=20to=20receiving=20you=
r=20feedback=20and=20suggestions.=0D=0A>=20>=0D=0A>=20>=20Best=20regards,=
=0D=0A>=20>=20Jaeyoon=0D=0A>=20>=0D=0A>=20>



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