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 B45EEAC11E2 for ; Sun, 29 Oct 2023 14:46:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=oBLSFEqZefFIr8/5dYIrTQILyLgej1jjpZh0AW4booo=; 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=1698590788; v=1; b=T/7ad+2mDObebbr+kh+Zlb7W7Mat+PUwvzu+0B6XBGp4SVzfuGYI78obhZi+segSU1HUQ721 beffFqxPXTxN8SxgHjy8RDqRkY++H+vhi/0xVKYnfJdgobR0WivF/Oi9OQBayrMHbsTsXEEyyC3 V54dQP7eSlkKe5qI6eA+mC0g= X-Received: by 127.0.0.2 with SMTP id UA1hYY7687511xr2NRH5YI4H; Sun, 29 Oct 2023 07:46:28 -0700 X-Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mx.groups.io with SMTP id smtpd.web11.73627.1698590787620268938 for ; Sun, 29 Oct 2023 07:46:27 -0700 X-Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-5859a7d6556so2976149a12.0 for ; Sun, 29 Oct 2023 07:46:27 -0700 (PDT) X-Gm-Message-State: y2TPTmn4p12LxN1B8ny8vKCSx7686176AA= X-Google-Smtp-Source: AGHT+IEobh28ubQOLEyIu/Cg0IHv8lU082PIpRi1AXzJhn0T0KTfcmGSlmDNqvVtAJsDHwk1ZWNgoA== X-Received: by 2002:a17:90b:120a:b0:27d:9f6:47a3 with SMTP id gl10-20020a17090b120a00b0027d09f647a3mr6931774pjb.31.1698590786851; Sun, 29 Oct 2023 07:46:26 -0700 (PDT) X-Received: from dhaval.. ([171.76.85.25]) by smtp.gmail.com with ESMTPSA id pt11-20020a17090b3d0b00b0027d15bd9fa2sm3783336pjb.35.2023.10.29.07.46.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 07:46:26 -0700 (PDT) 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 v7 2/5] MdePkg: Rename Cache Management Function To Clarify Fence Based Op Date: Sun, 29 Oct 2023 20:16:10 +0530 Message-Id: <20231029144613.150580-3-dhaval@rivosinc.com> In-Reply-To: <20231029144613.150580-1-dhaval@rivosinc.com> References: <20231029144613.150580-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="T/7ad+2m"; 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: 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..d4b56a9601da 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 +RiscVInvalidateInstCacheAsmFence (=0D VOID=0D );=0D =0D @@ -222,7 +222,7 @@ RiscVInvalidateInstCacheAsm ( **/=0D VOID=0D EFIAPI=0D -RiscVInvalidateDataCacheAsm (=0D +RiscVInvalidateDataCacheAsmFence (=0D VOID=0D );=0D =0D diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg/L= ibrary/BaseCacheMaintenanceLib/RiscVCache.c index d5efcf49a4bf..4eb18edb9aa7 100644 --- a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c +++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c @@ -21,7 +21,7 @@ InvalidateInstructionCache ( VOID=0D )=0D {=0D - RiscVInvalidateInstCacheAsm ();=0D + RiscVInvalidateInstCacheAsmFence ();=0D }=0D =0D /**=0D @@ -193,7 +193,7 @@ InvalidateDataCache ( VOID=0D )=0D {=0D - RiscVInvalidateDataCacheAsm ();=0D + RiscVInvalidateDataCacheAsmFence ();=0D }=0D =0D /**=0D diff --git a/MdePkg/Library/BaseLib/RiscV64/FlushCache.S b/MdePkg/Library/B= aseLib/RiscV64/FlushCache.S index 7c10fdd268af..e0eea0b5fb25 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(RiscVInvalidateInstCacheAsmFence)=0D +ASM_GLOBAL ASM_PFX(RiscVInvalidateDataCacheAsmFence)=0D =0D -ASM_PFX(RiscVInvalidateInstCacheAsm):=0D +ASM_PFX(RiscVInvalidateInstCacheAsmFence):=0D fence.i=0D ret=0D =0D -ASM_PFX(RiscVInvalidateDataCacheAsm):=0D +ASM_PFX(RiscVInvalidateDataCacheAsmFence):=0D fence=0D ret=0D --=20 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110264): https://edk2.groups.io/g/devel/message/110264 Mute This Topic: https://groups.io/mt/102256464/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-