public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: Ravi Kumar Siadri <siadriravikumaruefi@gmail.com>,
	michael.d.kinney@intel.com,
	Leif Lindholm <leif.lindholm@linaro.org>,
	"Wu, Hao A" <hao.a.wu@intel.com>,
	"Cetola, Stephano" <stephano.cetola@intel.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>
Subject: Re: [edk2-devel] ExtScsiPassThru support for Logical SCSI devices
Date: Thu, 18 Jul 2019 23:10:34 +0200	[thread overview]
Message-ID: <afec4b75-b466-25c6-12bd-04060657c2f5@redhat.com> (raw)
In-Reply-To: <CAHPR0Q1oFYAq=OSFx8auDDC+e0vDNpO3_kr5Dp56=79x67TGeA@mail.gmail.com>

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

  reply	other threads:[~2019-07-18 21:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-10 12:32 ExtScsiPassThru support for Logical SCSI devices Ravi Kumar Siadri
2019-07-12 22:10 ` [edk2-devel] " Laszlo Ersek
2019-07-15  5:25   ` Wu, Hao A
2019-07-18 16:02     ` Ravi Kumar Siadri
2019-07-18 21:10       ` Laszlo Ersek [this message]
     [not found] <CAHPR0Q2RMR2TXUgHchw5X-ojRx7DQL1xBisucHsVxxfc28Hd=w@mail.gmail.com>
2019-06-12  4:00 ` Ravi Kumar Siadri
2019-06-12  7:55   ` [edk2-devel] " Wu, Hao A
2019-06-13  8:18     ` Ravi Kumar Siadri
2019-06-14  5:51       ` Wu, Hao A
2019-07-07  6:58         ` Ravi Kumar Siadri
2019-07-08  3:09           ` Wu, Hao A
2019-07-08  8:35             ` Ravi Kumar Siadri
2019-07-11 12:59               ` Wu, Hao A

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=afec4b75-b466-25c6-12bd-04060657c2f5@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox