From nobody Thu Dec 26 23:04:38 2024 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+113990+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+113990+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1705571429; cv=none; d=zohomail.com; s=zohoarc; b=mqOlz4wcqcp9WFbuqrKJwVz7S+jJGl9kGoE1iJQMqdf6MqpUneJ1ssQspF1aFm9o3+gLpb+xIKGs1cIDv32yb1RVwiPPdIZ0kMOCu3mxAM/zJVB+A1jdL8CkI/36joC4B7M/uyfLuVi5JhSIEohadADfo7F1AyCO3G+1azCvc0w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705571429; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=R9U/OSpTE3OyTORW/51WcGf/wMwFQHMhr7GSHZAu/2k=; b=O4iMjU3lHsiCV9sfTYUTH/kR7ETS/oGgz22J5SKwQTgijeuZtL2cgANviDSttpmv7fjY8WQpx/nHzkA+XC8F32mBTu6G4zSV7zZPdaljEubACHof8NbnbT/9m3su5HYE0gSW4dpWp80fJ/5iMRAjYkfEyA7oklDuMNtNWdCXU14= 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+113990+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1705571429282620.3166061947998; Thu, 18 Jan 2024 01:50:29 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=Pff+fAGZaDlSFu66PYKyShqXUSwRg3Oqc2MRmghQCmM=; 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:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1705571429; v=1; b=lQOXe++YvOlVpCfcEngrKbk19NgF+Pkx/d/IdXkd94Uxu78NLbspJdVtRRO6NseaNoeSxNVd l4vinui+x1GNWfZQ8vZnp2QAn6dwUAWL3UZLmUdEbkrfk+U2JhMfEuNTt+3d0a0mM84zXhZyZZ/ dEdvrkvIiIHV1DO13L9Ra5oo= X-Received: by 127.0.0.2 with SMTP id LOWlYY1788612x5NCF8pywiM; Thu, 18 Jan 2024 01:50:29 -0800 X-Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mx.groups.io with SMTP id smtpd.web10.7962.1705571428280630228 for ; Thu, 18 Jan 2024 01:50:28 -0800 X-Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-6d9344f30caso379295b3a.1 for ; Thu, 18 Jan 2024 01:50:28 -0800 (PST) X-Gm-Message-State: VQbNDlM5V1ScrTWOIixbd4mpx1787277AA= X-Google-Smtp-Source: AGHT+IF2GVl8mfv5i74yb6DePUh1dSQ363drUOCOBMxU5DW/eS1PfhL4490bGxqUlbJacf5PLDuBmw== X-Received: by 2002:a05:6a00:2e8e:b0:6da:ca28:c3d2 with SMTP id fd14-20020a056a002e8e00b006daca28c3d2mr3133775pfb.4.1705571427373; Thu, 18 Jan 2024 01:50:27 -0800 (PST) X-Received: from dhaval.blr.rivosinc.com ([49.249.129.34]) by smtp.gmail.com with ESMTPSA id n24-20020aa78a58000000b006d95b565418sm2894222pfa.153.2024.01.18.01.50.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 01:50:27 -0800 (PST) From: "Dhaval Sharma" To: devel@edk2.groups.io Cc: Liming Gao , Michael D Kinney , Zhiguang Liu , Sunil V L , Andrei Warkentin , Laszlo Ersek , Pedro Falcato , Yang Cheng Subject: [edk2-devel] [PATCH v1 1/1] MdePkg/BaseCacheMaintenanceLib: RV64 replace asserts with logs Date: Thu, 18 Jan 2024 15:20:18 +0530 Message-Id: <20240118095018.509362-2-dhaval@rivosinc.com> In-Reply-To: <20240118095018.509362-1-dhaval@rivosinc.com> References: <20240118095018.509362-1-dhaval@rivosinc.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 Reply-To: devel@edk2.groups.io,dhaval@rivosinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1705571429943100005 Content-Type: text/plain; charset="utf-8" Some platforms do not implement cache management operations. Especially for DMA drivers have code to manage data cache. The code seem to depend on the underlying CPU/cache drivers to enact functionality and simply return if such functionality is not implemented. However this causes issue with CMO implementation which has an assert causing flow to hang within debug environment. While it is not an issue in production environment there is a recommendation to conver this assert in to a harmless logger message. Eventually platform/drivers need to have better guard for such functionality. Signed-off-by: Dhaval Sharma Cc: Liming Gao Cc: Michael D Kinney Cc: Zhiguang Liu Cc: Sunil V L Cc: Andrei Warkentin Cc: Laszlo Ersek Cc: Pedro Falcato Cc: Yang Cheng Acked-by: Laszlo Ersek --- MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg/L= ibrary/BaseCacheMaintenanceLib/RiscVCache.c index 73a5a6b6b5d6..d99515bcf38b 100644 --- a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c +++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c @@ -183,9 +183,8 @@ WriteBackInvalidateDataCache ( VOID ) { - ASSERT (FALSE); DEBUG (( - DEBUG_ERROR, + DEBUG_VERBOSE, "WriteBackInvalidateDataCache: RISC-V unsupported function.\n" )); } @@ -226,7 +225,9 @@ WriteBackInvalidateDataCacheRange ( if (RiscVIsCMOEnabled ()) { CacheOpCacheRange (Address, Length, CacheOpFlush); } else { - ASSERT (FALSE); + DEBUG ( + (DEBUG_VERBOSE, "WriteBackInvalidateDataCacheRange not supported \n") + ); } =20 return Address; @@ -248,7 +249,7 @@ WriteBackDataCache ( VOID ) { - ASSERT (FALSE); + DEBUG ((DEBUG_VERBOSE, "WriteBackDataCache not supported \n")); } =20 /** @@ -283,7 +284,7 @@ WriteBackDataCacheRange ( if (RiscVIsCMOEnabled ()) { CacheOpCacheRange (Address, Length, CacheOpClean); } else { - ASSERT (FALSE); + DEBUG ((DEBUG_VERBOSE, "WriteBackDataCacheRange not supported \n")); } =20 return Address; --=20 2.39.2 -=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 (#113990): https://edk2.groups.io/g/devel/message/113990 Mute This Topic: https://groups.io/mt/103805230/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-