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 CE79878003C for ; Sat, 21 Oct 2023 17:33:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=zpvg+7nY7iLidx7+E41ckktjPmeP9pOJxRFSrlchuwM=; 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=1697909605; v=1; b=ZVgxzBne00qqXn14knGKxgOnlUJli/OyK8de5HcYxV2eDx0hahVahCTedaXhWqyZ+wbq4geS XriTQ2wkjBsUWDZmqtQ0UCNJv0tuvVxMyOJENy8zIzk6zrineX706XcyYdLZPNHZmrY6Q0xQ9DC 6v6OUhOrciNktsuVUb8Dk3JI= X-Received: by 127.0.0.2 with SMTP id DskXYY7687511xwND9Q5S2lf; Sat, 21 Oct 2023 10:33:25 -0700 X-Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mx.groups.io with SMTP id smtpd.web11.83889.1697909604188809240 for ; Sat, 21 Oct 2023 10:33:24 -0700 X-Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-577fff1cae6so1313074a12.1 for ; Sat, 21 Oct 2023 10:33:24 -0700 (PDT) X-Gm-Message-State: x3ZECEpRgYRPEB3HWbIMptHcx7686176AA= X-Google-Smtp-Source: AGHT+IGbDiqZe+5iqXESKpMW1UXyp19KuVmo0e+VGp0eNv1Pq8UzyHBLBXTmF42kUXs5XK/D2WnFGw== X-Received: by 2002:a17:903:456:b0:1c9:c3eb:6551 with SMTP id iw22-20020a170903045600b001c9c3eb6551mr9487018plb.10.1697909603258; Sat, 21 Oct 2023 10:33:23 -0700 (PDT) X-Received: from dhaval.. ([2401:4900:1c80:4a26:3248:430a:4718:b9e6]) by smtp.gmail.com with ESMTPSA id jc15-20020a17090325cf00b001c746b986e5sm3433158plb.45.2023.10.21.10.33.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Oct 2023 10:33:22 -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 v6 0/5] Cache Management Operations Support For RISC-V Date: Sat, 21 Oct 2023 23:03:09 +0530 Message-Id: <20231021173314.19363-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=ZVgxzBne; 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 | 2 + MdePkg/Library/BaseLib/BaseLib.inf | 2 +- MdePkg/Include/Library/BaseLib.h | 53 +++++++ MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 163 ++++++++++++++++---- 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, 258 insertions(+), 53 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 (#109875): https://edk2.groups.io/g/devel/message/109875 Mute This Topic: https://groups.io/mt/102103774/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-