public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm" <quic_llindhol@quicinc.com>
To: <devel@edk2.groups.io>,
	Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Subject: Re: [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: use FEAT_RNG for EFI_RNG_PROTOCOL
Date: Mon, 1 Jul 2024 15:26:58 +0100	[thread overview]
Message-ID: <3aeee49f-f3d5-45c3-b7a8-7631ecb7ee96@quicinc.com> (raw)
In-Reply-To: <CAMj1kXHUcJztYcaig6wOUJGr+Cqi+MKUJ5aXTdPF5G+LEmVHqQ@mail.gmail.com>

On 2024-07-01 14:35, Ard Biesheuvel wrote:
>> Ard: would you be opposed to putting a DEBUG print and/or an ASSERT in
>> BaseRngLibContructor if mRndrSupported == 0?
>>
>> An alternative would be to place a test and noisy warning inside
>> SbsaQemuPlatformDxe.
> 
> I'm not sure I follow what we are trying to fix here. RngDxe will
> simply not load if BaseRngLib does not find FEAT_RNG support.
>
> If the issue is other, existing users of RngLib that are currently
> served by BaseRngTimerLib, we could make the library class resolutions
> introduced here local the RngDxe driver, using
> 
> SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf {
>    <LibraryClasses>
>      RngLib|MdePkg/Library/BaseRngLib/BaseRngLib.inf
>      ArmTrngLib|ArmPkg/Library/ArmTrngLib/ArmTrngLib.inf
>      ArmMonitorLib|ArmPkg/Library/ArmMonitorLib/ArmMonitorLib.inf
> }

Good point.

I think Ard's example solves the original purpose (providing 
EFI_RNG_PROTOCOL to linux efi stub) while not breaking any potential 
usage before this point.

I'd still quite like to nudge existing users onto a more recent cpu,
with less cryptic console output. But if we do the above we can drop the 
conditional part and just put a test and a message in the PlatformDxe.

(And have the commit message be clear on RngDxe being added.)

/
     Leif



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



      reply	other threads:[~2024-07-01 14:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27 14:22 [edk2-devel] [PATCH edk2-platforms 0/1] RFC: SbsaQemu use FEAT_RNG for EFI_RNG_PROTOCOL Marcin Juszkiewicz
2024-06-27 14:22 ` [edk2-devel] [PATCH edk2-platforms 1/1] SbsaQemu: " Marcin Juszkiewicz
2024-06-30 12:37   ` Ard Biesheuvel
2024-07-01 11:08   ` Leif Lindholm
2024-07-01 12:58     ` Marcin Juszkiewicz
2024-07-01 13:28       ` Leif Lindholm
2024-07-01 13:35         ` Ard Biesheuvel
2024-07-01 14:26           ` Leif Lindholm [this message]

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=3aeee49f-f3d5-45c3-b7a8-7631ecb7ee96@quicinc.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