From patchwork Thu Feb 16 18:20:25 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: 58185 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp456676wrn; Thu, 16 Feb 2023 10:22:47 -0800 (PST) X-Google-Smtp-Source: AK7set9PsJFTwVRcHYDFtj1ux/1J3buX0CYDTlKUvNHWb3JQaGu2cBppChudWDEsrqLDzWLfo/QD X-Received: by 2002:a17:903:2291:b0:19b:33c0:4092 with SMTP id b17-20020a170903229100b0019b33c04092mr281794plh.24.1676571766977; Thu, 16 Feb 2023 10:22:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676571766; cv=none; d=google.com; s=arc-20160816; b=Jmlh/QlTlnRBwBDh/3UkwEBJy95pcMGiOMGxpPLM4T7FZe2n83P4bHxmderemTfYzh ajUqsqAEA2GMs+GM89NH7g5t5bs8EMwj8lxAsUMPZvC8DUmlzXrl78tO2bVBmUTdUhTI wR6h3mJqRzKx90dU2eD8PAcq3cIDaPZ7xha3qj2uwIr+spstoTBzfvY09nmSJdC6vygW JJC/vGz4ebuDLzueqQoR4/0d7SV1I0PEBeu7VQk1UdR3/Gs1TDSTEzK+Ftb4hP1tejDu 5tN2pSu7K6o9r1MJr9SV3uNIzRa2nrECRuJTM+O53rzUiRCeu9hExApX0UovqatOtQaF VDXQ== 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=pfyzZGOgFR8JpdppLMBGRahWign1okVbjuzaxShQLj4=; b=BuRRpBwYaqXzEyDFY53v15CSHN+z5DQfLdrULBVmxmP9ROglgXolRKqlEXrmkectNK n3zH7BVUPs3dDcpnNUwske94c29uRcyOsJWrWAV4FwV6fgX/jQmzNL5AmNKV2GS+U81t +dItpXtuVUU8Oi14IXtZKEq8R7yrNoI4du8xCMl9sKcojH/mXB7gC7VGeqXwyGZeL4c7 QuYs6aqJjNPx1coOyZlOb3R35/G4giclUAlrVUwxgzzh3hu6vJQKYXpYef/V0982SsgX 2LOLXHz3EdPHpQdL0RfyAW7vfuJT/oEfMGFrpSNOsBzghGwEN5T/9VuDZ3TLSHVAAG5J Xk9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=UUpqTB6A; 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 kf14-20020a17090305ce00b00198b022d9d0si1992752plb.12.2023.02.16.10.22.33; Thu, 16 Feb 2023 10:22:46 -0800 (PST) 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=UUpqTB6A; 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 S230007AbjBPSVZ (ORCPT + 99 others); Thu, 16 Feb 2023 13:21:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230157AbjBPSVW (ORCPT ); Thu, 16 Feb 2023 13:21:22 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45C48552B4 for ; Thu, 16 Feb 2023 10:21:07 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id pg6-20020a17090b1e0600b002349579949aso2560449pjb.5 for ; Thu, 16 Feb 2023 10:21:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; 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=pfyzZGOgFR8JpdppLMBGRahWign1okVbjuzaxShQLj4=; b=UUpqTB6AUMM+Rdx7uT+Js1SJiUxUEqdBUlVRwfmgNPvgDY5tG85Wxm3Gwp/IEKUHuZ ENhr7womW2HoZ2BMwxNaM80t9Mvqr8Up6T/0VnSGLxjBCRKnZWmt4kPZ7ak3QDJZv38W qJ3Eq+45h+1FPXzR2jouMZbuuDxkDkqWPQU7lF74NAfc9C2Llq3uqjKOOiXVLcP+8X6z vlBl/lo7NfD/254ux+cQuNFC7vQUjHKUORmYpITy0o+zFBNrvthGinJGsCd+7+5jXJMq vbkDxrrOWBj6Rv701fRDlfv0umCjx8f2ReLN9OtGGlcJq8i+Fm+1hQ53vTXUZ91JcZDU 4sLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=pfyzZGOgFR8JpdppLMBGRahWign1okVbjuzaxShQLj4=; b=yb2zueNM5FBHAZvLVuif8See3EpZfOFw/8Xrc9b7DxwDaEoSLSyt6OCXHQzelWPhZM rAkZ11Wy2L13E+gCriCowP/OyKhjmIQg9oFQrVTAztuM4NmvK0tjK0XQAi/DSpGuoNLr r3AuoZDbtV8JvtftYxN6MiqAhLef0bBy70BvaQjzLfOKkhTcs8bvw8xde0BS2AUuHfkE /VTgS1bgRl++608TKpM47T98VGGm1Ci4dCBAKiyZfUR68xEGVwBoRSV8yxy1mYUO4UV6 SQDyTJVdDpoXhROHfuU3GfHFGIKgD5LeBrkXeAP21Vd54BYTdicU4DJCdhODeL2eeyUG Lb4A== X-Gm-Message-State: AO0yUKWOaQQgAhgDQM3aPKj4iwkEHJhr6TL61Iw1gzJHVlzfh1xp40+N JT9pfiDCtf59FRnayvbti/xLjA== X-Received: by 2002:a05:6a21:6d88:b0:c7:20d8:dc1e with SMTP id wl8-20020a056a216d8800b000c720d8dc1emr3483559pzb.27.1676571666717; Thu, 16 Feb 2023 10:21:06 -0800 (PST) Received: from kerodi.Dlink ([49.206.14.226]) by smtp.gmail.com with ESMTPSA id n21-20020a637215000000b004dff15fc121sm1517574pgc.36.2023.02.16.10.21.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 10:21:06 -0800 (PST) From: Sunil V L To: Palmer Dabbelt , Albert Ou , Paul Walmsley , "Rafael J . Wysocki" , Len Brown , Thomas Gleixner , Marc Zyngier , Jonathan Corbet Cc: linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Conor Dooley , Andrew Jones , Anup Patel , Atish Patra , Sunil V L , Robert Moore , acpica-devel@lists.linuxfoundation.org, "Rafael J . Wysocki" Subject: [PATCH V2 03/21] ACPICA: Add structure definitions for RISC-V RHCT Date: Thu, 16 Feb 2023 23:50:25 +0530 Message-Id: <20230216182043.1946553-4-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230216182043.1946553-1-sunilvl@ventanamicro.com> References: <20230216182043.1946553-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham 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?1758012917155638182?= X-GMAIL-MSGID: =?utf-8?q?1758012917155638182?= 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. This patch is not yet merged in ACPICA but a PR is raised. ACPICA PR: https://github.com/acpica/acpica/pull/804 Reference: Mantis: 2349 Cc: Robert Moore Cc: acpica-devel@lists.linuxfoundation.org Signed-off-by: Sunil V L Acked-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index abb700d246df..0715e937a453 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 */ @@ -2606,6 +2607,52 @@ enum acpi_rgrt_image_type { /******************************************************************************* * + * 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 * Version 1 *