From patchwork Tue Apr 4 18:20:17 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: 79331 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp78307vqo; Tue, 4 Apr 2023 11:25:00 -0700 (PDT) X-Google-Smtp-Source: AKy350a746tgtNHvV04a2+nufz0URI/sHeG2vcMqktfKfxC6Pr5U1knswddxy8VQI+itijyEjfVM X-Received: by 2002:a17:903:1107:b0:1a2:58f1:5e1d with SMTP id n7-20020a170903110700b001a258f15e1dmr4533294plh.36.1680632700478; Tue, 04 Apr 2023 11:25:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680632700; cv=none; d=google.com; s=arc-20160816; b=Qsot3fEToUefR9xxGG6f8FUh1EQeGTRNhOC9hZLgPONQSfjP6bsgFnCV4axX9cr08o L+iVKA5bZOWELbSBahVIiTlkou8Zkboycck5HvgmimGahEdUVNzI64HlKTBobkye2vXB skf6PvCWb8HjsVM/hD3VDnm4b6RUhaT4SrzszEXKVaaX3joMkFd/UVyMPLC9cIjoAZ7q ckAROVogTr++h1dlH+KO2KX/9Bxtg3meMlYGbsQrxfoY39COnM8j5yTloqpE5truFHW3 2zUUOJnlCQrvaHx96tWoQ6m1KHxVR2dvwSPoWhKJexTlGtpqD3CBp+5rrodUpX7fhR/I g84Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=b3qZ67y38AFkmcquwwQ+jCEdL0KsuQFOs2StQrvk1r4=; b=kwKmKUratEsJNtZE1b4dmi8Pb09Eb/pscAfsgvpiYydgwdZZWZwOzQPZpPk2vaCcGc pp7rELyDcz5sHMv9rcvUXH0Dh+N2DHxadP//CuqCDTtiLBFqrgghTm7iMQWx3k4OuGOr qeUIqt8GZtQExQV6lv+kIejjIIzpjhjNebl8VDqoOZVcR+9ZV0DRaNtB2/6O4HtQGi0M q1705yD3qXQBjr4DGO5Ovp1yDx0hxMgmFcBaRTwXbgUJiJDiaJ/hvhpUDz2+5kC379r1 +kTLKH8RF0656qr0pVz00z/jxq0LNGLOq3K67znDlCJnlHf4Xn98Uv0dDs1oWNwR2ybG HMgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=XNL5wXfo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s24-20020a170902a51800b001a1def4a04bsi10391603plq.375.2023.04.04.11.24.48; Tue, 04 Apr 2023 11:25:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=XNL5wXfo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236296AbjDDSVc (ORCPT + 99 others); Tue, 4 Apr 2023 14:21:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236385AbjDDSVM (ORCPT ); Tue, 4 Apr 2023 14:21:12 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B9EB4EFB for ; Tue, 4 Apr 2023 11:21:08 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id d22so20216624pgw.2 for ; Tue, 04 Apr 2023 11:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1680632467; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=b3qZ67y38AFkmcquwwQ+jCEdL0KsuQFOs2StQrvk1r4=; b=XNL5wXfoQpA8JsGSjQuuq5wSUIpDur/gFmvmgAhrVBcqxN0sZ7ILN08tIz7feSsspz ZgbCYW7Oj5TG/XPo/GlGOOTCVPQvrVI4DQ8lbbTyKz6HIn2aemsBMb+T0hx87Cei4nl8 Rew1Fs1jNngJ2L3xig4oSohNtjluWLOjVmYvF4Un2Goahq3aSJc6R6M3UdIPShqpaUoc GqVXWXy1n48x/C3ZJx6nlep571O9amcOnmFi7AWFmX9T3hkv1aGeV00MMWvyTruilF+0 u0dFJpxCaJt00eocdVaREbn90Dn/FqHHxy7PX/33GkL/I8OH2YaG61/S4jJz2NN6hOSn kktw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680632467; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b3qZ67y38AFkmcquwwQ+jCEdL0KsuQFOs2StQrvk1r4=; b=rpdeung0aySiLsHVAXQzVEAZd7ZI4qCrs1CVmFMyeDkYtuuvoQae7ubnWbUGWIyGaF c3PtZTTCvPUSavUZed4LaoZiDQcxxh62fctIfO1E4nInw4lakDFZNsX0agPoXVk8m2zh l6IfUom1UFKHMOJ9a9tfgZrjQqbc9E8VI8pRmBboKN8wmwjMgmF0icENp/4m0QIi24/b zYr8zmETTbH1AeAIXxY6cE8rCiioKk9obCOFYM2EY4YjTkSDdyhZEA8oWY9Pfp18GYxA tK3PzSIWNUoV0rlYbxfn3DeYpG2zFXVUkWqs/VJfCZ3kp4t349fAijk7o5CxIKd/4nrn oAtA== X-Gm-Message-State: AAQBX9fwHKPTTYOToXMztbG00DM+Bvfc4CbvKrVGML3gL/cGU0wAThbz hKDW1OPKBurFglth+NgX9KVpZA== X-Received: by 2002:aa7:9a07:0:b0:62b:47fc:a968 with SMTP id w7-20020aa79a07000000b0062b47fca968mr3052337pfj.8.1680632467769; Tue, 04 Apr 2023 11:21:07 -0700 (PDT) Received: from localhost.localdomain ([106.51.184.50]) by smtp.gmail.com with ESMTPSA id o12-20020a056a001bcc00b0062dcf5c01f9sm9018524pfw.36.2023.04.04.11.21.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 11:21:07 -0700 (PDT) From: Sunil V L To: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-crypto@vger.kernel.org, platform-driver-x86@vger.kernel.org, llvm@lists.linux.dev Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Len Brown , Daniel Lezcano , Thomas Gleixner , Weili Qian , Zhou Wang , Herbert Xu , Marc Zyngier , Maximilian Luz , Hans de Goede , Mark Gross , Nathan Chancellor , Nick Desaulniers , Tom Rix , "Rafael J . Wysocki" , "David S . Miller" , Sunil V L Subject: [PATCH V4 03/23] ACPICA: Add structure definitions for RISC-V RHCT Date: Tue, 4 Apr 2023 23:50:17 +0530 Message-Id: <20230404182037.863533-4-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230404182037.863533-1-sunilvl@ventanamicro.com> References: <20230404182037.863533-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762271114805512225?= X-GMAIL-MSGID: =?utf-8?q?1762271114805512225?= ACPICA commit 82afd0434e79f74b96a6be88115ddc8343a1ba40 RISC-V Hart Capabilities Table (RHCT) is a new static table. The ECR to add RHCT is approved by the UEFI forum and will be available in the next version of the ACPI spec. Link: https://github.com/acpica/acpica/commit/82afd043 Reference: Mantis: 2349 Signed-off-by: Sunil V L --- include/acpi/actbl2.h | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index c432fd15db65..86bb79fdfa62 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -47,6 +47,7 @@ #define ACPI_SIG_PRMT "PRMT" /* Platform Runtime Mechanism Table */ #define ACPI_SIG_RASF "RASF" /* RAS Feature table */ #define ACPI_SIG_RGRT "RGRT" /* Regulatory Graphics Resource Table */ +#define ACPI_SIG_RHCT "RHCT" /* RISC-V Hart Capabilities Table */ #define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */ #define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */ #define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */ @@ -2604,6 +2605,53 @@ enum acpi_rgrt_image_type { ACPI_RGRT_TYPE_RESERVED = 2 /* 2 and greater are reserved */ }; +/******************************************************************************* + * + * RHCT - RISC-V Hart Capabilities Table + * Version 1 + * + ******************************************************************************/ + +struct acpi_table_rhct { + struct acpi_table_header header; /* Common ACPI table header */ + u32 reserved; + u64 time_base_freq; + u32 node_count; + u32 node_offset; +}; + +/* + * RHCT subtables + */ +struct acpi_rhct_node_header { + u16 type; + u16 length; + u16 revision; +}; + +/* Values for RHCT subtable Type above */ + +enum acpi_rhct_node_type { + ACPI_RHCT_NODE_TYPE_ISA_STRING = 0x0000, + ACPI_RHCT_NODE_TYPE_HART_INFO = 0xFFFF, +}; + +/* + * RHCT node specific subtables + */ + +/* ISA string node structure */ +struct acpi_rhct_isa_string { + u16 isa_length; + char isa[]; +}; + +/* Hart Info node structure */ +struct acpi_rhct_hart_info { + u16 num_offsets; + u32 uid; /* ACPI processor UID */ +}; + /******************************************************************************* * * SBST - Smart Battery Specification Table