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 14099941AB6 for ; Sun, 29 Oct 2023 14:46:23 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=QGkv5Wx2lYs14/DNslBOZPFRGhCRuFk1gbcYhFsIUZM=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id: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=1698590782; v=1; b=ZVKQcPLIh5D896DHXVduQBrMY0TNJqpwCVVjFmCcnDFjimJqXZiGhhwEmlzROZkmFyAON55I sK2JxJdS3P4U/uKtQs/ZAuBLRON3N1DevvK5EIwb/NICekrRAl1celvhSXeYv0A4YwnkgMqvIaz +Dq4DS6M1XRjcB8xbEAdRmto= X-Received: by 127.0.0.2 with SMTP id yC1zYY7687511x9Pe8zSIEKY; Sun, 29 Oct 2023 07:46:22 -0700 X-Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mx.groups.io with SMTP id smtpd.web11.73624.1698590781633915450 for ; Sun, 29 Oct 2023 07:46:21 -0700 X-Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-27e0c1222d1so2408757a91.0 for ; Sun, 29 Oct 2023 07:46:21 -0700 (PDT) X-Gm-Message-State: scb6DTfP3GKPShtXXQo9jUVEx7686176AA= X-Google-Smtp-Source: AGHT+IF4NjLeJuqgY1+QoJuDXP8YBZhGX3GwmHGSj8Gors7g4u2aG2DkGCIcWNlFNU1ZmvnLjCW+ug== X-Received: by 2002:a17:90a:ff17:b0:280:53b2:4b9f with SMTP id ce23-20020a17090aff1700b0028053b24b9fmr356138pjb.20.1698590780828; Sun, 29 Oct 2023 07:46:20 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 07:46:20 -0700 (PDT) From: "Dhaval Sharma" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Sunil V L , Andrei Warkentin , Laszlo Ersek , Michael D Kinney , Liming Gao , Zhiguang Liu , Daniel Schaefer Subject: [edk2-devel] [PATCH v7 0/5] Cache Management Operations Support For RISC-V Date: Sun, 29 Oct 2023 20:16:08 +0530 Message-Id: <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: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ZVKQcPLI; 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 Implementing code to support Cache Management Operations (CMO) defined by RISC-V CMO instructions.https://github.com/riscv/riscv-CMOs This is a re-write of original series v5. The patchset contains 5 patches- created based on V5 feedback. 1. Restructuring of existing code and move instruction declarations into BaseLib 2. Renaming existing functions to denote type of instruction used to maanage cache. This is useful for further patches where more cache management instructions are added. 3. Add the new cache maintenance operations to BaseLib, including the new assembly instruction encodings. 4. Update BaseCacheMaintenanceLib (utilizing the new BaseLib primitives) 5. Add platform level PCD to allow overriding of RISC-V features. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Sunil V L Cc: Andrei Warkentin Cc: Laszlo Ersek Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Daniel Schaefer Dhaval (5): MdePkg: Move RISC-V Cache Management Declarations Into BaseLib MdePkg: Rename Cache Management Function To Clarify Fence Based Op MdePkg: Implement RISC-V Cache Management Operations MdePkg: Utilize Cache Management Operations Implementation For RISC-V OvmfPkg/RiscVVirt: Override for RV CPU Features MdePkg/MdePkg.dec | 8 + OvmfPkg/RiscVVirt/RiscVVirt.dsc.inc | 1 + MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf | 5 + MdePkg/Library/BaseLib/BaseLib.inf | 2 +- MdePkg/Include/Library/BaseLib.h | 53 ++++++ MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 172 ++++++++++++++++---- MdePkg/Include/RiscV64/RiscVasm.inc | 19 +++ MdePkg/Library/BaseLib/RiscV64/FlushCache.S | 21 --- MdePkg/Library/BaseLib/RiscV64/RiscVCacheMgmt.S | 38 +++++ MdePkg/MdePkg.uni | 4 + 10 files changed, 269 insertions(+), 54 deletions(-) create mode 100644 MdePkg/Include/RiscV64/RiscVasm.inc delete mode 100644 MdePkg/Library/BaseLib/RiscV64/FlushCache.S create mode 100644 MdePkg/Library/BaseLib/RiscV64/RiscVCacheMgmt.S -- 2.39.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110262): https://edk2.groups.io/g/devel/message/110262 Mute This Topic: https://groups.io/mt/102256459/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-