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 48C44D80DF6 for ; Sun, 29 Oct 2023 14:46:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=rbYTN9pbBQAhIDCvIaM2YqQCvEeO1R8XxT/GZE38vjI=; 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=1698590784; v=1; b=vOZHUSn55ia7W2ORuzpXf7s3A1VaSLT1mgoWdliCeVWPj1y6/XtpgI4tXlLSjj0TzdjBQ8Uq /SpBJW8DNvuonS5Kyd9Cg+3BS4U0WkwUIiqIGSeXx5wMK5m8aZAc5W0WkvE8U/vCnRHyuJuPXp3 GIrZUjJNlvfzM9ssEmznIKH8= X-Received: by 127.0.0.2 with SMTP id nAZgYY7687511x6XkE9R8o8H; Sun, 29 Oct 2023 07:46:24 -0700 X-Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.web11.73625.1698590784377672582 for ; Sun, 29 Oct 2023 07:46:24 -0700 X-Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-27db9fdec0dso3141032a91.0 for ; Sun, 29 Oct 2023 07:46:24 -0700 (PDT) X-Gm-Message-State: u9LsOGWWMk0VS4GHjgj7T5dNx7686176AA= X-Google-Smtp-Source: AGHT+IHgUTzGXLzFRPpx9BuDBHtQOrxYXCp38GePKi4levRx8XrzGeyTW4dnLs3RobNq2HUX4d1oEw== X-Received: by 2002:a17:90b:23d7:b0:280:29cd:4802 with SMTP id md23-20020a17090b23d700b0028029cd4802mr2578360pjb.3.1698590783659; Sun, 29 Oct 2023 07:46:23 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 07:46:23 -0700 (PDT) From: "Dhaval Sharma" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Laszlo Ersek Subject: [edk2-devel] [PATCH v7 1/5] MdePkg: Move RISC-V Cache Management Declarations Into BaseLib Date: Sun, 29 Oct 2023 20:16:09 +0530 Message-Id: <20231029144613.150580-2-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=vOZHUSn5; 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 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 5d7067ee854e..7142bbfa42f2 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 (#110263): https://edk2.groups.io/g/devel/message/110263 Mute This Topic: https://groups.io/mt/102256462/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-