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 EDCE894192C for ; Wed, 13 Dec 2023 14:59:41 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=u9T0Hg41nLLDd1Fqg0B9/xBaHOKOzr4nkPQtR78gEVU=; 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=1702479580; v=1; b=Bs9FPyGfhBTf3Vj1s0WM4goSzXjLPajN7ZfiRHZqKDlMHjC7h93CNMoA4O6/IKWvkBe5T0sq NPEjEpBE1u/JBuuvwmVhNKy6g96mq+D3S82BpnBWWJaCdvY8AfPwQQAdYgdDIOpZfkNZqSO/wBk ZRmgsmy24rO2A3zn82ruz0bE= X-Received: by 127.0.0.2 with SMTP id UpUBYY7687511xjMqReU98RE; Wed, 13 Dec 2023 06:59:40 -0800 X-Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mx.groups.io with SMTP id smtpd.web10.38206.1702479579536564080 for ; Wed, 13 Dec 2023 06:59:39 -0800 X-Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-5c66418decaso3340238a12.3 for ; Wed, 13 Dec 2023 06:59:39 -0800 (PST) X-Gm-Message-State: iSFtdWy59dQOTctpshBLfXEkx7686176AA= X-Google-Smtp-Source: AGHT+IGg+sGRkgApjDVuecjgHWQ6vsPJoBhAVjQMk99BlV+U34mxMF8/ideg2nnv3m+0NLEaN3s7BA== X-Received: by 2002:a05:6a20:918b:b0:18f:97c:5b7e with SMTP id v11-20020a056a20918b00b0018f097c5b7emr3886198pzd.76.1702479578611; Wed, 13 Dec 2023 06:59:38 -0800 (PST) X-Received: from dhaval.. ([171.76.83.136]) by smtp.gmail.com with ESMTPSA id s16-20020a62e710000000b006ce3bf7acc7sm9985388pfh.113.2023.12.13.06.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 06:59:38 -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 , Pedro Falcato Subject: [edk2-devel] [PATCH v10 0/5] Cache Management Operations Support For RISC-V Date: Wed, 13 Dec 2023 20:29:26 +0530 Message-Id: <20231213145931.28307-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=Bs9FPyGf; 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. V10: - Fix formatting to keep comments within 80 - Replace RV with RISC-V - Fix an issue with multi line comments - Added assert to an unsupported function WriteBackInvalidateDataCache - Only keep CMO feature bitmask bit to disabled. Unimplemented bits remain 1. - Minor case modification in str in .uni 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: Laszlo Ersek Cc: Pedro Falcato 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 RISC-V 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 | 181 +++++++++++++++----- 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, 270 insertions(+), 62 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 (#112478): https://edk2.groups.io/g/devel/message/112478 Mute This Topic: https://groups.io/mt/103150381/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-