From patchwork Tue Oct 7 17:05:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 564 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759856830; bh=Dr5GRmEP6rT7iQIWFEN4/6RXJd2F3pqkegxQ/1Fw3kY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Jrtp9ShwOr+FMAZ5xTDjSFqZQHiKY77PkRJXK7jC8RSDuPRijyzJ6hJ8CQlwHpCpz N1vnIP/j3kdhBiBwg7e+UNcjsgW5kVsRMoiRNWASAe6hb2nLgzvA2W2+vgv9VAyx+X daxdoYNkVUn5731rTzA0cCVDbzm7/vbJc4cJkX/XE6atQJBq0E73ChwIZNTi2SL1j1 ywKWhwiAJP1oyiae4z8zvOKFbHcoSG+VPkuhIoOnMraLPCUfbNBgrJltfXGxyQbnDl ylkupT/kBcsb7fyDWSFICQvDcwkyxxIqDYpa+A8N8nFZtauxkxPiOk5ldgLKAzw/3z ELrg1yLxQ5j6w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4CCC567F1E for ; Tue, 7 Oct 2025 11:07:10 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Q8nkjdbgXyeu for ; Tue, 7 Oct 2025 11:07:10 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759856830; bh=Dr5GRmEP6rT7iQIWFEN4/6RXJd2F3pqkegxQ/1Fw3kY=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Jrtp9ShwOr+FMAZ5xTDjSFqZQHiKY77PkRJXK7jC8RSDuPRijyzJ6hJ8CQlwHpCpz N1vnIP/j3kdhBiBwg7e+UNcjsgW5kVsRMoiRNWASAe6hb2nLgzvA2W2+vgv9VAyx+X daxdoYNkVUn5731rTzA0cCVDbzm7/vbJc4cJkX/XE6atQJBq0E73ChwIZNTi2SL1j1 ywKWhwiAJP1oyiae4z8zvOKFbHcoSG+VPkuhIoOnMraLPCUfbNBgrJltfXGxyQbnDl ylkupT/kBcsb7fyDWSFICQvDcwkyxxIqDYpa+A8N8nFZtauxkxPiOk5ldgLKAzw/3z ELrg1yLxQ5j6w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3D30267EE5 for ; Tue, 7 Oct 2025 11:07:10 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759856828; bh=Gt9MCrXj6XoEKXsTNTKcl687qkTp4h9tVPQVMCsGST0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qjcJX5ZZNqptaV/ohiePflrklFHfrHkCIuGn2434X8v6yigHw7jQ1BQgq+WKZp/tT G3rX5dn6/ctnjMvSMeij6BjL3wpGSc59Pyl/sudD+41YjCbCCUBuOjh8EoZkAT4wa5 0e1rxvc5SX4Ga8slPsL4N0R6SRu6MSujk5vykCXJ+8/hnYjIb4dTsKwq0Gpoxu1FN9 jvYrXKv81MAW63RFXIRqoHLTWCFqxQjg/iUSyGTN9OL+9e/kHpN6UpXaIIspblz8WA Yl3ZMOgAt2QEI4v4bech11hTfS9toIiyNiXDyYuLu1dGVksX3BnZN6yr0iePdfHUKZ TpOUmCM48ZKCQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D984867ECE; Tue, 7 Oct 2025 11:07:08 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id usPUyZdFDG-Z; Tue, 7 Oct 2025 11:07:08 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759856821; bh=rzXrLUqTewrRbHXi2jC5zvo8vEhJ3HeRAsYAxNv0YZ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iEjN2KXcwWvWRbU1WnZD7ByvZ9wu+s33nUx6LnRFXKg2NTVH8cnVbzpSffC7o9Byn hhGtB+t2ahUskkjD0OkXLpmuAaHS3jXbjw21YK9G6VzgKdML0suRdcAG49OB0ixCTx PiLTRVUgV2JajVDmZA9pPdiCZsF0RbBwB8Jd1cxA89G2g741q3nKtNx2BsyzBf+U70 z0DR8lfRNKPF+gDaALglWXJdtLkZE8ZaLQVPzYXfwwYgNFK8XdYruGRC3bPhttTXqQ reeOZA1DwOUaFph9XH4MA0WT8YPjgnBowVz42JALlGSPwdl/5oFTejZLIQPhsFL1g1 zfxnnImSJ0+mw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 582EF67EE5; Tue, 7 Oct 2025 11:07:01 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 7 Oct 2025 11:05:32 -0600 Message-ID: <20251007170549.541981-19-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251007170549.541981-1-sjg@u-boot.org> References: <20251007170549.541981-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 7WOHVFHJPC4QSUOZR5JI6WIQNA5EPU4A X-Message-ID-Hash: 7WOHVFHJPC4QSUOZR5JI6WIQNA5EPU4A X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 18/20] efi: Add definitions for the absolute-pointer protocol List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Add these definitions to the API so that we can make use of this feature in drivers, etc. Signed-off-by: Simon Glass --- (no changes since v1) include/efi.h | 1 + include/efi_api.h | 30 ++++++++++++++++++++++++++++++ lib/efi/device_path.c | 1 + 3 files changed, 32 insertions(+) diff --git a/include/efi.h b/include/efi.h index 3d983bd69a4..0bc7e0581f7 100644 --- a/include/efi.h +++ b/include/efi.h @@ -179,6 +179,7 @@ extern const efi_guid_t efi_guid_device_path; extern const efi_guid_t efi_simple_file_system_protocol_guid; extern const efi_guid_t efi_guid_simple_pointer; +extern const efi_guid_t efi_guid_absolute_pointer; /* Generic EFI table header */ struct efi_table_hdr { diff --git a/include/efi_api.h b/include/efi_api.h index 70e24cb5fc9..9e661913ecc 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -1006,6 +1006,36 @@ struct efi_simple_pointer_protocol { struct efi_simple_pointer_mode *mode; }; +#define EFI_ABSOLUTE_POINTER_PROTOCOL_GUID \ + EFI_GUID(0x8d59d32b, 0xc655, 0x4ae9, \ + 0x9b, 0x15, 0xf2, 0x59, 0x04, 0x99, 0x2a, 0x43) + +struct efi_absolute_pointer_state { + u64 current_x; + u64 current_y; + u64 current_z; + u32 active_buttons; +}; + +struct efi_absolute_pointer_mode { + u64 abs_min_x; + u64 abs_min_y; + u64 abs_min_z; + u64 abs_max_x; + u64 abs_max_y; + u64 abs_max_z; + u32 attributes; +}; + +struct efi_absolute_pointer_protocol { + efi_status_t (EFIAPI *reset)(struct efi_absolute_pointer_protocol *this, + bool extended_verification); + efi_status_t (EFIAPI *get_state)(struct efi_absolute_pointer_protocol *this, + struct efi_absolute_pointer_state *state); + struct efi_event *wait_for_input; + struct efi_absolute_pointer_mode *mode; +}; + #define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \ EFI_GUID(0x8b843e20, 0x8132, 0x4852, \ 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c) diff --git a/lib/efi/device_path.c b/lib/efi/device_path.c index 939bf5a0679..de7647e13d0 100644 --- a/lib/efi/device_path.c +++ b/lib/efi/device_path.c @@ -28,6 +28,7 @@ const efi_guid_t efi_global_variable_guid = EFI_GLOBAL_VARIABLE_GUID; const efi_guid_t efi_guid_device_path = EFI_DEVICE_PATH_PROTOCOL_GUID; const efi_guid_t efi_guid_loaded_image = EFI_LOADED_IMAGE_PROTOCOL_GUID; const efi_guid_t efi_guid_simple_pointer = EFI_SIMPLE_POINTER_PROTOCOL_GUID; +const efi_guid_t efi_guid_absolute_pointer = EFI_ABSOLUTE_POINTER_PROTOCOL_GUID; const efi_guid_t efi_guid_loaded_image_device_path = EFI_LOADED_IMAGE_DEVICE_PATH_PROTOCOL_GUID; const efi_guid_t efi_simple_file_system_protocol_guid =