[edk2-devel] ExtScsiPassThru support for Logical SCSI devices
Laszlo Ersek
lersek at redhat.com
Thu Jul 18 21:10:34 UTC 2019
On 07/18/19 18:02, Ravi Kumar Siadri wrote:
> Hi Laszlo Ersek / Hao Wu,
>
> I have gone through the Guide, i can see some points which are not
> very clear..
>
> [...]
Perhaps some examples will help.
In advance, I should mention a few things:
- This is just my interpretation of the spec, and of the guide.
- In my last email, the VenMsg suggestion was wrong. The device paths
for the physical channel(s) are built by appending Ctrl(n) --
"controller" -- hardware device path nodes, and not VenMsg() nodes.
- "Logical" means "channel with abstract devices, suitable for data
access & booting", "Physical" means "channel with physical devices,
used for diagnostics". A channel may be *both*, if each device on it
is both physical and logical simultaneously -- that is, it can be used
for data access / booting, and for low-level diagnostics.
So, the examples:
(A) non-RAID HBA
* Summary:
Handle#1: PciRoot(0x0)/Pci(0x1,0x0) -- channel where each device is (L + P)
Handle#2: PciRoot(0x0)/Pci(0x1,0x0)/Scsi(0x1,0x0) -- disk that is (L + P)
* Details:
Handle#1:
- device path: PciRoot(0x0)/Pci(0x1,0x0)
- handle created by PciBusDxe [= platform firmware]
- device path protocol installed by PciBusDxe
- PciIo protocol installed by PciBusDxe
- ExtScsiPassThru protocol installed by the SCSI HBA driver, through
consuming PciIo
- Logical bit set in ExtScsiPassThru: meaning that devices enumerated on
this channel can be used for data access & booting
- Physical bit set in ExtScsiPassThru: meaning that devices enumerated
on this channel can be sent diagnostic commands
Handle#2:
- device path: PciRoot(0x0)/Pci(0x1,0x0)/Scsi(0x1,0x0)
- handle created by ScsiBusDxe [= platform firmware]
- device path protocol installed by ScsiBusDxe (here: Target=1, Lun=0)
- ScsiIo protocol installed by ScsiBusDxe [= platform firmware], through
consuming ExtScsiPassThru on Handle#1
- BlockIo protocol installed by ScsiDiskDxe [= platform firmware],
through consuming ScsiIo on the same handle (= Handle#2)
(B) RAID HBA
* Summary:
Handle#1: PciRoot(0x0)/Pci(0x1,0x0) -- logical channel
Handle#2: PciRoot(0x0)/Pci(0x1,0x0)/Scsi(0x1,0x0) -- logical disk
Handle#3: PciRoot(0x0)/Pci(0x1,0x0)/Ctrl(0x0) -- physical channel
Handle#4: PciRoot(0x0)/Pci(0x1,0x0)/Ctrl(0x0)/Scsi(0x4,0x0) -- physical disk #0
Handle#5 PciRoot(0x0)/Pci(0x1,0x0)/Ctrl(0x0)/Scsi(0x4,0x1) -- physical disk #1
* Details:
Handle#1:
- The same as Handle#1 from (A), except the Physical bit is clear in the
ExtScsiPassThru protocol instance.
- This handle stands for the logical channel.
Handle#2:
- The same as Handle#2 from (A).
- This handle stands for the logical disk.
Handle#3:
- Device path: PciRoot(0x0)/Pci(0x1,0x0)/Ctrl(0x0).
- Handle created by the SCSI HBA driver.
- Device path installed by the SCSI HBA driver.
- ExtScsiPassThru protocol installed by the SCSI HBA driver, through
consuming PciIo on Handle#1.
- Logical bit is clear in ExtScsiPassThru.
- Physical bit is set in ExtScsiPassThru.
- This handle stands for the physical channel.
Handle#4:
- Device path: PciRoot(0x0)/Pci(0x1,0x0)/Ctrl(0x0)/Scsi(0x4,0x0)
- Handle created by ScsiBusDxe [= platform firmware].
- Device path protocol installed by ScsiBusDxe (here: Target=4, Lun=0).
- ScsiIo protocol installed by ScsiBusDxe [= platform firmware], through
consuming ExtScsiPassThru on Handle#3.
- BlockIo protocol is *NOT* installed by ScsiDiskDxe [= platform
firmware], due to the Logical bit being clear in ExtScsiPassThru on
Handle#3.
- This handle stands for the first physical disk in the array.
Handle#5:
- Same as Handle#4, with the following differences:
- Device path: PciRoot(0x0)/Pci(0x1,0x0)/Ctrl(0x0)/Scsi(0x4,0x1).
- This handle stands for the second physical disk in the array.
Hope this helps,
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#43971): https://edk2.groups.io/g/devel/message/43971
Mute This Topic: https://groups.io/mt/32007447/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list