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 76F50D811A1 for ; Wed, 13 Dec 2023 14:59:43 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=DhKA4Umnp67q/8oTuAOZTRGYCI+dorsp+Pqh83+N1Jg=; 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=1702479582; v=1; b=JwBy87EafDZG69RUo4HQ1etZtVSwmUDe5335caON7ZYNdVSGZ5rQWC7CLZ7fCnTyhbJ5BV84 9bCAJvpFxfo8HXoVwGoqt/tNPAR4tnWoVuooGkdScdnO1k88ZlWxv0i8EEtcrayE95/BAGc4taW OKSEA5QgG6cJtDrSKWVyE+so= X-Received: by 127.0.0.2 with SMTP id vSqAYY7687511xpEB8l75X4J; Wed, 13 Dec 2023 06:59:42 -0800 X-Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mx.groups.io with SMTP id smtpd.web10.38207.1702479581665097462 for ; Wed, 13 Dec 2023 06:59:41 -0800 X-Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-6ce7c1b07e1so6031517b3a.2 for ; Wed, 13 Dec 2023 06:59:41 -0800 (PST) X-Gm-Message-State: lONGIUUc0ve9NG3oHWAR9YHVx7686176AA= X-Google-Smtp-Source: AGHT+IHn5CnzOD3p9J6X5xtAEmIoRCQCW6U63Ho3NtcdXkhM+8gETmEscPgpl9PNB6l19uwmrWUryg== X-Received: by 2002:a05:6a20:7fa0:b0:190:28d1:8e0b with SMTP id d32-20020a056a207fa000b0019028d18e0bmr11910148pzj.35.1702479580965; Wed, 13 Dec 2023 06:59:40 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 06:59:40 -0800 (PST) From: "Dhaval Sharma" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Laszlo Ersek , Pedro Falcato Subject: [edk2-devel] [PATCH v10 1/5] MdePkg: Move RISC-V Cache Management Declarations Into BaseLib Date: Wed, 13 Dec 2023 20:29:27 +0530 Message-Id: <20231213145931.28307-2-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=JwBy87Ea; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none The declarations for cache Management functions belong to BaseLib instead of instance source file. This helps with further restructuring of cache management code for RISC-V. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Laszlo Ersek Cc: Pedro Falcato Signed-off-by: Dhaval Sharma Reviewed-by: Laszlo Ersek --- Notes: V7: - Added RB tag V6: - Move cache management function declaration in baselib where it belongs MdePkg/Include/Library/BaseLib.h | 20 +++++++++++++++++= +++ MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 20 -----------------= --- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/Base= Lib.h index 728e89d2bf44..2c69c5f52877 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -206,6 +206,26 @@ RiscVClearPendingTimerInterrupt ( VOID=0D );=0D =0D +/**=0D + RISC-V invalidate instruction cache.=0D +=0D +**/=0D +VOID=0D +EFIAPI=0D +RiscVInvalidateInstCacheAsm (=0D + VOID=0D + );=0D +=0D +/**=0D + RISC-V invalidate data cache.=0D +=0D +**/=0D +VOID=0D +EFIAPI=0D +RiscVInvalidateDataCacheAsm (=0D + VOID=0D + );=0D +=0D #endif // defined (MDE_CPU_RISCV64)=0D =0D #if defined (MDE_CPU_LOONGARCH64)=0D diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c b/MdePkg/L= ibrary/BaseCacheMaintenanceLib/RiscVCache.c index d08fb9f193ca..d5efcf49a4bf 100644 --- a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c +++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c @@ -10,26 +10,6 @@ #include =0D #include =0D =0D -/**=0D - RISC-V invalidate instruction cache.=0D -=0D -**/=0D -VOID=0D -EFIAPI=0D -RiscVInvalidateInstCacheAsm (=0D - VOID=0D - );=0D -=0D -/**=0D - RISC-V invalidate data cache.=0D -=0D -**/=0D -VOID=0D -EFIAPI=0D -RiscVInvalidateDataCacheAsm (=0D - VOID=0D - );=0D -=0D /**=0D Invalidates the entire instruction cache in cache coherency domain of th= e=0D calling CPU.=0D --=20 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112479): https://edk2.groups.io/g/devel/message/112479 Mute This Topic: https://groups.io/mt/103150382/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-