From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id C2758AC0A65 for ; Fri, 24 May 2024 05:45:33 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=MCcmE+BfRx9+KHkZ71At2llQdx8KMy0qrjbf5+r3uMA=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1716529532; v=1; b=FWcsFVdcYjSOEccJbhEQV/4QH5o931xlRqbo3mqkXdBff1rqjIcQN446Mcvh0BdHl3BWHNse yWZQU0Mn6pfhjW+2QDaeHCTU9/L43zAsbKXgAKRbnxFX14Lqlvqd8WwtyPhFxbUiPj9/tp85Ws7 YJlYTUNATd8stvMQ+dZonFvOf3QHneUyZV90e6h0TG8DZHbmOnh79FFml9eIZqg0Mwd41SXY+Zd 2T6VI6xcj6NEeJoD4xPPe73wtB8+rEZxRcEn5JxRFSy3olTEswvp3iyvPUx7AHTrGJYr20WMPCX hpRxaylwN/B07YWxX00OwnR92YTPYsPqMbPfGMx7LA10A== X-Received: by 127.0.0.2 with SMTP id BQT2YY7687511xLXk7ONJLe5; Thu, 23 May 2024 22:45:32 -0700 X-Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) by mx.groups.io with SMTP id smtpd.web10.9225.1716529530974331778 for ; Thu, 23 May 2024 22:45:31 -0700 X-Received: by mail-ot1-f47.google.com with SMTP id 46e09a7af769-6f12ed79fdfso3378381a34.0 for ; Thu, 23 May 2024 22:45:30 -0700 (PDT) X-Gm-Message-State: P3gziZvy5cuC9TwMBiMQlspSx7686176AA= X-Google-Smtp-Source: AGHT+IGzoO3f5ubPG4IPV9+u+VZiI9ITTDA0d21CtnUnQv2ZJCHYIpkAT0/+zNwF3iW9/Z2egMy0Qg== X-Received: by 2002:a05:6808:ddf:b0:3c9:94ab:e8e8 with SMTP id 5614622812f47-3d1a5c33869mr1495981b6e.33.1716529530068; Thu, 23 May 2024 22:45:30 -0700 (PDT) X-Received: from localhost.localdomain (c-67-160-15-86.hsd1.wa.comcast.net. [67.160.15.86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fcfe64a4sm471919b3a.158.2024.05.23.22.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 22:45:29 -0700 (PDT) From: "Doug Flick via groups.io" X-Google-Original-From: Flickdm To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-devel] [PATCH v3 16/20] MdePkg/BaseRngLib AARCH64: Remove overzealous ASSERT() Date: Thu, 23 May 2024 22:45:08 -0700 Message-Id: <20240524054512.523329-17-douglas.flick@microsoft.com> In-Reply-To: <20240524054512.523329-1-douglas.flick@microsoft.com> References: <20240524054512.523329-1-douglas.flick@microsoft.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 23 May 2024 22:45:31 -0700 Resent-From: dougflick@microsoft.com Reply-To: devel@edk2.groups.io,dougflick@microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=FWcsFVdc; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io From: Ard Biesheuvel BaseRngLib on AARCH64 will discover whether or not RNDR instructions are supported, by inspecting the ISAR0 identification register, and setting a global boolean accordingly. This boolean is used in subsequent execution to decide whether or not to issue the instruction. The same discovery code also ASSERT()s that RNDR instructions are implemented, which is unnecessary, and breaks execution on systems that incorporate the library but don't implement the instruction (or fail to expose it to the exception level that the firmware executes at). So drop the ASSERT(). Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Committed-by: Ard Biesheuvel Signed-off-by: Doug Flick [MSFT] --- MdePkg/Library/BaseRngLib/AArch64/Rndr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/MdePkg/Library/BaseRngLib/AArch64/Rndr.c b/MdePkg/Library/Base= RngLib/AArch64/Rndr.c index d39db62153..3a556a2e3f 100644 --- a/MdePkg/Library/BaseRngLib/AArch64/Rndr.c +++ b/MdePkg/Library/BaseRngLib/AArch64/Rndr.c @@ -50,7 +50,6 @@ BaseRngLibConstructor ( // MSR. A non-zero value indicates that the processor supports the RNDR = instruction.=0D //=0D Isar0 =3D ArmReadIdIsar0 ();=0D - ASSERT ((Isar0 & RNDR_MASK) !=3D 0);=0D =0D mRndrSupported =3D ((Isar0 & RNDR_MASK) !=3D 0);=0D =0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119243): https://edk2.groups.io/g/devel/message/119243 Mute This Topic: https://groups.io/mt/106276868/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-