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 F21CE7803E1 for ; Mon, 4 Dec 2023 08:30:04 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=6p4SmiMhD8HSawbobj7+ryBWoaNNo57aKr2La+LlY4w=; 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=1701678603; v=1; b=NoNpi7mG5mipgRIVuhz0r9GvAHEPHVdbVQ/wX2rDvi/SOGTYzcTqGbhY2KiufPuopy9ZQ4m/ hWHOE0SAftff2VqHhKEgd9WXMPjTwBmWaceDlOLK5yf0oVWjxEHk4F4P2XfA80ixC69/Brvv9th RDODpK5gJ0iNl+soKAGycww8= X-Received: by 127.0.0.2 with SMTP id FwVEYY7687511x0kLv1f0LqW; Mon, 04 Dec 2023 00:30:03 -0800 X-Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mx.groups.io with SMTP id smtpd.web11.64434.1701678602997042466 for ; Mon, 04 Dec 2023 00:30:03 -0800 X-Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1d04c097e34so20215795ad.0 for ; Mon, 04 Dec 2023 00:30:02 -0800 (PST) X-Gm-Message-State: kg1ibmLXyQ5YUlyIAe0A1mMtx7686176AA= X-Google-Smtp-Source: AGHT+IGtggn/y0scSwwoWUqTGOr9g1zmsr0Y0d2IjpX+3xbE0Wqfa035GXWLR1QOwRFOENRtHbFMZw== X-Received: by 2002:a17:902:d2d1:b0:1cc:332f:9e4b with SMTP id n17-20020a170902d2d100b001cc332f9e4bmr4556715plc.1.1701678602152; Mon, 04 Dec 2023 00:30:02 -0800 (PST) X-Received: from dhaval.blr.rivosinc.com ([49.249.129.34]) by smtp.gmail.com with ESMTPSA id h21-20020a170902f7d500b001d058ad8770sm5754211plw.306.2023.12.04.00.29.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 00:30:01 -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 v9 2/5] MdePkg: Rename Cache Management Function To Clarify Fence Based Op Date: Mon, 4 Dec 2023 13:59:47 +0530 Message-Id: <20231204082950.96914-3-dhaval@rivosinc.com> In-Reply-To: <20231204082950.96914-1-dhaval@rivosinc.com> References: <20231204082950.96914-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=NoNpi7mG; 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 (#112020): https://edk2.groups.io/g/devel/message/112020 Mute This Topic: https://groups.io/mt/102967049/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-