From patchwork Mon Oct 6 23:21:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 545 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=1759793027; bh=+gH/+r3frUxCaFYp6w3XqmZRcXQoVmUwxwnzStA2HLk=; 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=caY/izLuDZcOn/l7hYb1dsmsqZuVbFQQYeCxJEm5Ag3hB5+8Jb88lKQMdIiCunKen WuVdY1lz9tGAjmYEF+jj8RJxnOySPmZyCwUXTYpxu8isU7WXr1Hcd2tLWrYLd3Ubxg AwMFfeYnp+PRAU4AMGdy9TvO8mI7zMnsW5nd7Wqy76jzb3lNy9ZUrzNc9NxFmD1hw2 tmxcmGd21Fzf3cxAolQ1w+oClZPxjRKtbLGLaJjbvEybRT6U5clDnUnv4gQV5qPaIe yJNfdzMOBFcGFsJd2m81/vl61Ir0Lo2TLbNcZrE15/wYfbOduZZBRJpM7glZV9cpa5 yFkr2htYJ4S8g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 32C2B67DB4 for ; Mon, 6 Oct 2025 17:23:47 -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 0E11bNX6w9sa for ; Mon, 6 Oct 2025 17:23:47 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759793027; bh=+gH/+r3frUxCaFYp6w3XqmZRcXQoVmUwxwnzStA2HLk=; 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=caY/izLuDZcOn/l7hYb1dsmsqZuVbFQQYeCxJEm5Ag3hB5+8Jb88lKQMdIiCunKen WuVdY1lz9tGAjmYEF+jj8RJxnOySPmZyCwUXTYpxu8isU7WXr1Hcd2tLWrYLd3Ubxg AwMFfeYnp+PRAU4AMGdy9TvO8mI7zMnsW5nd7Wqy76jzb3lNy9ZUrzNc9NxFmD1hw2 tmxcmGd21Fzf3cxAolQ1w+oClZPxjRKtbLGLaJjbvEybRT6U5clDnUnv4gQV5qPaIe yJNfdzMOBFcGFsJd2m81/vl61Ir0Lo2TLbNcZrE15/wYfbOduZZBRJpM7glZV9cpa5 yFkr2htYJ4S8g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1B64E67EE4 for ; Mon, 6 Oct 2025 17:23:47 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759793025; bh=I66q8FtB5r0xxRnpbgGRpDkOiBdyXXQ17E5aQLi83yU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b8m3kFXRNkUfDy/1fX5S94HBom68BM55lbR0rX7jdqXBhIn20ggFbMGCt9pvLPb7F YxQyI4c6G5PZlpGHhiPTAXzYfTTYywDLXdCqS1QSaHWvV3L4J+XZMcXnMXVcYN1GcV TZW0s2NmnUibj05gVln7pBc11lR69u4kPJTnzMSw9mtJoZ55i6Fzyx4pki1iBVbTDc XtVd4BYkj0NoOeoWa3oCM2fR7JeLLnMWxVfWcakxksaZ8sCRNavio02Knt54Jh5u0z u//f9NdBjgrU9Y02CXhfPiJBrnwmbjkSjdgc7oH5bG6QFB/wRwZft5D2On1EVLHXK1 BtMCpAPQbm40A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7DFB267DB4; Mon, 6 Oct 2025 17:23:45 -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 O-0vKhT1tX-x; Mon, 6 Oct 2025 17:23:45 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1759793021; bh=8vJf9gcH1QEM2W5WvYFWrQdOqcRyIRtHOuO6LZPNm6Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fyBfDL92nhK3iexJtlu+fGiQ0AWHx7S3+tXnl+8vCjVpGSc46WJ2Yad8HY9laHSZR 4H5U538EgrlADr7RirF3NRGgKB9L1juWTkSxAzlubE2py0CCrNi54nYUOcMxqOYPkQ qqnO49mWSkT8hdTxs2oDDAblBSV/yh2QK/5z+MCEsj0UOtQUsuGBrTMKSau/g1eBTY tpMS8LQBg6R577dxyoTMqZBsmv9sYuU85rnO7kwhrgVRObIUEqk/1u2ESlbSg9Nnbj 112d4Q2f3DnFVScRGL3kpwkVhdPJ1/W4I9yI8boK5GGmMcv2uOO+LE3zt4gGR3KkXb Q0onoDM8x1mUA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id ADB3E67EE4; Mon, 6 Oct 2025 17:23:40 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Mon, 6 Oct 2025 17:21:57 -0600 Message-ID: <20251006232236.2091941-16-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251006232236.2091941-1-sjg@u-boot.org> References: <20251006232236.2091941-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: FIDGKPUNSHFRKLQRU5UYVVF7HVEEYI5S X-Message-ID-Hash: FIDGKPUNSHFRKLQRU5UYVVF7HVEEYI5S 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 15/17] 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 --- 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 =