From: Simon Glass <sjg@chromium.org> Add these definitions to the API so that we can make use of this feature in drivers, etc. Signed-off-by: Simon Glass <sjg@chromium.org> --- 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 = -- 2.43.0