From nobody Tue Feb 10 06:59:01 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+91717+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+91717+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1658500380; cv=none; d=zohomail.com; s=zohoarc; b=ZHKXNtSdvLAyExXcRuOomdR1aE9FXZDusMCVUw0BQRAuEMWUfQlKfn0SDy/MY4R54tAw7F1kcdQTv5cK8ZC3p+mkMR/+3xwoRCH56wFzcx9h9FjNy3WpNNwOIV4VxCCbgM3F0MS62o0oDAfVD3Nqr6WbvgGKgQtRKxwPZrSv+nw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658500380; 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=e5UUZLHif3I4f0Hi6p+aIsEhElRB1tyqNkuztvX8oQw=; b=gu9a8Xni/nRFvzYjMQkAgYxiqp8xl3WwSQp4GlFJwMISmsxSBZIANslFZcZlqrFmBIxLlblnNP+8M7z/s51yZDL03/0LkODi9H3jUTiFhWRTwZHGn3FU9PumKgrifWZxsqC7xTFJijSx/0Q2G5nmZCwacSFXVUSeT8ffDC22f3A= 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+91717+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 1658500380822327.39111329584193; Fri, 22 Jul 2022 07:33:00 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id xYRiYY1788612xrT7uABoYgo; Fri, 22 Jul 2022 07:33:00 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.8341.1658500379858282336 for ; Fri, 22 Jul 2022 07:32:59 -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 23DF01480; Fri, 22 Jul 2022 07:33:00 -0700 (PDT) X-Received: from pierre123.arm.com (pierre123.nice.arm.com [10.34.100.102]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0BFCF3F70D; Fri, 22 Jul 2022 07:32:57 -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 , Pierre Gondois Subject: [edk2-devel] [PATCH v4 18/21] SecurityPkg/RngDxe: Add debug warning for NULL PcdCpuRngSupportedAlgorithm Date: Fri, 22 Jul 2022 16:31:50 +0200 Message-Id: <20220722143153.913585-19-Pierre.Gondois@arm.com> In-Reply-To: <20220722143153.913585-1-Pierre.Gondois@arm.com> References: <20220722143153.913585-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: qXr30jHPC5qazf6W87TZAfoYx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1658500380; bh=31kp6WMosGSElgvqaEeYNOH/DaDiZK+t/n9/PLJBRW8=; h=Cc:Date:From:Reply-To:Subject:To; b=nXNuPvY37SVc75b4BJxleqrE58iqI6VJML+RMeSrB6ixxd5hthOX5z+ejuJWCGb1IGs McwhmkPDSj4ePLVMRGgvX1HOt+a96S/H3Ox+fzhZTdQWvkWIGr0iMrZ6nhw9f6bmkxpuC ERDgBx+NxtBKbLt2IsrI4wPe1CzLg9AsGo4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1658500382109100076 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 f5910e3b999f..0d853720ecb1 100644 --- a/SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c +++ b/SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/RngDxe.c @@ -67,6 +67,16 @@ GetAvailableAlgorithms ( 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 (#91717): https://edk2.groups.io/g/devel/message/91717 Mute This Topic: https://groups.io/mt/92548729/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-