From patchwork Thu Oct 27 17:47:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 11904 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp376916wru; Thu, 27 Oct 2022 11:01:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7V92U10gzfp0rqdTTSaAPUCZ24sY7CtoaiClFbhM2tersm3mwMBjfhknkuvMTdR8PJABle X-Received: by 2002:a05:6a00:24c2:b0:52e:7181:a8a0 with SMTP id d2-20020a056a0024c200b0052e7181a8a0mr50662118pfv.57.1666893690290; Thu, 27 Oct 2022 11:01:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666893690; cv=none; d=google.com; s=arc-20160816; b=TLBtJTRW6ZP4gL3N9sfuLp3OwNeUIawJ9OCRCmbBds8/E9/8alOYaflC25c7O0bXnV 7aQK6pKSY/DoywYFrFcmIzJ2oZrJzDmHl3Zmh8nzNyDgch9viaa+uIHp3THxI+KA7RO7 8eJYqIM8KQpUlLOuv52avfYKzUR6epjEyOm5HsQugB4QdRZ7BWprmBmaME/Bocyjptdx RO3kLtt27VwmvVVGLRzM3DFEyrOAzuN58PZEDtm5E/7vR6Rl7RldquYiE8vIybzZYiKv uQ0dJKRb0fMeB8pdaBpe8vtl3kc4rIbysW/OM3V2IFEx8/s3/y2s1FXV7msBXQ/pthtS TtNQ== 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=yk0/NPWZunSeDoE0oAtMxZSBr6C0Y48RFupXZ2Q2HKg=; b=G6kPYV3t7/a/BfwUa/wuvLV/jLsRhueOmsWMBAOl6GTJOupHoFYckFTCA/KdBC/H/I 7p/TmyNVcA56B5WX+KLQM/dhHNJbtgqMU9jVDz7quNFG7Ha4hEZeD39BU3qk2a7s6TSQ qYW7VhmK1KfpVLJFEQfiUlesGm4JMumUUlHFO553XoKBxZqM3B1WGQjw0QKiHeZZoH1/ V8PeJd2qscdf6Z0Irvv7ojREMUjt/7MroBAjc0HMwAOINdB30UNUBOIVRc/RdKccstAj LoOCC2SMDPHaDJq42G05y3HkonfamM1jQt8q05UAlpyhJzQ0Kh966mniHUr4omq6++nq XRcA== 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 w18-20020a170902e89200b00186f1c2244bsi1628668plg.240.2022.10.27.11.01.16; Thu, 27 Oct 2022 11:01:30 -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 S236313AbiJ0SAY (ORCPT + 99 others); Thu, 27 Oct 2022 14:00:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236146AbiJ0R75 (ORCPT ); Thu, 27 Oct 2022 13:59:57 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D20A51843E6; Thu, 27 Oct 2022 10:59:21 -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.0.0) id 6d90cd789da94385; Thu, 27 Oct 2022 19:59:19 +0200 Received: from kreacher.localnet (unknown [213.134.169.45]) (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 0EDE766D83D; Thu, 27 Oct 2022 19:59:19 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 01/11] ACPICA: MADT: Add loong_arch-specific APICs support Date: Thu, 27 Oct 2022 19:47:30 +0200 Message-ID: <3201025.aeNJFYEL58@kreacher> In-Reply-To: <4756726.GXAFRqVoOG@kreacher> References: <4756726.GXAFRqVoOG@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.45 X-CLIENT-HOSTNAME: 213.134.169.45 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepueffffeugeehvdduveekueegvdeigefhfeegkeeuveetgfejhefhledtjeevledtnecuffhomhgrihhnpehgihhthhhusgdrtghomhdpuhgvfhhirdhorhhgnecukfhppedvudefrddufeegrdduieelrdegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieelrdeghedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepfedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrohgsvghrthdrmhhoohhrvgesihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1747864718008424063?= X-GMAIL-MSGID: =?utf-8?q?1747864718008424063?= From: Huacai Chen ACPICA commit 1dc530059a3e6202e941e6a9478cf30f092bfb47 loong_arch-specific interrupt controllers (similar to APIC) are added in the next revision of ACPI Specification (current revision is 6.4), which including CORE_PIC (CPUINTC), LIO_PIC (LIOINTC), EIO_PIC (EIOINTC), HT_PIC (HTVECINTC), BIO_PIC (PCHINTC), LPC_PIC (PCHLPC) and MSI_PIC (PCHMSI). This patch add their definition. ACPI changes of loong_arch-specific interrupt controllers have already been approved in the ECRs, and will be public in the next revision of ACPI Specification. Link: https://github.com/acpica/acpica/commit/1dc53005 Reference: https://mantis.uefi.org/mantis/view.php?id=2203 Reference: https://mantis.uefi.org/mantis/view.php?id=2313 Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 139 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 137 insertions(+), 2 deletions(-) Index: linux-pm/include/acpi/actbl2.h =================================================================== --- linux-pm.orig/include/acpi/actbl2.h +++ linux-pm/include/acpi/actbl2.h @@ -865,7 +865,14 @@ enum acpi_madt_type { ACPI_MADT_TYPE_GENERIC_REDISTRIBUTOR = 14, ACPI_MADT_TYPE_GENERIC_TRANSLATOR = 15, ACPI_MADT_TYPE_MULTIPROC_WAKEUP = 16, - ACPI_MADT_TYPE_RESERVED = 17, /* 17 to 0x7F are reserved */ + ACPI_MADT_TYPE_CORE_PIC = 17, + ACPI_MADT_TYPE_LIO_PIC = 18, + ACPI_MADT_TYPE_HT_PIC = 19, + ACPI_MADT_TYPE_EIO_PIC = 20, + ACPI_MADT_TYPE_MSI_PIC = 21, + ACPI_MADT_TYPE_BIO_PIC = 22, + ACPI_MADT_TYPE_LPC_PIC = 23, + ACPI_MADT_TYPE_RESERVED = 24, /* 24 to 0x7F are reserved */ ACPI_MADT_TYPE_OEM_RESERVED = 0x80 /* 0x80 to 0xFF are reserved for OEM use */ }; @@ -1096,7 +1103,135 @@ struct acpi_madt_multiproc_wakeup_mailbo #define ACPI_MP_WAKE_COMMAND_WAKEUP 1 -/* 17: OEM data */ +/* 17: CPU Core Interrupt Controller (ACPI 6.5) */ + +struct acpi_madt_core_pic { + struct acpi_subtable_header header; + u8 version; + u32 processor_id; + u32 core_id; + u32 flags; +}; + +/* Values for Version field above */ + +enum acpi_madt_core_pic_version { + ACPI_MADT_CORE_PIC_VERSION_NONE = 0, + ACPI_MADT_CORE_PIC_VERSION_V1 = 1, + ACPI_MADT_CORE_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ +}; + +/* 18: Legacy I/O Interrupt Controller (ACPI 6.5) */ + +struct acpi_madt_lio_pic { + struct acpi_subtable_header header; + u8 version; + u64 address; + u16 size; + u8 cascade[2]; + u32 cascade_map[2]; +}; + +/* Values for Version field above */ + +enum acpi_madt_lio_pic_version { + ACPI_MADT_LIO_PIC_VERSION_NONE = 0, + ACPI_MADT_LIO_PIC_VERSION_V1 = 1, + ACPI_MADT_LIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ +}; + +/* 19: HT Interrupt Controller (ACPI 6.5) */ + +struct acpi_madt_ht_pic { + struct acpi_subtable_header header; + u8 version; + u64 address; + u16 size; + u8 cascade[8]; +}; + +/* Values for Version field above */ + +enum acpi_madt_ht_pic_version { + ACPI_MADT_HT_PIC_VERSION_NONE = 0, + ACPI_MADT_HT_PIC_VERSION_V1 = 1, + ACPI_MADT_HT_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ +}; + +/* 20: Extend I/O Interrupt Controller (ACPI 6.5) */ + +struct acpi_madt_eio_pic { + struct acpi_subtable_header header; + u8 version; + u8 cascade; + u8 node; + u64 node_map; +}; + +/* Values for Version field above */ + +enum acpi_madt_eio_pic_version { + ACPI_MADT_EIO_PIC_VERSION_NONE = 0, + ACPI_MADT_EIO_PIC_VERSION_V1 = 1, + ACPI_MADT_EIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ +}; + +/* 21: MSI Interrupt Controller (ACPI 6.5) */ + +struct acpi_madt_msi_pic { + struct acpi_subtable_header header; + u8 version; + u64 msg_address; + u32 start; + u32 count; +}; + +/* Values for Version field above */ + +enum acpi_madt_msi_pic_version { + ACPI_MADT_MSI_PIC_VERSION_NONE = 0, + ACPI_MADT_MSI_PIC_VERSION_V1 = 1, + ACPI_MADT_MSI_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ +}; + +/* 22: Bridge I/O Interrupt Controller (ACPI 6.5) */ + +struct acpi_madt_bio_pic { + struct acpi_subtable_header header; + u8 version; + u64 address; + u16 size; + u16 id; + u16 gsi_base; +}; + +/* Values for Version field above */ + +enum acpi_madt_bio_pic_version { + ACPI_MADT_BIO_PIC_VERSION_NONE = 0, + ACPI_MADT_BIO_PIC_VERSION_V1 = 1, + ACPI_MADT_BIO_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ +}; + +/* 23: LPC Interrupt Controller (ACPI 6.5) */ + +struct acpi_madt_lpc_pic { + struct acpi_subtable_header header; + u8 version; + u64 address; + u16 size; + u8 cascade; +}; + +/* Values for Version field above */ + +enum acpi_madt_lpc_pic_version { + ACPI_MADT_LPC_PIC_VERSION_NONE = 0, + ACPI_MADT_LPC_PIC_VERSION_V1 = 1, + ACPI_MADT_LPC_PIC_VERSION_RESERVED = 2 /* 2 and greater are reserved */ +}; + +/* 80: OEM data */ struct acpi_madt_oem_data { u8 oem_data[0]; From patchwork Thu Oct 27 17:48:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 11905 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp376931wru; Thu, 27 Oct 2022 11:01:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6h5uX4Te7oRYlPKhMAaIJstsDKbtTJuR+iIun9S1PGlIxj8jvoqCA6LCp5+VkjWSWhjWNI X-Received: by 2002:a17:902:e742:b0:17f:6a44:ee4a with SMTP id p2-20020a170902e74200b0017f6a44ee4amr51739851plf.103.1666893692016; Thu, 27 Oct 2022 11:01:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666893692; cv=none; d=google.com; s=arc-20160816; b=S0+xacoKMXxtRSHrRw1fvGeKOwQV7TFrNemWSTO1XaaVUTBQPbYVAjq6gTUts48s7V WsoQVpK1VXHed2+VTkX4TIeelB3CH2jcL9XkOZmihaGscSM6JTfEr5/K98/NlHv2uc6X ajV47vskrjT648Z2X6q+qyLIWNN9AiVX5/mSYgAnXodoLHRQOOV68znJA3EdTuJvIWN6 mTNb3cANnvne25XfeYF1WZ/GPdfldHfAE0TSGOe3TRoJ5UrWMeD/QaKB+FkQpiOkXQRH Rl+7/qJVDY0wJrWhFu23EcMBuD7dfArno0EtEbC7tZFdDcgtyY0bvgEpvYCwdaIWGISt KAnQ== 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=4MtUd8tP0AET81HhIavnsYPFItRKu1r3mrJCvOxm4MQ=; b=UiJDOZdxwgICYpcvfbRDibUn390+ZZnsi4USv5HA1i/Rq85sc/ghh85slrgXyrbxTm DNuuti6hHDnTwdEx+L1vQZLmqamnbstw+4YDz70OU8XdXxQDvCK5FekFr667ktfekBmV hZnBqysGEc+apUC9JoTPDHRx0ZLkMzvkoLv2n6yH3pIXipB6vI6h1c/1iYPqf7/f72Kp e+lPpNjRRYW/XsScrKjAZX8uBu+1rdFy28Fgu5o6OC3sLLuUghr7qE4PTi+Xznuz+5fl zW9CscrAAE98Lx4wanR7frR2pxg3VkUrVwO7s4kXrm1jv0fu705xwsq6h+fmjTl0NZpa BIWw== 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 f7-20020a170902ce8700b0017f802fcffesi2733177plg.410.2022.10.27.11.00.49; Thu, 27 Oct 2022 11:01:32 -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 S236247AbiJ0SAO (ORCPT + 99 others); Thu, 27 Oct 2022 14:00:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236117AbiJ0R7i (ORCPT ); Thu, 27 Oct 2022 13:59:38 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62E6417F2AD; Thu, 27 Oct 2022 10:59:20 -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.0.0) id 3854a3df824a396c; Thu, 27 Oct 2022 19:59:18 +0200 Received: from kreacher.localnet (unknown [213.134.169.45]) (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 625BC66D83D; Thu, 27 Oct 2022 19:59:17 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 02/11] ACPICA: Events: Support fixed PCIe wake event Date: Thu, 27 Oct 2022 19:48:53 +0200 Message-ID: <3207154.44csPzL39Z@kreacher> In-Reply-To: <4756726.GXAFRqVoOG@kreacher> References: <4756726.GXAFRqVoOG@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.45 X-CLIENT-HOSTNAME: 213.134.169.45 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepveehheehueelffeguefgteeuffffgfelhfeghfdvkeffueehteejjeegudeileeknecuffhomhgrihhnpehuvghfihdrohhrghdpghhithhhuhgsrdgtohhmnecukfhppedvudefrddufeegrdduieelrdegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieelrdeghedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepfedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrohgsvghrthdrmhhoohhrvgesihhnthgvlhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1747864720108317298?= X-GMAIL-MSGID: =?utf-8?q?1747864720108317298?= From: Huacai Chen ACPICA commit 32d875705c8ee8f99fd8b78dbed48633486a7640 Some chipsets (such as Loongson's LS7A) support fixed pcie wake event which is defined in the PM1 block(related description can be found in 4.8.4.1.1 PM1 Status Registers, 4.8.4.2.1 PM1 Control Registers and 5.2.9 Fixed ACPI Description Table (FADT)), so we add code to handle it. Link: https://uefi.org/specifications/ACPI/6.4/ Link: https://github.com/acpica/acpica/commit/32d87570 Co-developed-by: Jianmin Lv Signed-off-by: Jianmin Lv Signed-off-by: Huacai Chen Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/evevent.c | 11 +++++++++++ drivers/acpi/acpica/hwsleep.c | 14 ++++++++++++++ drivers/acpi/acpica/utglobal.c | 4 ++++ include/acpi/actypes.h | 3 ++- 4 files changed, 31 insertions(+), 1 deletion(-) Index: linux-pm/drivers/acpi/acpica/evevent.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/evevent.c +++ linux-pm/drivers/acpi/acpica/evevent.c @@ -142,6 +142,9 @@ static acpi_status acpi_ev_fixed_event_i status = acpi_write_bit_register(acpi_gbl_fixed_event_info [i].enable_register_id, + (i == + ACPI_EVENT_PCIE_WAKE) ? + ACPI_ENABLE_EVENT : ACPI_DISABLE_EVENT); if (ACPI_FAILURE(status)) { return (status); @@ -185,6 +188,11 @@ u32 acpi_ev_fixed_event_detect(void) return (int_status); } + if (fixed_enable & ACPI_BITMASK_PCIEXP_WAKE_DISABLE) + fixed_enable &= ~ACPI_BITMASK_PCIEXP_WAKE_DISABLE; + else + fixed_enable |= ACPI_BITMASK_PCIEXP_WAKE_DISABLE; + ACPI_DEBUG_PRINT((ACPI_DB_INTERRUPTS, "Fixed Event Block: Enable %08X Status %08X\n", fixed_enable, fixed_status)); @@ -250,6 +258,9 @@ static u32 acpi_ev_fixed_event_dispatch( if (!acpi_gbl_fixed_event_handlers[event].handler) { (void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. enable_register_id, + (event == + ACPI_EVENT_PCIE_WAKE) ? + ACPI_ENABLE_EVENT : ACPI_DISABLE_EVENT); ACPI_ERROR((AE_INFO, Index: linux-pm/drivers/acpi/acpica/hwsleep.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/hwsleep.c +++ linux-pm/drivers/acpi/acpica/hwsleep.c @@ -311,6 +311,20 @@ acpi_status acpi_hw_legacy_wake(u8 sleep [ACPI_EVENT_SLEEP_BUTTON]. status_register_id, ACPI_CLEAR_STATUS); + /* Enable pcie wake event if support */ + if ((acpi_gbl_FADT.flags & ACPI_FADT_PCI_EXPRESS_WAKE)) { + (void) + acpi_write_bit_register(acpi_gbl_fixed_event_info + [ACPI_EVENT_PCIE_WAKE]. + enable_register_id, + ACPI_DISABLE_EVENT); + (void) + acpi_write_bit_register(acpi_gbl_fixed_event_info + [ACPI_EVENT_PCIE_WAKE]. + status_register_id, + ACPI_CLEAR_STATUS); + } + acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING); return_ACPI_STATUS(status); } Index: linux-pm/drivers/acpi/acpica/utglobal.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/utglobal.c +++ linux-pm/drivers/acpi/acpica/utglobal.c @@ -186,6 +186,10 @@ struct acpi_fixed_event_info acpi_gbl_fi ACPI_BITREG_RT_CLOCK_ENABLE, ACPI_BITMASK_RT_CLOCK_STATUS, ACPI_BITMASK_RT_CLOCK_ENABLE}, + /* ACPI_EVENT_PCIE_WAKE */ {ACPI_BITREG_PCIEXP_WAKE_STATUS, + ACPI_BITREG_PCIEXP_WAKE_DISABLE, + ACPI_BITMASK_PCIEXP_WAKE_STATUS, + ACPI_BITMASK_PCIEXP_WAKE_DISABLE}, }; #endif /* !ACPI_REDUCED_HARDWARE */ Index: linux-pm/include/acpi/actypes.h =================================================================== --- linux-pm.orig/include/acpi/actypes.h +++ linux-pm/include/acpi/actypes.h @@ -723,7 +723,8 @@ typedef u32 acpi_event_type; #define ACPI_EVENT_POWER_BUTTON 2 #define ACPI_EVENT_SLEEP_BUTTON 3 #define ACPI_EVENT_RTC 4 -#define ACPI_EVENT_MAX 4 +#define ACPI_EVENT_PCIE_WAKE 5 +#define ACPI_EVENT_MAX 5 #define ACPI_NUM_FIXED_EVENTS ACPI_EVENT_MAX + 1 /* From patchwork Thu Oct 27 17:50:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 11903 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp376542wru; Thu, 27 Oct 2022 11:00:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6BhVFJ66B2u9SPM9bIJLkVvth6B1r4dwl+ha7ba5ITODHm66KXbtiCDo3dw/MF8INfmNlT X-Received: by 2002:a63:5f91:0:b0:46f:53ce:8005 with SMTP id t139-20020a635f91000000b0046f53ce8005mr3000526pgb.428.1666893652692; Thu, 27 Oct 2022 11:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666893652; cv=none; d=google.com; s=arc-20160816; b=G1DE0rBlsSvrF+zRbfbv8hLLbLTN6pZ1hF1i/WxZ7ohUM5Ph8h0k/CmkaeWKtDCTon Jskk+LrYql9TrpW2NMWUx8z+Zr/Vu21KY3/E1yS6VHvHcnp48qMjEZSlfBaiSj+BaG04 6zwbh6jY3qv8UTRZUzDroEXB04F7c79sYyFc9RoGDBzwGFj448KWYMbreYUNSQOjDYcf IqEbrIwmge8EXr55MGWA4lyiVWpiMT7A9xxXWRIbYNVL2JBWfIP3CS9s9yFMscKMwFWK 9vP+AetbijDlXl3xFRV01eyAtR30JrnovsGRI/DDKNRbiNbbYr5Efj6griCKCGBb0Wjl kK7w== 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=O+CnI8JPuYtMDTEmLAtzTr/5MVYa4V/4mL/8SNYtbqw=; b=hZ2Lp2RWyW2L1NjSZ328L8UZxrGkyWqMguisAzoB8I86ctLdsaJAATJlkF+VxOX5M5 9t/I+y0/lVqEpl3UE2+euRHnyQqszJ/1loJtHTonJtmSEek0+I1oXHZvEVfEZ8V3ApnD uHW1KDWJufoF44KyaQ8XZv9oBB7NnXFu9uO6ctDS9DXY9SjMqLhhJuyaRzh3W9UTaO6N ldmF7GCj/aI16v3yE44yid9f6RDwuiHitoxBBKZ4ojZIFzPLgxluS9trckZD0oW0KoL3 a8PS9GJmhLMNI61gymgzjJ7vtFM0wN73DYorydA7HOjdaayrl0UoKnpbiAJBEa+cEFhT 4apQ== 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 20-20020a630114000000b0046edd275609si2413188pgb.684.2022.10.27.11.00.39; Thu, 27 Oct 2022 11:00:52 -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 S236077AbiJ0SAK (ORCPT + 99 others); Thu, 27 Oct 2022 14:00:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235962AbiJ0R7Z (ORCPT ); Thu, 27 Oct 2022 13:59:25 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 242E3180AD9; Thu, 27 Oct 2022 10:59:17 -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.0.0) id eea9195a9de4c2bc; Thu, 27 Oct 2022 19:59:16 +0200 Received: from kreacher.localnet (unknown [213.134.169.45]) (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 4C79E66D83D; Thu, 27 Oct 2022 19:59:15 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 03/11] ACPICA: Check that EBDA pointer is in valid memory Date: Thu, 27 Oct 2022 19:50:06 +0200 Message-ID: <10171725.nUPlyArG6x@kreacher> In-Reply-To: <4756726.GXAFRqVoOG@kreacher> References: <4756726.GXAFRqVoOG@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.45 X-CLIENT-HOSTNAME: 213.134.169.45 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeiledrgeehnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeiledrgeehpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1747864678969367257?= X-GMAIL-MSGID: =?utf-8?q?1747864678969367257?= From: Vit Kabele ACPICA commit cc9e7763ceb2e2649fe3422130416d84a3c6854a If the memory at 0x40e is uninitialized, the retrieved physical_memory address of EBDA may be beyond the low memory (i.e. above 640K). If so, the kernel may unintentionally access the VGA memory, that might not be decoded or even present in case of virtualization. Link: https://github.com/acpica/acpica/commit/cc9e7763 Signed-off-by: Vit Kabele Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/tbxfroot.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) Index: linux-pm/drivers/acpi/acpica/tbxfroot.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/tbxfroot.c +++ linux-pm/drivers/acpi/acpica/tbxfroot.c @@ -139,7 +139,11 @@ acpi_find_root_pointer(acpi_physical_add /* EBDA present? */ - if (physical_address > 0x400) { + /* + * Check that the EBDA pointer from memory is sane and does not point + * above valid low memory + */ + if (physical_address > 0x400 && physical_address < 0xA0000) { /* * 1b) Search EBDA paragraphs (EBDA is required to be a * minimum of 1K length) From patchwork Thu Oct 27 17:50:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 11902 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp376527wru; Thu, 27 Oct 2022 11:00:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5p25IlpnRU3gattTp8mRJaLEjx50sNJzdweyGtKqQGNrT9d6RpD4kzQYi4Hdp+TplJ1MDQ X-Received: by 2002:a17:907:a068:b0:7ad:956f:f13d with SMTP id ia8-20020a170907a06800b007ad956ff13dmr1963426ejc.643.1666893651531; Thu, 27 Oct 2022 11:00:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666893651; cv=none; d=google.com; s=arc-20160816; b=dS8FWw1IdLvRq8UfUHmvfCYZ+YFyGzSEvQRj/AGFNuG9NkflKsjDC/NDfuwsJFJAC5 YQVZCjyQTuFBXNsj52xOxA/hPfDQ2eZ25pZNtbY12fmMKqu3ImDU0eqSBvaAIB2UFQac YM0ylXz4tBVC0SKFTBgaoIPrrcMXGH5Q4xLZcUxxTzf/VLs8ZW90soBuZnYcR2UURmIl 4WKPvMWeknP2vOshzAiYNQOB95Mrw5R4iDRIT5lsMUAjTvfMiiYGLMNAAY4wRbo1ZNU+ vErahEPSD2cikwd5t7yhiWYSXuBKuNM2CpZw9g/lBPzNXwNoPe0IKRAnrXXbRT295CjR ErUg== 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=yaOhC/XkGsSCC4NKTcHE5SV3sjYTBD/FamF80tCvBnY=; b=n8yU+OIpFmH5mr5DL5486i4bzfquTcqnrhpTyT2Lozte+E/qyuxhiRA6zb9KNYeb2O 2HpVvjvMfPiPxvOZoW/298uTCThNZ1xbmgtT0ltXqXOls26gB8BTlGhEpElb3wWJMZJv rOF2dEjOcNljslbu+rOJ9Ay3h+/oIUtcGw0DpA6LJtHGnZ1p/fDTMqxu/XMj5aHWJ5p6 Azl+LxzbUl4+iCcg+m40dLeUgQIIxYTGpIWcHnpkqm1EDSL/Vn3622Ef1Htzk31cH+GF +MjuCm1HZX3KvqSB9jZEyJwyjybCQt3nhMRQyaoHcQtriAqTA5tt60zUmONiGxCi54li 5mYA== 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 v9-20020a1709062f0900b0073ce34d1a13si570219eji.499.2022.10.27.11.00.26; Thu, 27 Oct 2022 11:00:51 -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 S236021AbiJ0SAA (ORCPT + 99 others); Thu, 27 Oct 2022 14:00:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236019AbiJ0R7Z (ORCPT ); Thu, 27 Oct 2022 13:59:25 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7568B17F9BB; Thu, 27 Oct 2022 10:59:16 -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.0.0) id fe07034ed0e76a0e; Thu, 27 Oct 2022 19:59:14 +0200 Received: from kreacher.localnet (unknown [213.134.169.45]) (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 70A4766D83E; Thu, 27 Oct 2022 19:59:13 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 04/11] ACPICA: Do not touch VGA memory when EBDA < 1ki_b Date: Thu, 27 Oct 2022 19:50:59 +0200 Message-ID: <1914944.PYKUYFuaPT@kreacher> In-Reply-To: <4756726.GXAFRqVoOG@kreacher> References: <4756726.GXAFRqVoOG@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.45 X-CLIENT-HOSTNAME: 213.134.169.45 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeiledrgeehnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeiledrgeehpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1747864677758701037?= X-GMAIL-MSGID: =?utf-8?q?1747864677758701037?= From: Vit Kabele ACPICA commit a36eda9631e84f271319c41288889dd5b1329369 The ACPICA code assumes that EBDA region must be at least 1ki_b in size. Because this is not guaranteed, it might happen that while scanning the memory for RSDP pointer, the kernel touches memory above 640ki_b. This is unwanted as the VGA memory range may not be decoded or even present when running under virtualization. Link: https://github.com/acpica/acpica/commit/a36eda96 Signed-off-by: Vit Kabele Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/tbxfroot.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) Index: linux-pm/drivers/acpi/acpica/tbxfroot.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/tbxfroot.c +++ linux-pm/drivers/acpi/acpica/tbxfroot.c @@ -114,6 +114,7 @@ acpi_find_root_pointer(acpi_physical_add u8 *table_ptr; u8 *mem_rover; u32 physical_address; + u32 ebda_window_size; ACPI_FUNCTION_TRACE(acpi_find_root_pointer); @@ -145,24 +146,31 @@ acpi_find_root_pointer(acpi_physical_add */ if (physical_address > 0x400 && physical_address < 0xA0000) { /* - * 1b) Search EBDA paragraphs (EBDA is required to be a - * minimum of 1K length) + * Calculate the scan window size + * The EBDA is not guaranteed to be larger than a ki_b and in case + * that it is smaller, the scanning function would leave the low + * memory and continue to the VGA range. + */ + ebda_window_size = ACPI_MIN(ACPI_EBDA_WINDOW_SIZE, + 0xA0000 - physical_address); + + /* + * 1b) Search EBDA paragraphs */ table_ptr = acpi_os_map_memory((acpi_physical_address) physical_address, - ACPI_EBDA_WINDOW_SIZE); + ebda_window_size); if (!table_ptr) { ACPI_ERROR((AE_INFO, "Could not map memory at 0x%8.8X for length %u", - physical_address, ACPI_EBDA_WINDOW_SIZE)); + physical_address, ebda_window_size)); return_ACPI_STATUS(AE_NO_MEMORY); } mem_rover = - acpi_tb_scan_memory_for_rsdp(table_ptr, - ACPI_EBDA_WINDOW_SIZE); - acpi_os_unmap_memory(table_ptr, ACPI_EBDA_WINDOW_SIZE); + acpi_tb_scan_memory_for_rsdp(table_ptr, ebda_window_size); + acpi_os_unmap_memory(table_ptr, ebda_window_size); if (mem_rover) { From patchwork Thu Oct 27 17:51:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 11901 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp376398wru; Thu, 27 Oct 2022 11:00:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6yc0B3bAX8H2Q2FS+T0qQnPxJgBbOglUmTiUoJbRWGAGAW/w5yaVl2Id5c1FW9LDInnAZv X-Received: by 2002:a62:584:0:b0:55a:a7a5:b597 with SMTP id 126-20020a620584000000b0055aa7a5b597mr50767869pff.71.1666893637924; Thu, 27 Oct 2022 11:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666893637; cv=none; d=google.com; s=arc-20160816; b=BJsW+xrgVNflDJkgmM7N6ePTnoPUQtuYay2IV2W1j04u9A6mwA526o/B96+Ef/Jcva On/AMR9S2IIYemy+UjkGzyi/k2LM0WB83g8WkOPiVzMejyi0BOPRitDIhJu+df+TmE7D HuNbp3YWVHKFivuAgfMe8q8PgZd7JpLty5g74R1Yi+YoIqNZax0aBIyfYkYGnk8gBtYE tEQD9mHhrXazhFbd8iBf0Y9cFhS1CkBlfK9ZJeCZ23+pNKYrZ6+3X8j4/O7jEdOkATYy /rDj/e3N3bKZLM0iCS5/Nhip/hOEHVecN2taksF42LIQkcpyz7P3s+i6UVMkoC9ejSB2 OEPQ== 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=jv954UMg022Y515z1ejFrEs3JwytoHIu9r2m7m3DS0A=; b=aonu0aY5wWyPa2Np2X0S39T9HfcCJbEdr96cQWlYk+fAkXLCD1Pa+Cc7XfB7F8xG5+ O34WQkN+MsX8dEOylaLUkfR+n4WFKlq6FGu7bbMacQzNHRGf3PoQCAdY5KK4qpR1qn+A lfxGg4v2BrLwBKP7j+8RrD2DvLxQldubo5bW9uBoBJmFMEKF01Z1ktWFp/G9JkFMi21O bqiLU/tud8lUK/vdqq6OnUrVGUlACOChzxtH+2qAwauCeHNUJ3BBCV5dy5uMQfs88Ece BnCloErjS5X0NaJNu4E5wD8+kLeMbT3mBLPy/xIeCPf9x32SfW5rhtOLCPzRiybofhMK TCMg== 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 i195-20020a6287cc000000b005251a2f06bbsi2484693pfe.59.2022.10.27.11.00.24; Thu, 27 Oct 2022 11:00:37 -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 S236132AbiJ0R7l (ORCPT + 99 others); Thu, 27 Oct 2022 13:59:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235988AbiJ0R7X (ORCPT ); Thu, 27 Oct 2022 13:59:23 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C99B17D2B8; Thu, 27 Oct 2022 10:59:14 -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.0.0) id eba0afe75c2e45be; Thu, 27 Oct 2022 19:59:12 +0200 Received: from kreacher.localnet (unknown [213.134.169.45]) (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 4D35066D838; Thu, 27 Oct 2022 19:59:11 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 05/11] ACPICA: iASL: Add CCEL table to both compiler/disassembler Date: Thu, 27 Oct 2022 19:51:51 +0200 Message-ID: <7449231.EvYhyI6sBW@kreacher> In-Reply-To: <4756726.GXAFRqVoOG@kreacher> References: <4756726.GXAFRqVoOG@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.45 X-CLIENT-HOSTNAME: 213.134.169.45 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeiledrgeehnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeiledrgeehpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1747864663268380928?= X-GMAIL-MSGID: =?utf-8?q?1747864663268380928?= From: Kuppuswamy Sathyanarayanan ACPICA commit 10e4763f155eac0c60295a7e364b0316fc52c4f1 Link: https://github.com/acpica/acpica/commit/10e4763f Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) Index: linux-pm/include/acpi/actbl2.h =================================================================== --- linux-pm.orig/include/acpi/actbl2.h +++ linux-pm/include/acpi/actbl2.h @@ -27,6 +27,7 @@ #define ACPI_SIG_AGDI "AGDI" /* Arm Generic Diagnostic Dump and Reset Device Interface */ #define ACPI_SIG_APMT "APMT" /* Arm Performance Monitoring Unit table */ #define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */ +#define ACPI_SIG_CCEL "CCEL" /* CC Event Log Table */ #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */ #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ @@ -353,6 +354,23 @@ struct acpi_table_bdat { }; /******************************************************************************* + * + * CCEL - CC-Event Log + * From: "Guest-Host-Communication Interface (GHCI) for Intel + * Trust Domain Extensions (Intel TDX)". Feb 2022 + * + ******************************************************************************/ + +struct acpi_table_ccel { + struct acpi_table_header header; /* Common ACPI table header */ + u8 CCtype; + u8 Ccsub_type; + u16 reserved; + u64 log_area_minimum_length; + u64 log_area_start_address; +}; + +/******************************************************************************* * * IORT - IO Remapping Table * From patchwork Thu Oct 27 17:52:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 11900 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp376300wru; Thu, 27 Oct 2022 11:00:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7xHto4JEfUTxoa8UyW0UaTHI+moTLS17v9UZ00VDy6RAGbhbsG3F0nF+oY2ZweZVhv3+3S X-Received: by 2002:a17:90b:3103:b0:213:2578:e5c5 with SMTP id gc3-20020a17090b310300b002132578e5c5mr11265310pjb.217.1666893627681; Thu, 27 Oct 2022 11:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666893627; cv=none; d=google.com; s=arc-20160816; b=H8vZHExL7TyIrPJW1AbPIYAgrDbFXT372tk8gTLaJtu9le98j/xzFvvRdpk3bLyLWG 8gnyFzwAJsVdKl2k/WXCzOMiklWY2x9GnHg+i9KHUusMPxy7v5gaYUJk6YSKXcBy8koe WzHP1cRfLYaZv9cra+1omMHaoF8Q6laReKsRpI7Nd815iUfX/t5oWriqf/KEZt/hfhXH rBIm+LCItUJzP3uVpi8c9dDzUt3goJ5me4mqRnKuNPpTupq4ZVtk13aTqBnx1DkStPKS +2bOWpX2KsFhDKIdbcXa3Q4vzGTCxD+T9i/EvSxX0bwI1pq1m0CjZVhFVf5DHdgH2pwJ XP/w== 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=JYQClAL/tJtODYc11tLw4YWKTTLchh8p4lLYDmL14Wk=; b=R/EUx2BBYPnTHYIXecoreor70UF1/5tK7MW8oGWqr9G6jpZupR8BO0aUY51yIbmL67 cSJGYCnYKbhQ3oTS3kpS6o5VygF9XZ8kQ+pLLwgk7hIDFpkfEL/RWAWRAMxBF0ntZfi1 k0OByUkuS5clneZSXIkkd9+YzfAnWjTJ7sTHetSilaHJg9NXw1zgMcFALhV5RuwzwBKv IfjShycfBH0xtKWntW4ikFFrdBB4y/EiiwIiC5xdu4cdNodLLrqq5VdXgFIpexU9sZh2 1fv1rWsOfGHUgail8yGKzde9wQdZppNvsOza1HFGxU7xecIxSmqG2k5IDHwvTNHWYqxw l9tw== 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 j9-20020a170903024900b00172696f35e1si2491514plh.482.2022.10.27.11.00.14; Thu, 27 Oct 2022 11:00:27 -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 S236103AbiJ0R7i (ORCPT + 99 others); Thu, 27 Oct 2022 13:59:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235772AbiJ0R7X (ORCPT ); Thu, 27 Oct 2022 13:59:23 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A488917D842; Thu, 27 Oct 2022 10:59:12 -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.0.0) id 6cecded12db46b24; Thu, 27 Oct 2022 19:59:10 +0200 Received: from kreacher.localnet (unknown [213.134.169.45]) (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 E604B66D838; Thu, 27 Oct 2022 19:59:09 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 06/11] ACPICA: Add a couple of new UUIDs to the known UUID list Date: Thu, 27 Oct 2022 19:52:50 +0200 Message-ID: <3466028.iIbC2pHGDl@kreacher> In-Reply-To: <4756726.GXAFRqVoOG@kreacher> References: <4756726.GXAFRqVoOG@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.45 X-CLIENT-HOSTNAME: 213.134.169.45 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeiledrgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeiledrgeehpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1747864652769030616?= X-GMAIL-MSGID: =?utf-8?q?1747864652769030616?= From: Bob Moore ACPICA commit 2176a750230d5e81b4bedf24ef296da0cd0d7bb3 Link: https://github.com/acpica/acpica/commit/2176a750 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/acuuid.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-pm/include/acpi/acuuid.h =================================================================== --- linux-pm.orig/include/acpi/acuuid.h +++ linux-pm/include/acpi/acuuid.h @@ -69,5 +69,6 @@ #define UUID_HIERARCHICAL_DATA_EXTENSION "dbb8e3e6-5886-4ba6-8795-1319f52a966b" #define UUID_CORESIGHT_GRAPH "3ecbc8b6-1d0e-4fb3-8107-e627f805c6cd" #define UUID_USB4_CAPABILITIES "23a0d13a-26ab-486c-9c5f-0ffa525a575a" - +#define UUID_1ST_FUNCTION_ID "893f00a6-660c-494e-bcfd-3043f4fb67c0" +#define UUID_2ND_FUNCTION_ID "107ededd-d381-4fd7-8da9-08e9a6c79644" #endif /* __ACUUID_H__ */ From patchwork Thu Oct 27 17:54:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 11898 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp376206wru; Thu, 27 Oct 2022 11:00:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6JDdJtWyryDOr1GGpKFlXsS+Ep+5lbh1vinQUHVUHp3JESbvxE+99l6p9STq7a7zqCg8Ha X-Received: by 2002:a17:90b:3a8b:b0:20d:b254:e30e with SMTP id om11-20020a17090b3a8b00b0020db254e30emr11721412pjb.206.1666893618553; Thu, 27 Oct 2022 11:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666893618; cv=none; d=google.com; s=arc-20160816; b=DwRW3bPArkW5Dw2JfReAfRVjm4pu04SIaRwe8IVqdDcmJedrBrXlzkqmYassVmTqYw 2zN0k22G1XD1H3nv5ksyeWxvHxRJ3Qd3OnTphBHdgO2BALQ0RlfPDDro7E49Ugy5Ie3I hh9Z/6NNaYCMrJOvRdVABWRtnwIOAod39zuPeeQ5FKIjP8vM3zSNsExGj1CYQ+QrB03l VDe9591DfHi2LapXmS6ba6DZ1YoZXxQWvVkujDcsIdt/FuJRwl1u707nWmUwEHm3S61T MWt150gm6226Urs3JitM7LxwIM6u6jAayYoIXublITQapt08LFIDbxYb9SedKu6eq2tu P7IA== 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=Mv6h09A2ESQJPbAYqHH57aqQYrQnxY/i8ySArRLMr/c=; b=RSLMet92m7IuEJs+e6NoWgIH146SogpRi4I9mSvhioAbFt+b/7G5hFzfYc6FkJBOtY TRs5hofLK3Gfca4NJXNxhD271fQ5oZ5xyPb6BSLTss1yPlZiHF0G/JiWi6wxUH7Ai0x7 zzK5d3zYiXuOot5ovayM8yy9K/yk71aSowii0DLRGeEcZJWlXH4iVfatATSddP5/kvz/ OktvenA4UVD39gV7l6yQ96CdvfqPaJc5yFFrm4E4xDjuL60KIrzrX6Esajd1L/lypqeW kcXQlHNuYROZsQu7RC4MSOn5XXNtGcnYK5jWUSWRsN8svyjDC9XsovoX7Iwy04HVcQM6 2Pow== 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 d10-20020a056a00244a00b0056baaf0d767si2700048pfj.337.2022.10.27.11.00.04; Thu, 27 Oct 2022 11:00:18 -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 S236074AbiJ0R7c (ORCPT + 99 others); Thu, 27 Oct 2022 13:59:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235783AbiJ0R7M (ORCPT ); Thu, 27 Oct 2022 13:59:12 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44CFC17D29B; Thu, 27 Oct 2022 10:59:11 -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.0.0) id 1adc8de0c868de06; Thu, 27 Oct 2022 19:59:09 +0200 Received: from kreacher.localnet (unknown [213.134.169.45]) (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 84ED566D838; Thu, 27 Oct 2022 19:59:08 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 07/11] ACPICA: Add support for FFH Opregion special context data Date: Thu, 27 Oct 2022 19:54:32 +0200 Message-ID: <3135123.5fSG56mABF@kreacher> In-Reply-To: <4756726.GXAFRqVoOG@kreacher> References: <4756726.GXAFRqVoOG@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.45 X-CLIENT-HOSTNAME: 213.134.169.45 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepueetieelhfeufefgffetiefhudduveejfefhjeefvdelueehkeeltddttedvuedvnecuffhomhgrihhnpehtihgrnhhotghorhgvrdhorhhgpdhgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeiledrgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeiledrgeehpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1747864642978539683?= X-GMAIL-MSGID: =?utf-8?q?1747864642978539683?= From: Sudeep Holla ACPICA commit fad527b6e76babc7527c41325bfbef6bd1a1132b FFH(Fixed Function Hardware) Opregion is approved to be added in ACPI 6.5 via code first approach [1]. It requires special context data similar to GPIO and Generic Serial Bus as it needs to know platform specific offset and length. Add support for the special context data needed by FFH Opregion. FFH op_region enables advanced use of FFH on some architectures. For example, it could be used to easily proxy AML code to architecture-specific behavior (to ensure it is OS initiated) Actual behavior of FFH is ofcourse architecture specific and depends on the FFH bindings. The offset and length could have arch specific meaning or usage. Link: https://bugzilla.tianocore.org/show_bug.cgi?id=3598 # [1] Link: https://github.com/acpica/acpica/commit/fad527b6 Signed-off-by: Sudeep Holla Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/evregion.c | 9 +++++++++ drivers/acpi/acpica/exfield.c | 8 ++++++-- drivers/acpi/acpica/exserial.c | 6 ++++++ include/acpi/acconfig.h | 2 ++ include/acpi/actypes.h | 7 +++++++ 5 files changed, 30 insertions(+), 2 deletions(-) Index: linux-pm/drivers/acpi/acpica/evregion.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/evregion.c +++ linux-pm/drivers/acpi/acpica/evregion.c @@ -172,6 +172,15 @@ acpi_ev_address_space_dispatch(union acp ctx->subspace_id = (u8)region_obj->region.address; } + if (region_obj->region.space_id == + ACPI_ADR_SPACE_FIXED_HARDWARE) { + struct acpi_ffh_info *ctx = + handler_desc->address_space.context; + + ctx->length = region_obj->region.length; + ctx->offset = region_obj->region.address; + } + /* * We must exit the interpreter because the region setup will * potentially execute control methods (for example, the _REG method Index: linux-pm/drivers/acpi/acpica/exfield.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/exfield.c +++ linux-pm/drivers/acpi/acpica/exfield.c @@ -141,7 +141,9 @@ acpi_ex_read_data_from_field(struct acpi || obj_desc->field.region_obj->region.space_id == ACPI_ADR_SPACE_IPMI || obj_desc->field.region_obj->region.space_id == - ACPI_ADR_SPACE_PLATFORM_RT)) { + ACPI_ADR_SPACE_PLATFORM_RT + || obj_desc->field.region_obj->region.space_id == + ACPI_ADR_SPACE_FIXED_HARDWARE)) { /* SMBus, GSBus, IPMI serial */ @@ -305,7 +307,9 @@ acpi_ex_write_data_to_field(union acpi_o || obj_desc->field.region_obj->region.space_id == ACPI_ADR_SPACE_IPMI || obj_desc->field.region_obj->region.space_id == - ACPI_ADR_SPACE_PLATFORM_RT)) { + ACPI_ADR_SPACE_PLATFORM_RT + || obj_desc->field.region_obj->region.space_id == + ACPI_ADR_SPACE_FIXED_HARDWARE)) { /* SMBus, GSBus, IPMI serial */ Index: linux-pm/drivers/acpi/acpica/exserial.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/exserial.c +++ linux-pm/drivers/acpi/acpica/exserial.c @@ -323,6 +323,12 @@ acpi_ex_write_serial_bus(union acpi_oper function = ACPI_WRITE; break; + case ACPI_ADR_SPACE_FIXED_HARDWARE: + + buffer_length = ACPI_FFH_INPUT_BUFFER_SIZE; + function = ACPI_WRITE; + break; + default: return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID); } Index: linux-pm/include/acpi/acconfig.h =================================================================== --- linux-pm.orig/include/acpi/acconfig.h +++ linux-pm/include/acpi/acconfig.h @@ -190,6 +190,8 @@ #define ACPI_PRM_INPUT_BUFFER_SIZE 26 +#define ACPI_FFH_INPUT_BUFFER_SIZE 256 + /* _sx_d and _sx_w control methods */ #define ACPI_NUM_sx_d_METHODS 4 Index: linux-pm/include/acpi/actypes.h =================================================================== --- linux-pm.orig/include/acpi/actypes.h +++ linux-pm/include/acpi/actypes.h @@ -1116,6 +1116,13 @@ struct acpi_pcc_info { u8 *internal_buffer; }; +/* Special Context data for FFH Opregion (ACPI 6.5) */ + +struct acpi_ffh_info { + u64 offset; + u64 length; +}; + typedef acpi_status (*acpi_adr_space_setup) (acpi_handle region_handle, u32 function, From patchwork Thu Oct 27 17:55:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 11897 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp376149wru; Thu, 27 Oct 2022 11:00:12 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4cF/0Z2mad21kZL1l6i5MOSgcMfNTs7WrchSWcKIqYq0qraa7dtxc/ZFoaSUkuYGLfcNjs X-Received: by 2002:a17:902:b093:b0:185:4aa1:402c with SMTP id p19-20020a170902b09300b001854aa1402cmr51332509plr.92.1666893612707; Thu, 27 Oct 2022 11:00:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666893612; cv=none; d=google.com; s=arc-20160816; b=IJptODDz8sICGRTd1WbmgGC2Z+HkzRmZ1AtCLQQRGUQQrrtQ10DyWwSH+CygMTB990 CNsL82nMaydl0gsz8n/0zowWLCmh8bI04XuhkR6cFqA6kKhvCgEVibuHzCSgl68e8V2e GfEJuU3GhsM6fWugCNv4TzqWOuBl39/PjfpUB2rTSQKOKzAAeS9regG7vSeTkVzbcss8 QL4frMkthlvcYBe2TvOGuQ/MUxP2Yd3sdsYLqSiXtKVvibN7kdokiCDOnENfRf9M9Im/ aL0/mp0B2JF6AuI6qWPtqxt09B71BYi3CDwECThVi5ZUVywrTozilM6PCrL5fH5OrUsE g1dg== 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=UlZTKtb26pCIxIjVMVh1QloeV0RRMBNT9vL1etxyV94=; b=I7sUjYlLjxgGg4vaST5qllXB6dKYUL4mob4nGVAK0i/4fXJlWGyaOZXaZLLxqAw3F6 2KKo0jdyGaFSwbL7HBjdObTwIfqVCv+tZyDWjOhfFvrANd+o5Rjo2xZE0n7hoXcFBP+N 9EtNGD28wHKv2lnWxLh4q9xcQGFY2hxoVifpTbklxjAESJ1SlmrcsAWKUzhRQ+t5vAp5 70TM/FY9Bt7a6GEaUrwefjkrIbOByjUxjmtwUGb1d2Ua3brpJppGnrSgt73BeQXsLdKW W1EjyLU2inCSW3i6TXIFKSN1xLdG0Upwv8IOiQOuI2LOE70DJAUXizd5TX5Y3YN+8ZYa fQbQ== 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 z23-20020a63e117000000b00454a7fa276asi2469269pgh.181.2022.10.27.10.59.59; Thu, 27 Oct 2022 11:00:12 -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 S235987AbiJ0R73 (ORCPT + 99 others); Thu, 27 Oct 2022 13:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235926AbiJ0R7L (ORCPT ); Thu, 27 Oct 2022 13:59:11 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0965F1781D8; Thu, 27 Oct 2022 10:59:09 -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.0.0) id b6fae047edd6fe09; Thu, 27 Oct 2022 19:59:07 +0200 Received: from kreacher.localnet (unknown [213.134.169.45]) (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 4761F66D838; Thu, 27 Oct 2022 19:59:07 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 08/11] ACPICA: Improve warning message for "invalid ACPI name" Date: Thu, 27 Oct 2022 19:55:26 +0200 Message-ID: <1745901.VLH7GnMWUR@kreacher> In-Reply-To: <4756726.GXAFRqVoOG@kreacher> References: <4756726.GXAFRqVoOG@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.45 X-CLIENT-HOSTNAME: 213.134.169.45 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeiledrgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeiledrgeehpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1747864636710110050?= X-GMAIL-MSGID: =?utf-8?q?1747864636710110050?= From: Bob Moore ACPICA commit 91bef8bea9cd69c33447ba1bfe2c4273994500fd Added an underscore instead of an (illegal) * Link: https://github.com/acpica/acpica/commit/91bef8be Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/utstring.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Index: linux-pm/drivers/acpi/acpica/utstring.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/utstring.c +++ linux-pm/drivers/acpi/acpica/utstring.c @@ -145,7 +145,7 @@ void acpi_ut_repair_name(char *name) return; } - ACPI_COPY_NAMESEG(&original_name, name); + ACPI_COPY_NAMESEG(&original_name, &name[0]); /* Check each character in the name */ @@ -156,10 +156,10 @@ void acpi_ut_repair_name(char *name) /* * Replace a bad character with something printable, yet technically - * still invalid. This prevents any collisions with existing "good" + * "odd". This prevents any collisions with existing "good" * names in the namespace. */ - name[i] = '*'; + name[i] = '_'; found_bad_char = TRUE; } @@ -169,8 +169,8 @@ void acpi_ut_repair_name(char *name) if (!acpi_gbl_enable_interpreter_slack) { ACPI_WARNING((AE_INFO, - "Invalid character(s) in name (0x%.8X), repaired: [%4.4s]", - original_name, name)); + "Invalid character(s) in name (0x%.8X) %p, repaired: [%4.4s]", + original_name, name, &name[0])); } else { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Invalid character(s) in name (0x%.8X), repaired: [%4.4s]", From patchwork Thu Oct 27 17:56:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 11899 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp376262wru; Thu, 27 Oct 2022 11:00:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4nqNKF7pVR6QWuJKgnx1GY8fmZq6aWh3JDFfgLEmXFg0KHzGjO6xHs7kKFvsaswo7ScIio X-Received: by 2002:a17:90b:1c10:b0:213:1bb8:feb with SMTP id oc16-20020a17090b1c1000b002131bb80febmr11295136pjb.214.1666893624209; Thu, 27 Oct 2022 11:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666893624; cv=none; d=google.com; s=arc-20160816; b=ihPKPhFmBjJe/xlgqCOfN14T7om0WqGAJsWLZEUloiMqLAgOGNdFMAVCTZc3hVTYpu Agjsb5GetzComARadfQxsgu5Jff63RKNfhzME2mEqTSBkrf8U5zbPnvQhkksjA9dtyuD CyAI9S0+jmeD4vgjysZujDTbIUUzKIu56soJ6ei/DdoSLKnMsHm3Ukwm+6Blw+SvSH1A OR/NBqcVVP47YAswrmWYTkQ0KTILY5uxGHR4qkA2Fqw8Hq/yKNqkUlLde3HUwhEaVpFf IPJS5IunH8+GE0P4cH7OimN7qu6OOoWijHBVZC2AQUdiA1YYw0Wy5RWZSwVa9jVmB9k/ CuSg== 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=+lNEqa6E673a2EQpkwb7r0l92EyursOwtX1cbioJiqg=; b=vj2rQjMy+EzXOO8MpZCoU4enakNBroXBtLu7SL7Eis1FuhUYwEHZN7kCovYXU0RdJE E3wBan7uGBjxNROU2R+eDvHDSJiVqUsCNKB++uVwuiZ7pYkMpW6enzTYfph41V4hqis4 G/w9v2ZQ2I5mhsGXDsmmjZiO4GogAzxNPvL+008jXq5bpcKshv1jkEIYEjffq11aIoVV X8z16Bmu2wbfl/u+0LPvCxcIaXjiVUmL8vGfnF4fMR0a3c5rCQjAe7roFXGJWx04SqNS t/9QBCDkhxkKT/H5tzT441nfOzQaPY4lC4wyPdypyxG1GrpWso8mkxY44qO5u9A4YuT4 5v0Q== 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 j184-20020a6255c1000000b00537b1bc9683si2263282pfb.36.2022.10.27.11.00.09; Thu, 27 Oct 2022 11:00:24 -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 S235838AbiJ0R7Y (ORCPT + 99 others); Thu, 27 Oct 2022 13:59:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235922AbiJ0R7K (ORCPT ); Thu, 27 Oct 2022 13:59:10 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 846801781C4; Thu, 27 Oct 2022 10:59:08 -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.0.0) id a65cd5e508336162; Thu, 27 Oct 2022 19:59:06 +0200 Received: from kreacher.localnet (unknown [213.134.169.45]) (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 9A07266D838; Thu, 27 Oct 2022 19:59:05 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 09/11] ACPICA: Add CXL 3.0 structures (CXIMS & RDPAS) to the CEDT table Date: Thu, 27 Oct 2022 19:56:50 +0200 Message-ID: <1934788.usQuhbGJ8B@kreacher> In-Reply-To: <4756726.GXAFRqVoOG@kreacher> References: <4756726.GXAFRqVoOG@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.45 X-CLIENT-HOSTNAME: 213.134.169.45 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnheptdehhfelgeevgeeifeevtddtffefieelffekveeltefftdegveekleevleefueevnecuffhomhgrihhnpegtohhmphhuthgvvgigphhrvghsshhlihhnkhdrohhrghdpghhithhhuhgsrdgtohhmnecukfhppedvudefrddufeegrdduieelrdegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieelrdeghedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepfedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehrohgsvghrthdrmhhoohhrvgesihhnthgv lhdrtghomh X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1747864648544493244?= X-GMAIL-MSGID: =?utf-8?q?1747864648544493244?= From: Alison Schofield ACPICA commit 2d8dc0383d3c908389053afbdc329bbd52f009ce The CXL 3.0 Specification [1] adds two new structures to the CXL Early Discovery Table (CEDT). The CEDT may include zero or more entries of these types: CXIMS: CXL XOR Interleave Math Structure Enables the host to find a targets position in an Interleave Target List when XOR Math is used. RDPAS: RCEC Downstream Post Association Structure Enables the host to locate the Downstream Port(s) that report errors to a given Root Complex Event Collector (RCEC). Link: https://www.computeexpresslink.org/spec-landing # [1] Link: https://github.com/acpica/acpica/commit/2d8dc038 Signed-off-by: Alison Schofield Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl1.h | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) Index: linux-pm/include/acpi/actbl1.h =================================================================== --- linux-pm.orig/include/acpi/actbl1.h +++ linux-pm/include/acpi/actbl1.h @@ -329,7 +329,9 @@ struct acpi_cedt_header { enum acpi_cedt_type { ACPI_CEDT_TYPE_CHBS = 0, ACPI_CEDT_TYPE_CFMWS = 1, - ACPI_CEDT_TYPE_RESERVED = 2, + ACPI_CEDT_TYPE_CXIMS = 2, + ACPI_CEDT_TYPE_RDPAS = 3, + ACPI_CEDT_TYPE_RESERVED = 4, }; /* Values for version field above */ @@ -380,6 +382,7 @@ struct acpi_cedt_cfmws_target_element { /* Values for Interleave Arithmetic field above */ #define ACPI_CEDT_CFMWS_ARITHMETIC_MODULO (0) +#define ACPI_CEDT_CFMWS_ARITHMETIC_XOR (1) /* Values for Restrictions field above */ @@ -389,6 +392,36 @@ struct acpi_cedt_cfmws_target_element { #define ACPI_CEDT_CFMWS_RESTRICT_PMEM (1<<3) #define ACPI_CEDT_CFMWS_RESTRICT_FIXED (1<<4) +/* 2: CXL XOR Interleave Math Structure */ + +struct acpi_cedt_cxims { + struct acpi_cedt_header header; + u16 reserved1; + u8 hbig; + u8 nr_xormaps; + u64 xormap_list[]; +}; + +/* 3: CXL RCEC Downstream Port Association Structure */ + +struct acpi_cedt_rdpas { + struct acpi_cedt_header header; + u8 reserved1; + u16 length; + u16 segment; + u16 bdf; + u8 protocol; + u64 address; +}; + +/* Masks for bdf field above */ +#define ACPI_CEDT_RDPAS_BUS_MASK 0xff00 +#define ACPI_CEDT_RDPAS_DEVICE_MASK 0x00f8 +#define ACPI_CEDT_RDPAS_FUNCTION_MASK 0x0007 + +#define ACPI_CEDT_RDPAS_PROTOCOL_IO (0) +#define ACPI_CEDT_RDPAS_PROTOCOL_CACHEMEM (1) + /******************************************************************************* * * CPEP - Corrected Platform Error Polling table (ACPI 4.0) From patchwork Thu Oct 27 17:57:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 11895 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp375938wru; Thu, 27 Oct 2022 10:59:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM67jFJk0qHt5DV1q3lOirecd0Hj3ZuI6pYSrsXaqXuw7BrTE1SpgoxItOQPOnJj5V7XuRK/ X-Received: by 2002:a17:90b:224c:b0:20d:8828:3056 with SMTP id hk12-20020a17090b224c00b0020d88283056mr11791287pjb.136.1666893588229; Thu, 27 Oct 2022 10:59:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666893588; cv=none; d=google.com; s=arc-20160816; b=ME7RKJO5Qtw9OEK8AI18kx71dx2WqkXEGj7FeU0/l0Uz26oeOtNm9KAJXt+L0XqTWV 0h0wndDk2CvtrPuJx8YAfbHqBqw8gh/rSEo+otbnFH4zzQ3h1/tW+KvXRnN7vRo5x3PI GlGZPK3jh9yZyOeKPR0DdFLihNeyrh02VR+r0uvEhPLnHrFYGQ2dUPB69T7JXj3pMRms V/LGOMny+KXkwC+U9lpaG0F+8iyQ9NKTQv4OkwNX+M+fcCmySjIouHO2c58uQyOcVXZm zg6BG03wxBLp4vqTSNKSKpnYtDPMLeq6QAb+9tRjlIDB2f1xfYvCgGuNWnbCvgEMZrZE PRZQ== 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=pSXCCiB2AYmFx2vTMFfNLqVm5XvyV8jrONmQ8ipyPhM=; b=ow65KoLvhihSvrdmuYNDcIV9Uw9Gz+wbv14LzlJWP5CIP0XRhksqphUiICkuAeuWx2 wvfD5/2O8My1DqrxD6ptB6b0ngH3aAeTT6mYC260NjMuk7cPw91PX7JGnoe27ZFD7LVQ X139BG2JsarPVdPaIvqzfUpZaKqOYoteW5Z5IwSuRxq33cJ96/eJ5aS7w4H1F/PqYoTI zIMn8nyD5frkhqgx1WMrtXUOs9fvO06RLkbc09mrnkLp/G8l1XySkPGeSltXthIucfG+ vETrbQs0B6uhYd00ZFa/uOoCWIUXqigUvWKT6FRzZ73sH08gjg/Nwj6PfMOZ8NInx57M rhXg== 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 bg7-20020a056a02010700b0042c3a5b699asi2542657pgb.783.2022.10.27.10.59.35; Thu, 27 Oct 2022 10:59:48 -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 S235894AbiJ0R7J (ORCPT + 99 others); Thu, 27 Oct 2022 13:59:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233548AbiJ0R7I (ORCPT ); Thu, 27 Oct 2022 13:59:08 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3BDF1799AB; Thu, 27 Oct 2022 10:59:06 -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.0.0) id 036444268490c277; Thu, 27 Oct 2022 19:59:04 +0200 Received: from kreacher.localnet (unknown [213.134.169.45]) (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 E90F066D838; Thu, 27 Oct 2022 19:59:03 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 10/11] ACPICA: IORT: Update for revision E.e Date: Thu, 27 Oct 2022 19:57:42 +0200 Message-ID: <1841510.CQOukoFCf9@kreacher> In-Reply-To: <4756726.GXAFRqVoOG@kreacher> References: <4756726.GXAFRqVoOG@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.45 X-CLIENT-HOSTNAME: 213.134.169.45 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeiledrgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeiledrgeehpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1747864611270057354?= X-GMAIL-MSGID: =?utf-8?q?1747864611270057354?= From: Robin Murphy ACPICA commit 54b54732c5fc9e0384bcfd531f3c10d3a7b628b5 The latest IORT update makes one small addition to SMMUv3 nodes to describe MSI support independently of wired GSIV support. Link: https://github.com/acpica/acpica/commit/54b54732 Signed-off-by: Robin Murphy Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- include/acpi/actbl2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-pm/include/acpi/actbl2.h =================================================================== --- linux-pm.orig/include/acpi/actbl2.h +++ linux-pm/include/acpi/actbl2.h @@ -375,7 +375,7 @@ struct acpi_table_ccel { * IORT - IO Remapping Table * * Conforms to "IO Remapping Table System Software on ARM Platforms", - * Document number: ARM DEN 0049E.d, Feb 2022 + * Document number: ARM DEN 0049E.e, Sep 2022 * ******************************************************************************/ @@ -546,6 +546,7 @@ struct acpi_iort_smmu_v3 { #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (3<<1) #define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3) +#define ACPI_IORT_SMMU_V3_DEVICEID_VALID (1<<4) struct acpi_iort_pmcg { u64 page0_base_address; From patchwork Thu Oct 27 17:58:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 11896 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp375978wru; Thu, 27 Oct 2022 10:59:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7PlfYk6A/DOHzkQB21nBTuT7PMi7k4BAFqMLpYKeBllhaNixNfVspE0+QHr+DfgHRQQTRi X-Received: by 2002:a17:902:e790:b0:183:88dd:1d30 with SMTP id cp16-20020a170902e79000b0018388dd1d30mr50901169plb.62.1666893592837; Thu, 27 Oct 2022 10:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666893592; cv=none; d=google.com; s=arc-20160816; b=evCTCz8PdOU4laKNHGRav2EogMasb87pTR89yFGMKqfzJOnborQOX62auArO7+quPE td1kcir297bYhIHoElvJ8A1ADip3zju95ABYzOmQOqJoDFx8Hp8Q5b3UYnjE+0mmJFtB PBcFD2zC3UGfI02Z1YlRg6fYmJ5JKlR3hGW8YMStC9ucF0BcGiPk+youTA472XAtCEZd XUJJYjuTrMWlcFmI+HtjW6Nv2h1t8fW+t3WOgMuvUACb1Eu5xFa3DE5p6IGk9zIM7SVI wIyafz4+zI9WvwFibT24lKo0Cyx7a3u6cmeuRSLU/UpWKIYCd8yc+/GLe31whZInEvUO BRnA== 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=5Fm2d68hQ9LF3suEP0TRxquxUKPJnq7DBO4sBePmSuA=; b=bdAyzB+Ck+IFLmRWfLL7iQaMrO36dqNVjfoO8x3kpxd+YOFCCkYCho3UJj8Nt1wkaJ 5MIWIZ2XT8F1Bz6HOX7/wBPRHyrNjge8bw9QEhXwksBMN989ik98yuOTDo2h8SYkWwWm i6uqbprocTwrfsYHyoH0PQgazqx0YTWRFo9Oe/kmziD6P9DmVECcl1/Wnyi3iyCG8CQq 3yOGytAIXZqJ4vLsNh1QfoJoi7aoSIeYU9dWv6WtWMmucSIGrRimajwVlCqF3DKc7vQj JEwu4IvUJj1vBNWJQ0+h84Ptw1s+u2k/1jPvj1uolGuE4ZqO7LTipSWzwD9UqX8pKQ2z LsbA== 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 w23-20020a63fb57000000b00438b7cb3311si2388720pgj.501.2022.10.27.10.59.39; Thu, 27 Oct 2022 10:59:52 -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 S235798AbiJ0R7M (ORCPT + 99 others); Thu, 27 Oct 2022 13:59:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235700AbiJ0R7I (ORCPT ); Thu, 27 Oct 2022 13:59:08 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E31101781C4; Thu, 27 Oct 2022 10:59:05 -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.0.0) id b1e4d3273bfb39a8; Thu, 27 Oct 2022 19:59:02 +0200 Received: from kreacher.localnet (unknown [213.134.169.45]) (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 1E03066D838; Thu, 27 Oct 2022 19:59:02 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Bob Moore Subject: [PATCH 11/11] ACPICA: Finish support for the CDAT table Date: Thu, 27 Oct 2022 19:58:36 +0200 Message-ID: <2537172.Lt9SDvczpP@kreacher> In-Reply-To: <4756726.GXAFRqVoOG@kreacher> References: <4756726.GXAFRqVoOG@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 213.134.169.45 X-CLIENT-HOSTNAME: 213.134.169.45 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrtdeggdduudejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepledtieekkeekveeikeetgffgteeuteefjeevjeegudelvdduheeiuedvieehieevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepvddufedrudefgedrudeiledrgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvddufedrudefgedrudeiledrgeehpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeefpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhosggvrhhtrdhmohhorhgvsehinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=3 Fuz1=3 Fuz2=3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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?1747864616068213863?= X-GMAIL-MSGID: =?utf-8?q?1747864616068213863?= From: Bob Moore ACPICA commit 8ac4e5116f59d6f9ba2fbeb9ce22ab58237a278f Finish support for the CDAT table, in both the data table compiler and the disassembler. Link: https://github.com/acpica/acpica/commit/8ac4e511 Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/Makefile | 1 drivers/acpi/acpica/acglobal.h | 1 drivers/acpi/acpica/actables.h | 5 drivers/acpi/acpica/acutils.h | 13 ++ drivers/acpi/acpica/tbdata.c | 2 drivers/acpi/acpica/tbfadt.c | 2 drivers/acpi/acpica/tbprint.c | 77 -------------- drivers/acpi/acpica/tbutils.c | 2 drivers/acpi/acpica/tbxfroot.c | 4 drivers/acpi/acpica/utcksum.c | 170 +++++++++++++++++++++++++++++++ include/acpi/actbl1.h | 116 ++++++++++++++++++++- include/acpi/actbl2.h | 2 tools/power/acpi/tools/acpidump/apdump.c | 4 13 files changed, 311 insertions(+), 88 deletions(-) Index: linux-pm/drivers/acpi/acpica/acglobal.h =================================================================== --- linux-pm.orig/drivers/acpi/acpica/acglobal.h +++ linux-pm/drivers/acpi/acpica/acglobal.h @@ -24,6 +24,7 @@ ACPI_GLOBAL(struct acpi_table_list, acpi ACPI_GLOBAL(struct acpi_table_header *, acpi_gbl_DSDT); ACPI_GLOBAL(struct acpi_table_header, acpi_gbl_original_dsdt_header); +ACPI_INIT_GLOBAL(char *, acpi_gbl_CDAT, NULL); ACPI_INIT_GLOBAL(u32, acpi_gbl_dsdt_index, ACPI_INVALID_TABLE_INDEX); ACPI_INIT_GLOBAL(u32, acpi_gbl_facs_index, ACPI_INVALID_TABLE_INDEX); ACPI_INIT_GLOBAL(u32, acpi_gbl_xfacs_index, ACPI_INVALID_TABLE_INDEX); Index: linux-pm/drivers/acpi/acpica/actables.h =================================================================== --- linux-pm.orig/drivers/acpi/acpica/actables.h +++ linux-pm/drivers/acpi/acpica/actables.h @@ -124,11 +124,6 @@ void acpi_tb_print_table_header(acpi_physical_address address, struct acpi_table_header *header); -u8 acpi_tb_checksum(u8 *buffer, u32 length); - -acpi_status -acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length); - void acpi_tb_check_dsdt_header(void); struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index); Index: linux-pm/drivers/acpi/acpica/acutils.h =================================================================== --- linux-pm.orig/drivers/acpi/acpica/acutils.h +++ linux-pm/drivers/acpi/acpica/acutils.h @@ -159,6 +159,19 @@ u8 acpi_ut_valid_name_char(char characte void acpi_ut_check_and_repair_ascii(u8 *name, char *repaired_name, u32 count); /* + * utcksum - Checksum utilities + */ +u8 acpi_ut_generate_checksum(void *table, u32 length, u8 original_checksum); + +u8 acpi_ut_checksum(u8 *buffer, u32 length); + +acpi_status +acpi_ut_verify_cdat_checksum(struct acpi_table_cdat *cdat_table, u32 length); + +acpi_status +acpi_ut_verify_checksum(struct acpi_table_header *table, u32 length); + +/* * utnonansi - Non-ANSI C library functions */ void acpi_ut_strupr(char *src_string); Index: linux-pm/drivers/acpi/acpica/tbdata.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/tbdata.c +++ linux-pm/drivers/acpi/acpica/tbdata.c @@ -522,7 +522,7 @@ acpi_tb_verify_temp_table(struct acpi_ta /* Verify the checksum */ status = - acpi_tb_verify_checksum(table_desc->pointer, + acpi_ut_verify_checksum(table_desc->pointer, table_desc->length); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY, Index: linux-pm/drivers/acpi/acpica/tbfadt.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/tbfadt.c +++ linux-pm/drivers/acpi/acpica/tbfadt.c @@ -298,7 +298,7 @@ void acpi_tb_parse_fadt(void) * Validate the FADT checksum before we copy the table. Ignore * checksum error as we want to try to get the DSDT and FACS. */ - (void)acpi_tb_verify_checksum(table, length); + (void)acpi_ut_verify_checksum(table, length); /* Create a local copy of the FADT in common ACPI 2.0+ format */ Index: linux-pm/drivers/acpi/acpica/tbprint.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/tbprint.c +++ linux-pm/drivers/acpi/acpica/tbprint.c @@ -10,6 +10,7 @@ #include #include "accommon.h" #include "actables.h" +#include "acutils.h" #define _COMPONENT ACPI_TABLES ACPI_MODULE_NAME("tbprint") @@ -39,7 +40,7 @@ static void acpi_tb_fix_string(char *str { while (length && *string) { - if (!isprint((int)*string)) { + if (!isprint((int)(u8)*string)) { *string = '?'; } @@ -135,77 +136,3 @@ acpi_tb_print_table_header(acpi_physical local_header.asl_compiler_revision)); } } - -/******************************************************************************* - * - * FUNCTION: acpi_tb_validate_checksum - * - * PARAMETERS: table - ACPI table to verify - * length - Length of entire table - * - * RETURN: Status - * - * DESCRIPTION: Verifies that the table checksums to zero. Optionally returns - * exception on bad checksum. - * - ******************************************************************************/ - -acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length) -{ - u8 checksum; - - /* - * FACS/S3PT: - * They are the odd tables, have no standard ACPI header and no checksum - */ - - if (ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_S3PT) || - ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_FACS)) { - return (AE_OK); - } - - /* Compute the checksum on the table */ - - checksum = acpi_tb_checksum(ACPI_CAST_PTR(u8, table), length); - - /* Checksum ok? (should be zero) */ - - if (checksum) { - ACPI_BIOS_WARNING((AE_INFO, - "Incorrect checksum in table [%4.4s] - 0x%2.2X, " - "should be 0x%2.2X", - table->signature, table->checksum, - (u8)(table->checksum - checksum))); - -#if (ACPI_CHECKSUM_ABORT) - return (AE_BAD_CHECKSUM); -#endif - } - - return (AE_OK); -} - -/******************************************************************************* - * - * FUNCTION: acpi_tb_checksum - * - * PARAMETERS: buffer - Pointer to memory region to be checked - * length - Length of this memory region - * - * RETURN: Checksum (u8) - * - * DESCRIPTION: Calculates circular checksum of memory region. - * - ******************************************************************************/ - -u8 acpi_tb_checksum(u8 *buffer, u32 length) -{ - u8 sum = 0; - u8 *end = buffer + length; - - while (buffer < end) { - sum = (u8)(sum + *(buffer++)); - } - - return (sum); -} Index: linux-pm/drivers/acpi/acpica/tbutils.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/tbutils.c +++ linux-pm/drivers/acpi/acpica/tbutils.c @@ -299,7 +299,7 @@ acpi_tb_parse_root_table(acpi_physical_a /* Validate the root table checksum */ - status = acpi_tb_verify_checksum(table, length); + status = acpi_ut_verify_checksum(table, length); if (ACPI_FAILURE(status)) { acpi_os_unmap_memory(table, length); return_ACPI_STATUS(status); Index: linux-pm/drivers/acpi/acpica/tbxfroot.c =================================================================== --- linux-pm.orig/drivers/acpi/acpica/tbxfroot.c +++ linux-pm/drivers/acpi/acpica/tbxfroot.c @@ -74,14 +74,14 @@ acpi_status acpi_tb_validate_rsdp(struct /* Check the standard checksum */ - if (acpi_tb_checksum((u8 *) rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0) { + if (acpi_ut_checksum((u8 *)rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0) { return (AE_BAD_CHECKSUM); } /* Check extended checksum if table version >= 2 */ if ((rsdp->revision >= 2) && - (acpi_tb_checksum((u8 *) rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0)) { + (acpi_ut_checksum((u8 *)rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0)) { return (AE_BAD_CHECKSUM); } Index: linux-pm/drivers/acpi/acpica/utcksum.c =================================================================== --- /dev/null +++ linux-pm/drivers/acpi/acpica/utcksum.c @@ -0,0 +1,170 @@ +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 +/****************************************************************************** + * + * Module Name: utcksum - Support generating table checksums + * + * Copyright (C) 2000 - 2022, Intel Corp. + * + *****************************************************************************/ + +#include +#include "accommon.h" +#include "acutils.h" + +/* This module used for application-level code only */ + +#define _COMPONENT ACPI_CA_DISASSEMBLER +ACPI_MODULE_NAME("utcksum") + +/******************************************************************************* + * + * FUNCTION: acpi_ut_verify_checksum + * + * PARAMETERS: table - ACPI table to verify + * length - Length of entire table + * + * RETURN: Status + * + * DESCRIPTION: Verifies that the table checksums to zero. Optionally returns + * exception on bad checksum. + * Note: We don't have to check for a CDAT here, since CDAT is + * not in the RSDT/XSDT, and the CDAT table is never installed + * via ACPICA. + * + ******************************************************************************/ +acpi_status acpi_ut_verify_checksum(struct acpi_table_header *table, u32 length) +{ + u8 checksum; + + /* + * FACS/S3PT: + * They are the odd tables, have no standard ACPI header and no checksum + */ + if (ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_S3PT) || + ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_FACS)) { + return (AE_OK); + } + + /* Compute the checksum on the table */ + + length = table->length; + checksum = + acpi_ut_generate_checksum(ACPI_CAST_PTR(u8, table), length, + table->checksum); + + /* Computed checksum matches table? */ + + if (checksum != table->checksum) { + ACPI_BIOS_WARNING((AE_INFO, + "Incorrect checksum in table [%4.4s] - 0x%2.2X, " + "should be 0x%2.2X", + table->signature, table->checksum, + table->checksum - checksum)); + +#if (ACPI_CHECKSUM_ABORT) + return (AE_BAD_CHECKSUM); +#endif + } + + return (AE_OK); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_verify_cdat_checksum + * + * PARAMETERS: table - CDAT ACPI table to verify + * length - Length of entire table + * + * RETURN: Status + * + * DESCRIPTION: Verifies that the CDAT table checksums to zero. Optionally + * returns an exception on bad checksum. + * + ******************************************************************************/ + +acpi_status +acpi_ut_verify_cdat_checksum(struct acpi_table_cdat *cdat_table, u32 length) +{ + u8 checksum; + + /* Compute the checksum on the table */ + + checksum = acpi_ut_generate_checksum(ACPI_CAST_PTR(u8, cdat_table), + cdat_table->length, + cdat_table->checksum); + + /* Computed checksum matches table? */ + + if (checksum != cdat_table->checksum) { + ACPI_BIOS_WARNING((AE_INFO, + "Incorrect checksum in table [%4.4s] - 0x%2.2X, " + "should be 0x%2.2X", + acpi_gbl_CDAT, cdat_table->checksum, + checksum)); + +#if (ACPI_CHECKSUM_ABORT) + return (AE_BAD_CHECKSUM); +#endif + } + + cdat_table->checksum = checksum; + return (AE_OK); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_generate_checksum + * + * PARAMETERS: table - Pointer to table to be checksummed + * length - Length of the table + * original_checksum - Value of the checksum field + * + * RETURN: 8 bit checksum of buffer + * + * DESCRIPTION: Computes an 8 bit checksum of the table. + * + ******************************************************************************/ + +u8 acpi_ut_generate_checksum(void *table, u32 length, u8 original_checksum) +{ + u8 checksum; + + /* Sum the entire table as-is */ + + checksum = acpi_ut_checksum((u8 *)table, length); + + /* Subtract off the existing checksum value in the table */ + + checksum = (u8)(checksum - original_checksum); + + /* Compute and return the final checksum */ + + checksum = (u8)(0 - checksum); + return (checksum); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_checksum + * + * PARAMETERS: buffer - Pointer to memory region to be checked + * length - Length of this memory region + * + * RETURN: Checksum (u8) + * + * DESCRIPTION: Calculates circular checksum of memory region. + * + ******************************************************************************/ + +u8 acpi_ut_checksum(u8 *buffer, u32 length) +{ + u8 sum = 0; + u8 *end = buffer + length; + + while (buffer < end) { + sum = (u8)(sum + *(buffer++)); + } + + return (sum); +} Index: linux-pm/include/acpi/actbl1.h =================================================================== --- linux-pm.orig/include/acpi/actbl1.h +++ linux-pm/include/acpi/actbl1.h @@ -45,6 +45,7 @@ #define ACPI_SIG_HMAT "HMAT" /* Heterogeneous Memory Attributes Table */ #define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */ #define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */ +#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */ #define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */ #define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */ @@ -305,10 +306,123 @@ struct acpi_table_boot { /******************************************************************************* * + * CDAT - Coherent Device Attribute Table + * Version 1 + * + * Conforms to the "Coherent Device Attribute Table (CDAT) Specification + " (Revision 1.01, October 2020.) + * + ******************************************************************************/ + +struct acpi_table_cdat { + u32 length; /* Length of table in bytes, including this header */ + u8 revision; /* ACPI Specification minor version number */ + u8 checksum; /* To make sum of entire table == 0 */ + u8 reserved[6]; + u32 sequence; /* Used to detect runtime CDAT table changes */ +}; + +/* CDAT common subtable header */ + +struct acpi_cdat_header { + u8 type; + u8 reserved; + u16 length; +}; + +/* Values for Type field above */ + +enum acpi_cdat_type { + ACPI_CDAT_TYPE_DSMAS = 0, + ACPI_CDAT_TYPE_DSLBIS = 1, + ACPI_CDAT_TYPE_DSMSCIS = 2, + ACPI_CDAT_TYPE_DSIS = 3, + ACPI_CDAT_TYPE_DSEMTS = 4, + ACPI_CDAT_TYPE_SSLBIS = 5, + ACPI_CDAT_TYPE_RESERVED = 6 /* 6 through 0xFF are reserved */ +}; + +/* Subtable 0: Device Scoped Memory Affinity Structure (DSMAS) */ + +struct acpi_cadt_dsmas { + u8 dsmad_handle; + u8 flags; + u16 reserved; + u64 dpa_base_address; + u64 dpa_length; +}; + +/* Flags for subtable above */ + +#define ACPI_CEDT_DSMAS_NON_VOLATILE (1 << 2) + +/* Subtable 1: Device scoped Latency and Bandwidth Information Structure (DSLBIS) */ + +struct acpi_cdat_dslbis { + u8 handle; + u8 flags; /* If Handle matches a DSMAS handle, the definition of this field matches + * Flags field in HMAT System Locality Latency */ + u8 data_type; + u8 reserved; + u64 entry_base_unit; + u16 entry[3]; + u16 reserved2; +}; + +/* Subtable 2: Device Scoped Memory Side Cache Information Structure (DSMSCIS) */ + +struct acpi_cdat_dsmscis { + u8 dsmas_handle; + u8 reserved[3]; + u64 side_cache_size; + u32 cache_attributes; +}; + +/* Subtable 3: Device Scoped Initiator Structure (DSIS) */ + +struct acpi_cdat_dsis { + u8 flags; + u8 handle; + u16 reserved; +}; + +/* Flags for above subtable */ + +#define ACPI_CDAT_DSIS_MEM_ATTACHED (1 << 0) + +/* Subtable 4: Device Scoped EFI Memory Type Structure (DSEMTS) */ + +struct acpi_cdat_dsemts { + u8 dsmas_handle; + u8 memory_type; + u16 reserved; + u64 dpa_offset; + u64 range_length; +}; + +/* Subtable 5: Switch Scoped Latency and Bandwidth Information Structure (SSLBIS) */ + +struct acpi_cdat_sslbis { + u8 data_type; + u8 reserved[3]; + u64 entry_base_unit; +}; + +/* Sub-subtable for above, sslbe_entries field */ + +struct acpi_cdat_sslbe { + u16 portx_id; + u16 porty_id; + u16 latency_or_bandwidth; + u16 reserved; +}; + +/******************************************************************************* + * * CEDT - CXL Early Discovery Table * Version 1 * - * Conforms to the "CXL Early Discovery Table" (CXL 2.0) + * Conforms to the "CXL Early Discovery Table" (CXL 2.0, October 2020) * ******************************************************************************/ Index: linux-pm/include/acpi/actbl2.h =================================================================== --- linux-pm.orig/include/acpi/actbl2.h +++ linux-pm/include/acpi/actbl2.h @@ -28,6 +28,7 @@ #define ACPI_SIG_APMT "APMT" /* Arm Performance Monitoring Unit table */ #define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */ #define ACPI_SIG_CCEL "CCEL" /* CC Event Log Table */ +#define ACPI_SIG_CDAT "CDAT" /* Coherent Device Attribute Table */ #define ACPI_SIG_IORT "IORT" /* IO Remapping Table */ #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ #define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */ @@ -35,7 +36,6 @@ #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ #define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ -#define ACPI_SIG_MSCT "MSCT" /* Maximum System Characteristics Table */ #define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ #define ACPI_SIG_NFIT "NFIT" /* NVDIMM Firmware Interface Table */ #define ACPI_SIG_NHLT "NHLT" /* Non HD Audio Link Table */ Index: linux-pm/tools/power/acpi/tools/acpidump/apdump.c =================================================================== --- linux-pm.orig/tools/power/acpi/tools/acpidump/apdump.c +++ linux-pm/tools/power/acpi/tools/acpidump/apdump.c @@ -78,7 +78,9 @@ u8 ap_is_valid_checksum(struct acpi_tabl rsdp = ACPI_CAST_PTR(struct acpi_table_rsdp, table); status = acpi_tb_validate_rsdp(rsdp); } else { - status = acpi_tb_verify_checksum(table, table->length); + /* We don't have to check for a CDAT here, since CDAT is not in the RSDT/XSDT */ + + status = acpi_ut_verify_checksum(table, table->length); } if (ACPI_FAILURE(status)) { Index: linux-pm/drivers/acpi/acpica/Makefile =================================================================== --- linux-pm.orig/drivers/acpi/acpica/Makefile +++ linux-pm/drivers/acpi/acpica/Makefile @@ -155,6 +155,7 @@ acpi-y += \ utalloc.o \ utascii.o \ utbuffer.o \ + utcksum.o \ utcopy.o \ utexcep.o \ utdebug.o \