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 A9EBAAC13B8 for ; Wed, 13 Dec 2023 14:59:46 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=MWG4YObeTfKicuzKs/MZPhCXeD37jmfaJHp+vX2+AxQ=; 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=1702479585; v=1; b=FB5C4vjvxxOIh47I8b2+QOpaoSIDzuLvKp3SKcVHM3BjTt0ZnWgWcCQ3GgkOpcXxXfrEuFSL xP/4Seg6OuDy0+4igeEEaHsU0ISzwwjeFcL5pGq8KY1qLFmDzftREJecdeNiG1VrKm7if023OKY QduM2wzQMPX0dbp4HdMQlYtc= X-Received: by 127.0.0.2 with SMTP id fqBvYY7687511xB2eaL4vSTo; Wed, 13 Dec 2023 06:59:45 -0800 X-Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mx.groups.io with SMTP id smtpd.web11.37781.1702479584530560614 for ; Wed, 13 Dec 2023 06:59:44 -0800 X-Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-5c699b44dddso3437937a12.1 for ; Wed, 13 Dec 2023 06:59:44 -0800 (PST) X-Gm-Message-State: u2ofOh7xRprIz4bj8CWvk4Qnx7686176AA= X-Google-Smtp-Source: AGHT+IEe8l6DGgunmQhjr8zlm7gp+UKspF8r6jF5aQ8WE39L5U3pfdub9Xy17b7C8sAw2sb6EeG65A== X-Received: by 2002:a05:6a21:350d:b0:190:4376:c15f with SMTP id zc13-20020a056a21350d00b001904376c15fmr6126233pzb.8.1702479583819; Wed, 13 Dec 2023 06:59:43 -0800 (PST) X-Received: from dhaval.. ([171.76.83.136]) by smtp.gmail.com with ESMTPSA id s16-20020a62e710000000b006ce3bf7acc7sm9985388pfh.113.2023.12.13.06.59.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 06:59:43 -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 , Pedro Falcato Subject: [edk2-devel] [PATCH v10 2/5] MdePkg: Rename Cache Management Function To Clarify Fence Based Op Date: Wed, 13 Dec 2023 20:29:28 +0530 Message-Id: <20231213145931.28307-3-dhaval@rivosinc.com> In-Reply-To: <20231213145931.28307-1-dhaval@rivosinc.com> References: <20231213145931.28307-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=FB5C4vjv; 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 Cc: Pedro Falcato 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 2c69c5f52877..c5e7f6dff0bc 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 (#112480): https://edk2.groups.io/g/devel/message/112480 Mute This Topic: https://groups.io/mt/103150383/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-