public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Alistair Francis" <alistair23@gmail.com>
To: devel@edk2.groups.io
Cc: zhiqiang.zhao@intel.com, qi1.zhang@intel.com,  "Yao,
	Jiewen" <jiewen.yao@intel.com>,
	wenxing.hou@intel.com
Subject: [edk2-devel] mDeviceSecurityProtocol with SPDM
Date: Tue, 11 Jun 2024 15:42:29 +1000	[thread overview]
Message-ID: <CAKmqyKObJJWXfwWQOoi8rfb_VAVz6X8oHSrdGEKhBdw3FYvD6w@mail.gmail.com> (raw)

Hello,

I'm trying to use SPDM over DOE as a EDKII_DEVICE_SECURITY_PROTOCOL
implementation.

I'm using the DeviceSecurity fork from staging, with my own DOE
implementation [5].

First I load `DeviceSecurityPolicyStub` [1], which consumes
`gEdkiiDeviceIdentifierTypePci
Guid` and produces
`gEdkiiDeviceSecurityPolicyProtocolGuid`.

Then I am loading `SpdmDeviceSecurityDxe` [2], which consumes
`gEdkiiDeviceSecurityPolicyProtocolGuid` and produces
`gEdkiiDeviceSecurityProtocolGuid`.

At which point I think the `gEdkiiDeviceSecurityProtocolGuid` should
work in PciBus [3]. Except the problem is that the PCIe bus is already
probed as `DeviceSecurityPolicyStub` consumes
`gEdkiiDeviceIdentifierTypePciGuid`. So I get stuck in a circular
loop.

Does anyone know how I can re-probe the `PciBusDxe` or somehow avoid
the circular dependency?

Or asking another way, is there a way to call the
`AuthenticatePciDevice()` [4] function after probing a PCIe device and
determining that the PCIe device supports DOE and SPDM? I don't see
any users of `gEfiDevicePathProtocolGuid` in upstream EDK2.

1: https://github.com/tianocore/edk2-staging/blob/DeviceSecurity/DeviceSecurityTestPkg/Test/DeviceSecurityPolicyStub/DeviceSecurityPolicyStub.inf#L36
2: https://github.com/tianocore/edk2-staging/blob/DeviceSecurity/DeviceSecurityTestPkg/SpdmDeviceSecurityDxe/SpdmDeviceSecurityDxe.inf#L56
3: https://github.com/tianocore/edk2-staging/blob/DeviceSecurity/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c#L299
4: https://github.com/tianocore/edk2-staging/blob/DeviceSecurity/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c#L2085
5: https://github.com/tianocore/edk2/pull/5715

PS: This is the second mail, the first didn't make it to the list

Alistair


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119556): https://edk2.groups.io/g/devel/message/119556
Mute This Topic: https://groups.io/mt/106627087/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



             reply	other threads:[~2024-06-12  4:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11  5:42 Alistair Francis [this message]
2024-06-12  5:10 ` [edk2-devel] mDeviceSecurityProtocol with SPDM Andrew Fish via groups.io

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=CAKmqyKObJJWXfwWQOoi8rfb_VAVz6X8oHSrdGEKhBdw3FYvD6w@mail.gmail.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