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 611A4D8007D for ; Fri, 19 Jan 2024 05:36:24 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=jrxi86Rs99w5/SRzJOafWhCBh+Ot/aRIVbvRJ5eGwnI=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1705642583; v=1; b=H90fm9httWqZtVuDhPvM+ponWwTIg5UQRMXFTQBl0dWvaqmz4UdkTjyF14opZ2q7GFt9cJTY omYDELdQJ1nuOdokmRdb8CP7kYBiH28gb9l3ptgqKEV1YByCgx/kOBTE6Q7Nig5r3vL+NCAGpO/ /z73S+1tU8w/Rrz9ssdnj8s0= X-Received: by 127.0.0.2 with SMTP id vNRTYY7687511xEA6n91Ugfe; Thu, 18 Jan 2024 21:36:23 -0800 X-Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) by mx.groups.io with SMTP id smtpd.web10.15526.1705642582281656293 for ; Thu, 18 Jan 2024 21:36:22 -0800 X-Received: by mail-io1-f42.google.com with SMTP id ca18e2360f4ac-7bee87b2f5eso13560139f.3 for ; Thu, 18 Jan 2024 21:36:22 -0800 (PST) X-Gm-Message-State: 99TGg1plpyTGVvFkZLN7JbUVx7686176AA= X-Google-Smtp-Source: AGHT+IGdntMS7yWaFKO7SYJSEU4zxmEjt9zfoBJOoysT5BbAWz8dYCLhgAnxu+zcNO8XbbwND0Pk3Q== X-Received: by 2002:a6b:fe14:0:b0:7bf:5fc0:698a with SMTP id x20-20020a6bfe14000000b007bf5fc0698amr2662926ioh.7.1705642581429; Thu, 18 Jan 2024 21:36:21 -0800 (PST) X-Received: from sunil-laptop ([106.51.188.200]) by smtp.gmail.com with ESMTPSA id dq16-20020a0566384d1000b0046e025d9fefsm1387625jab.48.2024.01.18.21.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 21:36:21 -0800 (PST) Date: Fri, 19 Jan 2024 11:06:14 +0530 From: "Sunil V L" To: Dhaval Cc: devel@edk2.groups.io, Liming Gao , Michael D Kinney , Zhiguang Liu , Andrei Warkentin , Laszlo Ersek , Pedro Falcato , Yang Cheng Subject: Re: [edk2-devel] [PATCH v1 1/1] MdePkg/BaseCacheMaintenanceLib: RV64 replace asserts with logs Message-ID: References: <20240118095018.509362-1-dhaval@rivosinc.com> <20240118095018.509362-2-dhaval@rivosinc.com> MIME-Version: 1.0 In-Reply-To: <20240118095018.509362-2-dhaval@rivosinc.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,sunilvl@ventanamicro.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=H90fm9ht; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none On Thu, Jan 18, 2024 at 03:20:18PM +0530, 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. > > 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(-) > > 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") Should this be CMO not enabled? > + ); > } > > return Address; > @@ -248,7 +249,7 @@ WriteBackDataCache ( > VOID > ) > { > - ASSERT (FALSE); > + DEBUG ((DEBUG_VERBOSE, "WriteBackDataCache not supported \n")); > } > > /** > @@ -283,7 +284,7 @@ WriteBackDataCacheRange ( > if (RiscVIsCMOEnabled ()) { > CacheOpCacheRange (Address, Length, CacheOpClean); > } else { > - ASSERT (FALSE); > + DEBUG ((DEBUG_VERBOSE, "WriteBackDataCacheRange not supported \n")); Same comment as earlier. > } > > return Address; > -- > 2.39.2 > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114027): https://edk2.groups.io/g/devel/message/114027 Mute This Topic: https://groups.io/mt/103805230/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-