From patchwork Tue Mar 21 04:20:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil V L X-Patchwork-Id: 1759284 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=aqQmIx9z; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=YFPLEjW8; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pgdhh4KhJz247k for ; Tue, 21 Mar 2023 15:21:24 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=DDAiVuBZ9XTbPDsRtWSuCKYeuTHTbcDs7hZPNNWXX58=; b=aqQmIx9zvJNeyC AFXGR9htMkDKg0VJ5zrEhqNrp4y8NRYO1+coIrdVu7Pn3/yBUIR8UJi7I/cObb+S9IAZ7YBEHlSXG y8XltLhP2JjsQ5kT++XEGwDGdmvq46MEuSEKYVidpb6XWjlA4LHn2t0aQUMjVINdcBplG/qp2U2RF 4U+pM2IfSH7bT61i+zkLinKPz9ytfre1NiTb0n3VYdBirOzTD+uf4ST/3dRuRVyVIGpzvyTFI1rpD UMWkhgpg/PnHfsHMJftS7GXgd9OllbWgzkiDyTjk/uWdRXU/NZLmPuRElCfy8N0TL10SwktsOMi0R ZEt5MwcqJhD4qtHRSJ4w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1peTUh-00BB6V-3A; Tue, 21 Mar 2023 04:21:07 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1peTUc-00BB58-1G for opensbi@lists.infradead.org; Tue, 21 Mar 2023 04:21:06 +0000 Received: by mail-pl1-x632.google.com with SMTP id bc12so14205294plb.0 for ; Mon, 20 Mar 2023 21:21:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1679372460; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=LF9xkTPiCzACBtYBXYvDW92kBBIhaEuurBqf+1UkF6Y=; b=YFPLEjW8U3du9zycgXIkfmvjJ9ScTuyeQ0olb+swzGhTrSiLDXOpsbHL2ffjbbh/50 qwWqRp70DHumtxNJkVpxD4n2/yGCmq9FdTe4joilDD4hzB/FV+DTMJfe6HD3CfuNu/Xa J1s2nQniJw2Ws5bU5zDNQtudx6jQoqWoAnCadKCnT4r+snn971/BGNQIKYDwDgSRr/LS Z0pTsE7SALnlvWeFNITFXu/ZvKopawIdbkISxAKXEz1MhH7xnT/AGO7rOy2JdY7GyYjo 8az02gPvn6SLpQe3TR5Kcv0HCSZrfpBwGGMRnS7ozMAsGsowVEe3fC0+gLYj5ip6Wvyx k92g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679372460; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LF9xkTPiCzACBtYBXYvDW92kBBIhaEuurBqf+1UkF6Y=; b=NNKcUx3/ObLg2Ks15j0VbpnerMTEygCkPeo37ZZevqs4F9uYknvaCcE3L3RURZLIzN UxKbWd7XOxHuS+/ZWH5Mva5EhGreakYMttXiqwruqXdU5RakDBY8pHkysuvV9aiMUAYX 6rd0X2iHnXwvlY6Q4mWyik+WMq/85KFSlOpgxjWpSY20PEM0EzLCZwSPzUIhYMiwCUJZ aKIScVYRSoFAozS91TTJsgD9HyuLgOUclD/IU5OEWws/+KlToelDPDKXxk7FXadxasJx /CR5ki2DBRf9b48HGgoqGMhDwPlPk4fJ8W7jL27QNPpgEZk4gwZ9MtHI/V1POsliVzOx Cpyg== X-Gm-Message-State: AO0yUKVBDVS5KsMmMyDKpOm6LmfAaHjrHBwEHkEdVe35q/fOCUJY89Ur RJ7LtGG2HODAR7tLZbI8nvjUOQWW/visaIVI0cY= X-Google-Smtp-Source: AK7set+bBpyCWb6LtXfI+hstwXOwFnz00PmLxCE4nDS2MB6N79dyXuQTYNYtMkVH0lqFb5Kg6RSfWQ== X-Received: by 2002:a17:90b:3b90:b0:236:73d5:82cf with SMTP id pc16-20020a17090b3b9000b0023673d582cfmr1191373pjb.9.1679372460298; Mon, 20 Mar 2023 21:21:00 -0700 (PDT) Received: from kerodi.Dlink ([49.206.12.197]) by smtp.gmail.com with ESMTPSA id gt17-20020a17090af2d100b0023f355a0bb5sm7041512pjb.14.2023.03.20.21.20.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 21:20:59 -0700 (PDT) From: Sunil V L To: opensbi@lists.infradead.org Cc: Atish Patra , Anup Patel , Andrew Jones , Sunil V L Subject: [RFC PATCH v1 0/4] Add CPPC extension support in OpenSBI Date: Tue, 21 Mar 2023 09:50:50 +0530 Message-Id: <20230321042054.579520-1-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230320_212102_432703_7B675093 X-CRM114-Status: UNSURE ( 7.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The latest proposal of SBI CPPC extension can be found at: https://lists.riscv.org/g/tech-prs/message/301 This series implements SBI CPPC extension support in OpenSBI as-per above draft proposal. To test these patches, Qemu patches can be found in, aia_plic_cppc_v1 branch at: https://github.com/vlsunil/qemu.git Linux patches can be found in aia_plic_cppc_v1 branch at: https://github.com/vlsuni [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:632 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The latest proposal of SBI CPPC extension can be found at: https://lists.riscv.org/g/tech-prs/message/301 This series implements SBI CPPC extension support in OpenSBI as-per above draft proposal. To test these patches, Qemu patches can be found in, aia_plic_cppc_v1 branch at: https://github.com/vlsunil/qemu.git Linux patches can be found in aia_plic_cppc_v1 branch at: https://github.com/vlsunil/linux.git These OpenSBI patches can also be found in aia_plic_cppc_v1 branch at: https://github.com/vlsunil/opensbi.git Sunil V L (4): include: Add defines for SBI CPPC extension lib: sbi: Implement SBI CPPC extension lib: sbi: Print the CPPC device name NOT_FOR_MERGE: Add test code to emulate CPPC extension include/sbi/sbi_cppc.h | 37 +++++ include/sbi/sbi_ecall_interface.h | 34 +++++ lib/sbi/Kconfig | 4 + lib/sbi/objects.mk | 4 + lib/sbi/sbi_cppc.c | 101 ++++++++++++++ lib/sbi/sbi_ecall_cppc.c | 63 +++++++++ lib/sbi/sbi_init.c | 5 + platform/generic/objects.mk | 1 + platform/generic/platform.c | 6 + platform/generic/test_cppc.c | 217 ++++++++++++++++++++++++++++++ 10 files changed, 472 insertions(+) create mode 100644 include/sbi/sbi_cppc.h create mode 100644 lib/sbi/sbi_cppc.c create mode 100644 lib/sbi/sbi_ecall_cppc.c create mode 100644 platform/generic/test_cppc.c