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 C359FAC0E26 for ; Mon, 4 Dec 2023 08:30:00 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Hez/mShx9kSN/mwSl/i19y3T0cwfPnYno9x/eURUsRA=; 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=1701678599; v=1; b=DeDvx5rvyq98EPrbInInrr4j/YBLlHLvfxKMXOqxG4vp5nRwDivrvI0cWuYfePo/mlakHNuW UPVpzpwIvzv0eyDF2U9KdvW2TXy9i7mZxbGVgsIFJYduD46PVUjiS6zFZDpSXFU43MBEfcFjYRZ z6gB/1JZ7OlyJUP8ziY0dQtI= X-Received: by 127.0.0.2 with SMTP id 5AIRYY7687511xi4ona2pU7j; Mon, 04 Dec 2023 00:29:59 -0800 X-Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mx.groups.io with SMTP id smtpd.web11.64429.1701678598255266887 for ; Mon, 04 Dec 2023 00:29:58 -0800 X-Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-286b4a84044so281510a91.1 for ; Mon, 04 Dec 2023 00:29:58 -0800 (PST) X-Gm-Message-State: 9G3VqcCzjr8KqcyDyTmxfurtx7686176AA= X-Google-Smtp-Source: AGHT+IHQgFGbwBJeWlcZYu+Fv8vkESnejQr3qCx+tShIaTRGMVXn6X8O0FKS+qjjYrPnDM/HwZKlpA== X-Received: by 2002:a17:90a:bc02:b0:286:6cc1:5fd5 with SMTP id w2-20020a17090abc0200b002866cc15fd5mr970497pjr.88.1701678597456; Mon, 04 Dec 2023 00:29:57 -0800 (PST) X-Received: from dhaval.blr.rivosinc.com ([49.249.129.34]) by smtp.gmail.com with ESMTPSA id h21-20020a170902f7d500b001d058ad8770sm5754211plw.306.2023.12.04.00.29.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 00:29:57 -0800 (PST) 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 v9 0/5] Cache Management Operations Support For RISC-V Date: Mon, 4 Dec 2023 13:59:45 +0530 Message-Id: <20231204082950.96914-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=DeDvx5rv; 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. Code Link: https://github.com/tianocore/edk2/pull/5103 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 | 177 +++++++++++++++----- 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, 264 insertions(+), 64 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 (#112018): https://edk2.groups.io/g/devel/message/112018 Mute This Topic: https://groups.io/mt/102967044/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-