| /* |
| * Copyright (c) 2024 The Fuchsia Authors |
| * |
| * SPDX-License-Identifier: BSD-3-Clause |
| */ |
| |
| // EFI_ANDROID_BOOT_PROTOCOL is a UEFI protocol introduced by Google Generic |
| // Bootloader for verified booting and Fastboot over USB. |
| // See https://android.googlesource.com/platform/bootable/libbootloader/+/refs/heads/main/gbl/docs/EFI_ANDROID_BOOT_PROTOCOL.md |
| // for protocol spec. |
| |
| #include <efi_api.h> |
| |
| #define EFI_ANDROID_BOOT_PROTOCOL_REVISION 0x00000000 |
| |
| #define EFI_ANDROID_BOOT_PROTOCOL_GUID \ |
| EFI_GUID(0x6281a893, 0xac23, 0x4ca7, 0xb2, 0x81, 0x34, 0x0e, 0xf8, \ |
| 0x16, 0x89, 0x55) |
| |
| typedef struct efi_android_boot_protocol { |
| uint64_t revision; |
| efi_status_t (*fastboot_usb_interface_start)( |
| struct efi_android_boot_protocol *self, |
| size_t *max_packet_size); |
| efi_status_t (*fastboot_usb_interface_stop)( |
| struct efi_android_boot_protocol *self); |
| efi_status_t (*fastboot_usb_receive)( |
| struct efi_android_boot_protocol *self, size_t *buffer_size, |
| void *buffer); |
| efi_status_t (*fastboot_usb_send)(struct efi_android_boot_protocol *self, |
| size_t *buffer_size, |
| const void *buffer); |
| struct efi_event *wait_for_send_completion; |
| } efi_android_boot_protocol; |