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 6AF95941C6E for ; Thu, 18 Jan 2024 15:58:19 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=rKKZT0UvOdk/ihaFYNxMaNf8firvDVQcsFs5PIbQer0=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1705593498; v=1; b=vchkpVTR+dhMwznZT+11JB3ki00rtaX0o80wbplYq16lzofyUnJvrd8HwMA9mOMxFsGYv6D4 chK7ZXCdbVwW3I3f+E3BkN/cU+HLHheAZux5+agjDMrMwYnSCLFNBMs2Vpk98ahU0fyKU0P23C5 cpnfP5HVsaKbNNnpfLW+4gNs= X-Received: by 127.0.0.2 with SMTP id qKWgYY7687511x0hX8RvPcGU; Thu, 18 Jan 2024 07:58:18 -0800 X-Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51]) by mx.groups.io with SMTP id smtpd.web10.15406.1705593497448300852 for ; Thu, 18 Jan 2024 07:58:17 -0800 X-Received: by mail-vs1-f51.google.com with SMTP id ada2fe7eead31-469893c4c11so543422137.2 for ; Thu, 18 Jan 2024 07:58:17 -0800 (PST) X-Gm-Message-State: OWxvPf5lWZDSgqfMN0btt7MRx7686176AA= X-Google-Smtp-Source: AGHT+IH5APShezYdEJ938tKqgG+51hvjKykbf3Bh1g1ZRJyphsz+ale/LA/hFUx+Mf1AbiLvOSKfEV2FA5jz3MVgeig= X-Received: by 2002:a05:6102:244f:b0:468:183c:7c19 with SMTP id g15-20020a056102244f00b00468183c7c19mr941337vss.64.1705593496488; Thu, 18 Jan 2024 07:58:16 -0800 (PST) MIME-Version: 1.0 References: <20240118095018.509362-1-dhaval@rivosinc.com> <20240118095018.509362-2-dhaval@rivosinc.com> In-Reply-To: <20240118095018.509362-2-dhaval@rivosinc.com> From: "Pedro Falcato" Date: Thu, 18 Jan 2024 15:58:04 +0000 Message-ID: Subject: Re: [edk2-devel] [PATCH v1 1/1] MdePkg/BaseCacheMaintenanceLib: RV64 replace asserts with logs To: Dhaval Cc: devel@edk2.groups.io, Liming Gao , Michael D Kinney , Zhiguang Liu , Sunil V L , Andrei Warkentin , Laszlo Ersek , Yang Cheng 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,pedro.falcato@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: 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=vchkpVTR; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.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 Thu, Jan 18, 2024 at 9:50=E2=80=AFAM 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 I don't agree with this patch. As I see it, the library has a simple contract: Do cache operation X and return. We cannot safely return if we don't know how to do cache operation X. Say, with a Thead core and Xtheadcmo. Any other concerns wrt DMA are, in my view, somewhat separate. One can easily theorize a way this change can come to bite us, say, a storage controller writes bogus data to storage (because the platform needs explicit cache coherency, and we don't know how to do that) and causes data corruption. > a harmless logger message. Eventually platform/drivers need to have > better guard for such functionality. Like an ASSERT? :) --=20 Pedro -=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 (#113997): https://edk2.groups.io/g/devel/message/113997 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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-