summaryrefslogtreecommitdiff
path: root/EmbeddedPkg/Include/Protocol/GblEfiAvf.h
blob: 99fd243193adc5a06ac4692174cccbb7ed9ce3b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/** @file
  GBL EFI AVF Protocol.

  Supplies GBL with vendor DICE handover and Secret Keeper public key
  needed for Android Virtualization Framework.

  Related docs:
  https://android.googlesource.com/platform/bootable/libbootloader/+/refs/heads/gbl-mainline/gbl/docs/gbl_efi_avf_protocol.md

  Copyright (c) 2025, The Android Open Source Project.<BR>
  SPDX-License-Identifier: BSD-2-Clause-Patent

**/

#pragma once

#include <Uefi/UefiBaseType.h>

//
// {e7f1c4a6-0a52-4f61-bd98-9e60b559452a}
//
#define GBL_EFI_AVF_PROTOCOL_GUID \
  { 0xe7f1c4a6, 0x0a52, 0x4f61, { 0xbd, 0x98, 0x9e, 0x60, 0xb5, 0x59, 0x45, 0x2a } }

#define GBL_EFI_AVF_PROTOCOL_REVISION  0x00010000

typedef struct _GBL_EFI_AVF_PROTOCOL GBL_EFI_AVF_PROTOCOL;

typedef
EFI_STATUS
(EFIAPI *GBL_EFI_AVF_READ_VENDOR_DICE_HANDOVER)(
  IN GBL_EFI_AVF_PROTOCOL *This,
  IN OUT UINTN            *HandoverSize,
  OUT UINT8               *Handover
  );

typedef
EFI_STATUS
(EFIAPI *GBL_EFI_AVF_READ_SECRET_KEEPER_PUBLIC_KEY)(
  IN GBL_EFI_AVF_PROTOCOL *This,
  IN OUT UINTN            *PublicKeySize,
  OUT UINT8               *PublicKey
  );

struct _GBL_EFI_AVF_PROTOCOL {
  UINT64                                       Revision;
  GBL_EFI_AVF_READ_VENDOR_DICE_HANDOVER        ReadVendorDiceHandover;
  GBL_EFI_AVF_READ_SECRET_KEEPER_PUBLIC_KEY    ReadSecretKeeperPublicKey;
};

extern EFI_GUID  gGblEfiAvfProtocolGuid;