From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id B6F7B7803D7 for ; Thu, 18 Jan 2024 14:45:49 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=MlE8hODVlmvGPe1B116Cu7gtNTgrUxAg/roIt1vO43g=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1705589148; v=1; b=RcHsrBKou48Ty8+/IVFhE1awDou7enp1xzJI7wVuqYDMNvuameGF0Ucw5i8f54oK26mRTYUo tWByPvuvyF0n4j7FhBo+A9bbjd++KicW9oN/mG0sg5cs4IsCFjFwxr8NWuNQwVm+UV4gr7tJfD0 hOkCVcOYGqz1rL6T9ADQ7NV8= X-Received: by 127.0.0.2 with SMTP id hybaYY7687511xRdf9CExP7w; Thu, 18 Jan 2024 06:45:48 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.13156.1705589147732154424 for ; Thu, 18 Jan 2024 06:45:47 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-613-WBmi13E1Nt-gCFAoJykuOw-1; Thu, 18 Jan 2024 09:45:44 -0500 X-MC-Unique: WBmi13E1Nt-gCFAoJykuOw-1 X-Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A49D13814EAB; Thu, 18 Jan 2024 14:45:43 +0000 (UTC) X-Received: from [10.39.194.70] (unknown [10.39.194.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF5212166B33; Thu, 18 Jan 2024 14:45:40 +0000 (UTC) Message-ID: Date: Thu, 18 Jan 2024 15:45:39 +0100 MIME-Version: 1.0 Subject: Re: [edk2-devel] [PATCH v1 1/1] MdePkg/BaseCacheMaintenanceLib: RV64 replace asserts with logs To: Dhaval , devel@edk2.groups.io Cc: Liming Gao , Michael D Kinney , Zhiguang Liu , Sunil V L , Andrei Warkentin , Pedro Falcato , Yang Cheng References: <20240118095018.509362-1-dhaval@rivosinc.com> <20240118095018.509362-2-dhaval@rivosinc.com> From: "Laszlo Ersek" In-Reply-To: <20240118095018.509362-2-dhaval@rivosinc.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: RZxexM2HRSrMRZCzZGSvOOLrx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=RcHsrBKo; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 1/18/24 10:50, Dhaval wrote: > 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. >=20 > 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 > --- > MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) >=20 > diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg= /Library/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; This formatting looks very strange, normally you'd write DEBUG (( .... )); LGTM otherwise: Acked-by: Laszlo Ersek > @@ -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; -=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 (#113993): https://edk2.groups.io/g/devel/message/113993 Mute This Topic: https://groups.io/mt/103805230/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/19134562= 12/xyzzy [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-