From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) by mx.groups.io with SMTP id smtpd.web11.7867.1688070883338543866 for ; Thu, 29 Jun 2023 13:34:43 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=UOSZj0Sg; spf=pass (domain: gmail.com, ip: 209.85.210.45, mailfrom: kuqin12@gmail.com) Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-6b46e61638eso943683a34.0 for ; Thu, 29 Jun 2023 13:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688070882; x=1690662882; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=NIYXVI7v7TF+DjsL6TfdsFRKwBzD2f7OcP4LN6kPsRc=; b=UOSZj0SgXQr0RcxeEhCyha2h+q3y44CQES4AC61a8JQIV31xuoTS/KA3MPiiwb/Cyo gtFo7S9iZsp2iDKgyBu7iYbrZd2DMHS3VZ3l1hDsJiGcxtURKsaw/kiTdSAtNZ5PYIV5 X/bJFp2FOzIecKlJrp1z5HW3eC63LG1FAHdkwmi0g6kcJi0fYFFJE1wrL3f3zfK/MRRk kiHTAfK5X2y5L9gntOY86N6lHvPzgSDNWN51Ih7lVFD2RQvNrxIlbQbnT1Fgq3DIAe+L PrYXqWRWHzp8VAw6DcLWrD9LC3J1UT3Q3LtVE4syh54sVKJ2CS3YxExi3T0xbhoDfVTk GNpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688070882; x=1690662882; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NIYXVI7v7TF+DjsL6TfdsFRKwBzD2f7OcP4LN6kPsRc=; b=KkJBxf+4u34EygMON1/PKke60hdUn/NRvd/T4IqNBYmAuW8fBtsMZXAfgBu2n3pnLP NHpXyhmMzU9ClRKBVMl2XyHA8OyCZGKf5US/nSTCHVNVJBdth3QfMyjqICurDX9bYD4O KyLPm2GUODCcNlf5JHM+yoiu+Oz7DsrnUAH+e4JpNA8NYpnHR6WBxzVkgEPruJTGmzYo ENBPtQHqjvqKU86yFku2ZZY5/sdMP30fUxdJMYuIEgJHxPZLTX54ZSyjNkyvvVi8uHIV c1eoXUnvVBmC+nSniKLl1KqJJLmGqSGS4rphQzyjCZgk4Iinqt1isHYVemT7DhPvev8R qKuw== X-Gm-Message-State: AC+VfDx/YyyVSRHCF+T133XZ8OchiGqHPELOcF9lvh8/O3My1p7nv9cZ jI6hhjiBGYnE7hMIT3Phg1Z7wqNmkDE= X-Google-Smtp-Source: ACHHUZ7rGcW9VQwI7d+HyTUlOFAeYgvqyCCDj92Db+9dMJS5admpAY91ydatyyBs9aprbxlr1MLn7Q== X-Received: by 2002:a05:6870:cf02:b0:19f:6711:8e0a with SMTP id xf2-20020a056870cf0200b0019f67118e0amr921287oab.32.1688070882376; Thu, 29 Jun 2023 13:34:42 -0700 (PDT) Return-Path: Received: from ?IPV6:2001:4898:d8:33:956:7e07:c1c3:d47a? ([2001:4898:80e8:0:8978:7e07:c1c3:d47a]) by smtp.gmail.com with ESMTPSA id x2-20020a17090a294200b00262ca945cecsm10020720pjf.54.2023.06.29.13.34.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jun 2023 13:34:41 -0700 (PDT) Message-ID: Date: Thu, 29 Jun 2023 13:34:41 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [edk2-devel] [PATCH v1 1/8] MdePkg/ArmTrngLib: Remove ASSERTs in Null implementation To: devel@edk2.groups.io, pierre.gondois@arm.com Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Jiewen Yao , Jian J Wang , Ard Biesheuvel , Sami Mujawar , Jose Marinho , Samer El-Haj-Mahmoud References: <20230509074042.1523428-1-pierre.gondois@arm.com> <20230509074042.1523428-2-pierre.gondois@arm.com> From: "Kun Qin" In-Reply-To: <20230509074042.1523428-2-pierre.gondois@arm.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Pierre, Do we really need this removal of ASSERT? I tried to use the real ArmTrngLib with this patch and it seems to work fine with a TFA that does not support TRNG interfaces. I think it would be valuable to keep the ASSERT to indicate there might be an integration error? Please let me know if I missed anything. Regards, Kun On 5/9/2023 12:40 AM, PierreGondois wrote: > From: Pierre Gondois > > Remove ASSERTs to allow RngDxe probing the Null implementation > of the TrngLib. > > Signed-off-by: Pierre Gondois > --- > MdePkg/Library/BaseArmTrngLibNull/BaseArmTrngLibNull.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/MdePkg/Library/BaseArmTrngLibNull/BaseArmTrngLibNull.c b/MdePkg/Library/BaseArmTrngLibNull/BaseArmTrngLibNull.c > index 316d78bf5e83..0ea9aafa59f1 100644 > --- a/MdePkg/Library/BaseArmTrngLibNull/BaseArmTrngLibNull.c > +++ b/MdePkg/Library/BaseArmTrngLibNull/BaseArmTrngLibNull.c > @@ -41,7 +41,6 @@ GetArmTrngVersion ( > OUT UINT16 *MinorRevision > ) > { > - ASSERT (FALSE); > return RETURN_UNSUPPORTED; > } > > @@ -67,7 +66,6 @@ GetArmTrngUuid ( > OUT GUID *Guid > ) > { > - ASSERT (FALSE); > return RETURN_UNSUPPORTED; > } > > @@ -83,7 +81,6 @@ GetArmTrngMaxSupportedEntropyBits ( > VOID > ) > { > - ASSERT (FALSE); > return 0; > } > > @@ -116,6 +113,5 @@ GetArmTrngEntropy ( > OUT UINT8 *Buffer > ) > { > - ASSERT (FALSE); > return RETURN_UNSUPPORTED; > }