From nobody Tue Feb 10 03:56:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90871+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90871+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1656515097; cv=none; d=zohomail.com; s=zohoarc; b=F8KOH274IY+MhRsO+xsJPQZSD6bqlZL/bkpDavxiROnSqiWPZv35TAO4ffiPuops0lJ1CmvjT0V+isC0Me0kiPLFnFceJ6ObxYrJYVDUpO5UEWP17TGWVy8J+4glQTaDXOdZxe8/5fPyY+SMvorE1NbSEXU+CJFq2SgXQx/O3XI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1656515097; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=fnRmwlShFgV7rplbaQv9wt2v/b+hq37a8/H2D+o6ejo=; b=HRZaGaMWqQvaUmNwrJwsFfny+1W+YDtP7wVaJML7EnMbGlyd0dguPo8KGOJLfAHezDeCcZftVxEOQ8NjzXn+W1VB/rhFTG5ZMcrNJpEjk1kPsHKXXwMNo4F7rsA8i5vpo6AcyEOWP0+mEbA99VBdCC+unwH7twv0WsbgtbPgApg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90871+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1656515097721259.9542420011901; Wed, 29 Jun 2022 08:04:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3vTpYY1788612xKpd0fSYn2g; Wed, 29 Jun 2022 08:04:57 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.12648.1656515096785573797 for ; Wed, 29 Jun 2022 08:04:56 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B86211764; Wed, 29 Jun 2022 08:04:56 -0700 (PDT) X-Received: from pierre123.arm.com (unknown [10.57.42.208]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 552FB3F792; Wed, 29 Jun 2022 08:04:54 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar , Leif Lindholm , Ard Biesheuvel , Rebecca Cran , Michael D Kinney , Liming Gao , Jiewen Yao , Jian J Wang Subject: [edk2-devel] [PATCH v3 19/22] SecurityPkg/RngDxe: Add debug warning for NULL PcdCpuRngSupportedAlgorithm Date: Wed, 29 Jun 2022 17:02:35 +0200 Message-Id: <20220629150241.2597898-27-Pierre.Gondois@arm.com> In-Reply-To: <20220629150241.2597898-1-Pierre.Gondois@arm.com> References: <20220629150241.2597898-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: oNXNluA9g3UBARZLxPwnteNfx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1656515097; bh=iNnQu9OXPyw7KBQASrZDa1OzBVUoW7zx5WM+NxkCcjo=; h=Cc:Date:From:Reply-To:Subject:To; b=VB3V0VN32PQ/S9ih6zzwsh+pN3gmZSsi8ckLfQ7264Ueuu2k7yf7iW+/kEIujGDUbPX O+BH0h8+mU4IPKQJQwlKqxpsIy6tKfX1QHOCChrpZs1fMOmzc4j/kp1RKV1lNrVJWmok3 n5noYf5bkyS7pdjyjur2Gk3tyqjxN+j0E7o= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1656515099567100007 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois PcdCpuRngSupportedAlgorithm should allow to identify the the algorithm used by the RNDR CPU instruction to generate a random number. Add a debug warning if the Pcd is not set. Signed-off-by: Pierre Gondois --- .../RandomNumberGenerator/RngDxe/AArch64/RngDxe.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c b/Se= curityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c index ee3f1ee78434..ffa32a29dc6a 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c @@ -63,6 +63,16 @@ RngInitAvailableAlgoArray ( sizeof (EFI_RNG_ALGORITHM) ); mAvailableAlgoArrayCount++; + + DEBUG_CODE_BEGIN (); + if (IsZeroGuid (PcdGetPtr (PcdCpuRngSupportedAlgorithm))) { + DEBUG (( + DEBUG_WARN, + "PcdCpuRngSupportedAlgorithm should be a non-zero GUID\n" + )); + } + + DEBUG_CODE_END (); } =20 // Raw algorithm (Trng) --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#90871): https://edk2.groups.io/g/devel/message/90871 Mute This Topic: https://groups.io/mt/92066756/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-