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 2B227941026 for ; Mon, 29 Jan 2024 04:01:25 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=qD2x5/K90dqVtNH6vwkSUq1Vc3MHu6dcovAiSVS3I68=; c=relaxed/simple; d=groups.io; h=From:To: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=1706500884; v=1; b=jNxFAGX8wap42UHl7XegWBuSw6B8Z4ethB1dy07st0bHtMqQ+vByLyydDuBsxnkPIhhWxppL LYJgCZZWzgdH2fYvN5g1VCelGcy/WCzvqGFcC5zSskvOkw8/LvWyqS2ySgCwzzAYvy5muwNIFdL 8Oq+Kx6jpxPpzFPF6uQrLRXw= X-Received: by 127.0.0.2 with SMTP id XpLuYY7687511xps6KdPPWNQ; Sun, 28 Jan 2024 20:01:24 -0800 X-Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mx.groups.io with SMTP id smtpd.web11.6932.1706500883904591357 for ; Sun, 28 Jan 2024 20:01:24 -0800 X-Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1d72f71f222so8390315ad.1 for ; Sun, 28 Jan 2024 20:01:23 -0800 (PST) X-Gm-Message-State: hwAD8iy4F6iltuZUstOorcvwx7686176AA= X-Google-Smtp-Source: AGHT+IFLhe5Od83YNNKpP7vi4Hk5Kp0d+Akt6ZcIzKyiBJOI1mQe+xqEYP20VtGg0OG7zXN75QSpbQ== X-Received: by 2002:a17:902:7482:b0:1d7:2a40:c3c9 with SMTP id h2-20020a170902748200b001d72a40c3c9mr1456816pll.42.1706500883036; Sun, 28 Jan 2024 20:01:23 -0800 (PST) X-Received: from dhaval.. ([171.76.83.193]) by smtp.gmail.com with ESMTPSA id t3-20020a1709028c8300b001d7134d149dsm4244097plo.256.2024.01.28.20.01.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 20:01:22 -0800 (PST) From: "Dhaval Sharma" To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH v1 1/1] UefiCpuPkg: Add cache operations support for Arch proto Date: Mon, 29 Jan 2024 09:31:16 +0530 Message-Id: <20240129040116.296175-2-dhaval@rivosinc.com> In-Reply-To: <20240129040116.296175-1-dhaval@rivosinc.com> References: <20240129040116.296175-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=jNxFAGX8; 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 With CMO operations available for RISC-V, utilize them in CPU Architecture protocol. Signed-off-by: Dhaval Sharma Gerd Hoffmann Laszlo Ersek Rahul Kumar Ray Ni Sunil VL Andrei Warkentin devel@edk2.groups.io --- UefiCpuPkg/CpuDxeRiscV64/CpuDxe.h | 1 + UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.h b/UefiCpuPkg/CpuDxeRiscV64/C= puDxe.h index 68e6d038b66e..d4d67778eb1c 100644 --- a/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.h +++ b/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.h @@ -17,6 +17,7 @@ #include =0D #include =0D #include =0D +#include =0D #include =0D #include =0D #include =0D diff --git a/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c b/UefiCpuPkg/CpuDxeRiscV64/C= puDxe.c index 2af3b6223450..c6bae100a9e4 100644 --- a/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c +++ b/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c @@ -90,6 +90,20 @@ CpuFlushCpuDataCache ( IN EFI_CPU_FLUSH_TYPE FlushType=0D )=0D {=0D + switch (FlushType) {=0D + case EfiCpuFlushTypeWriteBack:=0D + WriteBackDataCacheRange ((VOID *)(UINTN)Start, (UINTN)Length);=0D + break;=0D + case EfiCpuFlushTypeInvalidate:=0D + InvalidateDataCacheRange ((VOID *)(UINTN)Start, (UINTN)Length);=0D + break;=0D + case EfiCpuFlushTypeWriteBackInvalidate:=0D + WriteBackInvalidateDataCacheRange ((VOID *)(UINTN)Start, (UINTN)Leng= th);=0D + break;=0D + default:=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D return EFI_SUCCESS;=0D }=0D =0D --=20 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114673): https://edk2.groups.io/g/devel/message/114673 Mute This Topic: https://groups.io/mt/104025802/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-