From nobody Fri Jul 4 03:22:41 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bYJq573bjz60VR8; Fri, 04 Jul 2025 03:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bYJq54bxgz3VVD; Fri, 04 Jul 2025 03:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751599361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r1gnqhPfDZ8yV2GmeMlqti0hPk0oymd4CTQU0RNIa1M=; b=buCPqghfC3EFBaWNsPALMmb6k45Z6fMzR2xEjZt8qnmAb9BGGmigEvF7D08ZfWZ+PlY5jK NK+xAa2eF/rqVWJoyTK9EEVLO2K9p5aMh5Tx6WPtLL25PCOT67+h4MOXqZR5SRlsuO/4ce nJLyesCyA0ckXduv2fxu5u6APUhmBeI0gLXq82R2cDXbmZpXg0yF1iff3uxa1/XJogx8vp xdw1LNqiPhmRolm2EkTTNIz/aMCt1Pn1slFTC56419corW3yArCMbpyYjfp5XP2ix/tdnn MQFrg+cGSkW9zefjecMD7v1b12Vd/bTuuHAqedadgPWXE9Q05bQPvEge+VsagQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751599361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r1gnqhPfDZ8yV2GmeMlqti0hPk0oymd4CTQU0RNIa1M=; b=okFjWIKD0V6eUVsPXcIz9ZXWfkspNRReQUL5zHn9cf+/DAJJ+7w+UlnA8N0kXOouGZUFVl Yb7QjWI5NQNPCzuocAGuOh4k8ydMwIYXQExSNRj6d7PPxKGH6bWznAhdp70LU+7wstRiMZ gnSpmHHm+m39JLYWYo21zJwZz8/hml5gvQ+QnDiuMuAvUew4Fxw08LHUHsdIJDMyNS9RVC 00FvH37dw8b9FrEcI60V2TKaVwe9mQmnuOPQnZjAncC+PtC6E9o8oMEGeGUHzyxRZKDVzA CKWNsQfCk7u0iz+0hx66Z4cjb0PW0xHXocxvWDStmw4ZmVJypIimDJXV0/drfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751599361; a=rsa-sha256; cv=none; b=V17n45tzwTDslQ8StWH4HsZr8zNKCM/ck0L9tkiojJhAK8ffJWrMR0tlkV7aAgvE6KI5UO LtMaSJNZ2iJl9txnEc3dpNS0o2daCGRVkWnnqMQ8M2OUhVwDNwAt0/AbNS+mgh3aplTKDX RLvsAC5k3DnJRRC5tPm/hoBGLYhGTb52gLpAfHgaIyEJq3fdF6nc5xRa/cGqUdj1K1Z1d6 KvOvBc5JIQswbOs019QuuWRkkiOFe4aNy7FVIemggKarDFG0lwwqkMjMKUhqz9q57y2iVs 4irJvyowjncifh3D5L9B6ITYUiWYl6Vuv81lIF5diMZSAS2eCfZTmjA3qZ4NYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bYJq53qlbzZV5; Fri, 04 Jul 2025 03:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5643Mfdh079702; Fri, 4 Jul 2025 03:22:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5643MfoB079699; Fri, 4 Jul 2025 03:22:41 GMT (envelope-from git) Date: Fri, 4 Jul 2025 03:22:41 GMT Message-Id: <202507040322.5643MfoB079699@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ba6460df5607 - main - LinuxKPI: acpi: add acpi_evaluate_dsm() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ba6460df5607e572e9c868413c75ce9bc5ce9a00 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ba6460df5607e572e9c868413c75ce9bc5ce9a00 commit ba6460df5607e572e9c868413c75ce9bc5ce9a00 Author: Bjoern A. Zeeb AuthorDate: 2025-06-15 10:43:18 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-07-04 03:22:22 +0000 LinuxKPI: acpi: add acpi_evaluate_dsm() Add a acpi_evaluate_dsm() wrapper around the native implementation as needd by wireless drivers. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D50864 --- sys/compat/linuxkpi/common/include/acpi/acpi_bus.h | 6 ++++++ sys/compat/linuxkpi/common/src/linux_acpi.c | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h b/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h index 65bcbe7f1bdd..47195e7d66a6 100644 --- a/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h +++ b/sys/compat/linuxkpi/common/include/acpi/acpi_bus.h @@ -58,4 +58,10 @@ bool lkpi_acpi_dev_present(const char *hid, const char *uid, struct acpi_device *lkpi_acpi_dev_get_first_match_dev(const char *hid, const char *uid, int64_t hrv); +union linuxkpi_acpi_object; + +union linuxkpi_acpi_object * +acpi_evaluate_dsm(ACPI_HANDLE ObjHandle, const guid_t *guid, + UINT64 rev, UINT64 func, union linuxkpi_acpi_object *arg); + #endif /* _LINUXKPI_ACPI_ACPI_BUS_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_acpi.c b/sys/compat/linuxkpi/common/src/linux_acpi.c index 6a9afb3ddff0..d18c69d9210d 100644 --- a/sys/compat/linuxkpi/common/src/linux_acpi.c +++ b/sys/compat/linuxkpi/common/src/linux_acpi.c @@ -39,6 +39,7 @@ #include #include +#include #include #include @@ -99,6 +100,17 @@ acpi_evaluate_dsm_typed(ACPI_HANDLE handle, const char *uuid, int rev, argv4, &buf, type)) ? (ACPI_OBJECT *)buf.Pointer : NULL); } +union linuxkpi_acpi_object * +acpi_evaluate_dsm(ACPI_HANDLE ObjHandle, const guid_t *guid, + UINT64 rev, UINT64 func, union linuxkpi_acpi_object *pkg) +{ + ACPI_BUFFER buf; + + return (ACPI_SUCCESS(acpi_EvaluateDSM(ObjHandle, (const uint8_t *)guid, + rev, func, (ACPI_OBJECT *)pkg, &buf)) ? + (union linuxkpi_acpi_object *)buf.Pointer : NULL); +} + static void linux_handle_power_suspend_event(void *arg __unused) { @@ -323,6 +335,13 @@ acpi_evaluate_dsm_typed(ACPI_HANDLE handle, const char *uuid, int rev, return (NULL); } +union linuxkpi_acpi_object * +acpi_evaluate_dsm(ACPI_HANDLE ObjHandle, const guid_t *guid, + UINT64 rev, UINT64 func, union linuxkpi_acpi_object *pkg) +{ + return (NULL); +} + int register_acpi_notifier(struct notifier_block *nb) {