From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mx.groups.io with SMTP id smtpd.web11.13211.1678427988916627155 for ; Thu, 09 Mar 2023 21:59:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=lOGcfNGz; spf=pass (domain: ventanamicro.com, ip: 209.85.215.172, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pg1-f172.google.com with SMTP id p6so2474606pga.0 for ; Thu, 09 Mar 2023 21:59:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1678427988; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=JDwYB5aksEg4XEXORfIG9iwbDNcdC8jvL0ECwiJYdI4=; b=lOGcfNGzR1fDIk/MzRYbxIlJ3gZPZmFgoU2aYYa3gcO19ZhAa8gbJq4yQjAJNeqxUM sJpp3qpwwDXIlal2yKqb8KI+K2zR/zHjkZs7n0tLmFtM6lGUhrpcRNCZMa+8Y1l6aqwm WnViBolgOi3B04ay/DxCiOPUZps1VOJY4JYwYn8HYaXJDnIO6ey+eLTU+PSdWY4bDbF7 51pMyZxtkCAjuR6dytNPjknAFEJHPSaQfeKSwlrCHDslGFA9PNTK7cyKPluEpzxz5Zrs i2uo8BkPmtHx7DlB9gUpiqiwK4pS54SCP9sORCtzNU8MXNr7c3v/igfcsKWDVl6uZxgP xYhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678427988; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=JDwYB5aksEg4XEXORfIG9iwbDNcdC8jvL0ECwiJYdI4=; b=YvcIjHcNaL7EsoSQuyMq5ubChzc4rcSwruSxI/dHXZg4HDaFVTqnocEa5WGyXUjjhE WKWey0gewca6HnoQEwdtHMOS42jFR7MCuy2cT6Musg4yb/WzrH7BLZG9Q7EE6OToQVhk PNPth24N7NHjW1FNA4nf/T8JvwlWoO5F3eQPmvqaxIqN1jVt6GsupYJahwp5IXXVpzAI 1ZwK1UPKEbq6YIhjoIMDP07TrEcArQWvxwOG8kf5FabPoNYZN60PYUy6nUZYVtkudSiP aq5HU9wiKUjYqgzzB9Yrc7MsRMMm9Y1SDnwjTbCbSaKRXu9eqQPfzD4/sPdKUbWzjYSi +YLA== X-Gm-Message-State: AO0yUKVa6NRCP/b2fi4yHVjeZvNLQmDQ82ZIHyaJwNT4gtQK81CHaV/3 +L3f3TIhfgEZX48E+wFVwWcYxg== X-Google-Smtp-Source: AK7set+4zEBIMsI8WSDiOWPrfKQJGxjjUMbH8wkFhUljqeqsd8iwoHXjDBgYB4IfgqmmkDLEoxwGpQ== X-Received: by 2002:a05:6a00:4c16:b0:5a8:445d:d352 with SMTP id ea22-20020a056a004c1600b005a8445dd352mr834890pfb.11.1678427988310; Thu, 09 Mar 2023 21:59:48 -0800 (PST) Return-Path: Received: from sunil-laptop ([49.206.8.117]) by smtp.gmail.com with ESMTPSA id c25-20020aa78819000000b005d3901948d8sm551698pfo.44.2023.03.09.21.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 21:59:47 -0800 (PST) Date: Fri, 10 Mar 2023 11:29:42 +0530 From: "Sunil V L" To: Tuan Phan Cc: devel@edk2.groups.io, michael.d.kinney@intel.com, gaoliming@byosoft.com.cn, zhiguang.liu@intel.com, git@danielschaefer.me Subject: Re: [PATCH] MdePkg/BaseCacheMaintenanceLib: RISC-V: Fix instruction cache not been invalidated Message-ID: References: <20230306171058.4579-1-tphan@ventanamicro.com> MIME-Version: 1.0 In-Reply-To: <20230306171058.4579-1-tphan@ventanamicro.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 06, 2023 at 09:10:58AM -0800, Tuan Phan wrote: > When the range instruction cache invalidating not supported, the whole > instruction cache should be invalidated instead. > > Signed-off-by: Tuan Phan > --- > MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c > index 67a3387ff3c6..a744b2a6f889 100644 > --- a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c > +++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c > @@ -76,7 +76,10 @@ InvalidateInstructionCacheRange ( > IN UINTN Length > ) > { > - DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", __FUNCTION__)); > + DEBUG ((DEBUG_WARN, > + "%a:RISC-V unsupported function.\n" > + "Invalidating the whole instruction cache instead.\n", __func__)); Hi Tuan, Please run uncrustify and fix the error at this line. Thanks, Sunil > + InvalidateInstructionCache (); > return Address; > } > > -- > 2.25.1 >