From patchwork Wed Apr 5 13:40:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 79648 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp344290vqo; Wed, 5 Apr 2023 07:20:10 -0700 (PDT) X-Google-Smtp-Source: AKy350aL3/FMRHPNi+UScqVEP7O3JLjaHmophwCPQrs9qvH3LqAAFx3gVPtPai3xItmDYbMvidIc X-Received: by 2002:a05:6a20:66a7:b0:e1:204e:ddd5 with SMTP id o39-20020a056a2066a700b000e1204eddd5mr5929531pzh.15.1680704410610; Wed, 05 Apr 2023 07:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680704410; cv=none; d=google.com; s=arc-20160816; b=SGorZIBEPdPQJqFRdQKvXG/QN2TV1dPsTpPZ9F6F4Rqrba/BZ2yEpJwS4l2Ij6Fu2e TcWlTK21ol/OjMC+OJk/FCs0DKB9TMV7oRXqVD3TdM4LhGIlZuYNEkO6ZX884NdViES+ yihXN4OYCR3gGt0Y5W3NSzCJW2xI6J5FHDJCBqEhNAbzJ9zkaK1VFXmU+lBvyXKf6nSa gf61LgM+BokNUluFp9AeKqFujNH4bwOr9I9ZmDdHj1evJB9flHMzpJoSR6KoyN3fJFCM y7lWTMIZ2T0IQz0wk7u+ABZL8CvSz5mpmVXJvB0vZUJOXqmWbY+dFwvtDKCJKvQIZ4nY kJwA== 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; bh=hyEvZ1/JxdvEZ3QrBJlNvgjtkzc8ARbzdkWtSCfUT8g=; b=DJb0WicxptFBQ/IkVdF+n4fpHLvFvxsB+5s8U+kWGkkfkk8poRnwRv3g8K2aYLpQll gasZrb7xH7qYpr1HMEiokkgtZfCuKlQmZv+HiAfkSNryka3SrYLGn5u8QZ5RKs4mo/Y5 rLNJdLEhduZ+c/WSUPWwii2/vVKPuDKayxpkLBEerjCaMg0la0WYJIM7f3Psfp2dLapg NcoxKpILHuTrkDB6qK8bpInif20KLcW7L/n4abZRg2KErBumDUkfJSvWqPV6vVL1NJaS SrW7ZMWJR9hDD5sto6whSv0HEQ6Eq/MmSC7Y3bkRVUTi+DlJeyKA+FetVgc5pIvR1Shq PSHw== ARC-Authentication-Results: i=1; mx.google.com; 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 w5-20020aa79a05000000b00627debf9bd7si12304027pfj.233.2023.04.05.07.19.58; Wed, 05 Apr 2023 07:20:10 -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; 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 S238207AbjDEODS (ORCPT + 99 others); Wed, 5 Apr 2023 10:03:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238019AbjDEOCS (ORCPT ); Wed, 5 Apr 2023 10:02:18 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E34086E9D; Wed, 5 Apr 2023 07:01:15 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.1.0) id 90603c724ad88f93; Wed, 5 Apr 2023 16:01:12 +0200 Received: from kreacher.localnet (unknown [213.134.163.219]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 351E71B4E9E1; Wed, 5 Apr 2023 16:01:12 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 11/32] ACPICA: Add structure definitions for RISC-V RHCT Date: Wed, 05 Apr 2023 15:40:57 +0200 Message-ID: <1973202.usQuhbGJ8B@kreacher> In-Reply-To: <4845957.31r3eYUQgx@kreacher> References: <4845957.31r3eYUQgx@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.163.219 X-CLIENT-HOSTNAME: 213.134.163.219 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejuddgjeduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeifedrvdduleenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvudelpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=0.0 required=5.0 tests=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?1762346307702037061?= X-GMAIL-MSGID: =?utf-8?q?1762346307702037061?= From: Sunil V L 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 Signed-off-by: Sunil V L Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 9af17cb66faa..db292f325696 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -48,6 +48,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 */ @@ -2720,6 +2721,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