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 2E212AC0060 for ; Mon, 6 Nov 2023 02:54:12 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=dl+F/MoFA7lLWrowmUC3wIonfs+zggIVD3zG3/8BsYM=; 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=1699239250; v=1; b=oyk3StEcecinEzi1lj5vX+WeZF/cglMnCQoOtF4ra+7X9ObrTINISZpVCvIVaeVccRY3q3I5 OKqnI9FwdtZCo5Ab/HIwPmM7sGzKUprzl4HFUjTb2sGVrmACWIJUg8vGw9BaUe4oezMTlx6CfBf qwIUYaF30hXlvEEUGgP1vOjQ= X-Received: by 127.0.0.2 with SMTP id M8q7YY7687511xAKEtFfKmOW; Sun, 05 Nov 2023 18:54:10 -0800 X-Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) by mx.groups.io with SMTP id smtpd.web10.46620.1699239250278316848 for ; Sun, 05 Nov 2023 18:54:10 -0800 X-Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-3b2b1af964dso2694081b6e.1 for ; Sun, 05 Nov 2023 18:54:10 -0800 (PST) X-Gm-Message-State: OHCODB3ANklWmhIkdp0853hZx7686176AA= X-Google-Smtp-Source: AGHT+IHR8bQPGUcPFpYNc9AsGbE1ev8rPkCLBbJ7yHN6Rf46m6+kXfazAAGBsPWeve8JD/RfOoMbSg== X-Received: by 2002:a05:6808:1b14:b0:3a7:2390:3583 with SMTP id bx20-20020a0568081b1400b003a723903583mr35726693oib.38.1699239249330; Sun, 05 Nov 2023 18:54:09 -0800 (PST) X-Received: from dhaval.. ([171.76.87.118]) by smtp.gmail.com with ESMTPSA id fa16-20020a056a002d1000b0068fece2c190sm2679724pfb.70.2023.11.05.18.54.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 18:54:09 -0800 (PST) From: "Dhaval Sharma" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Sunil V L , Daniel Schaefer , Laszlo Ersek Subject: [edk2-devel] [PATCH v8 2/5] MdePkg: Rename Cache Management Function To Clarify Fence Based Op Date: Mon, 6 Nov 2023 08:23:53 +0530 Message-Id: <20231106025356.167717-3-dhaval@rivosinc.com> In-Reply-To: <20231106025356.167717-1-dhaval@rivosinc.com> References: <20231106025356.167717-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-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=oyk3StEc; dmarc=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 There are different ways to manage cache on RISC-V Processors. One way is to use fence instruction. Another way is to use CPU specific cache management operation instructions ratified as per RISC-V ISA specifications to be introduced in future patches. Current method is fence instruction based, rename the function accordingly to add that clarity. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Sunil V L Cc: Daniel Schaefer Cc: Laszlo Ersek Signed-off-by: Dhaval Sharma Reviewed-by: Laszlo Ersek --- Notes: V8: - Update function name to udpate *asm* in the end V7: - Add RB tag V6: - As part of restructuring, adding cache instruction differentiation in function naming MdePkg/Include/Library/BaseLib.h | 4 ++-- MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 4 ++-- MdePkg/Library/BaseLib/RiscV64/FlushCache.S | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/Base= Lib.h index 7142bbfa42f2..d80e27285424 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -212,7 +212,7 @@ RiscVClearPendingTimerInterrupt ( **/=0D VOID=0D EFIAPI=0D -RiscVInvalidateInstCacheAsm (=0D +RiscVInvalidateInstCacheFenceAsm (=0D VOID=0D );=0D =0D @@ -222,7 +222,7 @@ RiscVInvalidateInstCacheAsm ( **/=0D VOID=0D EFIAPI=0D -RiscVInvalidateDataCacheAsm (=0D +RiscVInvalidateDataCacheFenceAsm (=0D VOID=0D );=0D =0D diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg/L= ibrary/BaseCacheMaintenanceLib/RiscVCache.c index d5efcf49a4bf..ac2a3c23a249 100644 --- a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c +++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c @@ -21,7 +21,7 @@ InvalidateInstructionCache ( VOID=0D )=0D {=0D - RiscVInvalidateInstCacheAsm ();=0D + RiscVInvalidateInstCacheFenceAsm ();=0D }=0D =0D /**=0D @@ -193,7 +193,7 @@ InvalidateDataCache ( VOID=0D )=0D {=0D - RiscVInvalidateDataCacheAsm ();=0D + RiscVInvalidateDataCacheFenceAsm ();=0D }=0D =0D /**=0D diff --git a/MdePkg/Library/BaseLib/RiscV64/FlushCache.S b/MdePkg/Library/B= aseLib/RiscV64/FlushCache.S index 7c10fdd268af..8cfb85097996 100644 --- a/MdePkg/Library/BaseLib/RiscV64/FlushCache.S +++ b/MdePkg/Library/BaseLib/RiscV64/FlushCache.S @@ -9,13 +9,13 @@ //------------------------------------------------------------------------= ------=0D =0D .align 3=0D -ASM_GLOBAL ASM_PFX(RiscVInvalidateInstCacheAsm)=0D -ASM_GLOBAL ASM_PFX(RiscVInvalidateDataCacheAsm)=0D +ASM_GLOBAL ASM_PFX(RiscVInvalidateInstCacheFenceAsm)=0D +ASM_GLOBAL ASM_PFX(RiscVInvalidateDataCacheFenceAsm)=0D =0D -ASM_PFX(RiscVInvalidateInstCacheAsm):=0D +ASM_PFX(RiscVInvalidateInstCacheFenceAsm):=0D fence.i=0D ret=0D =0D -ASM_PFX(RiscVInvalidateDataCacheAsm):=0D +ASM_PFX(RiscVInvalidateDataCacheFenceAsm):=0D fence=0D ret=0D --=20 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110699): https://edk2.groups.io/g/devel/message/110699 Mute This Topic: https://groups.io/mt/102413467/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-