summaryrefslogtreecommitdiff
path: root/Silicon/Intel/IntelSiliconPkg/Include/Protocol/VtdLog.h
blob: 7c2894e813249efaad1ad44aa1c7cc81d6e158bc (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
52
53
54
55
56
57
58
59
/** @file
  The definition for VTD Log.

  Copyright (c) 2023, Intel Corporation. All rights reserved.<BR>
  SPDX-License-Identifier: BSD-2-Clause-Patent

**/

#ifndef __VTD_LOG_PROTOCOL_H__
#define __VTD_LOG_PROTOCOL_H__

#include <Guid/VtdLogDataHob.h>

#define EDKII_VTD_LOG_PROTOCOL_GUID \
    { \
      0x1e271819, 0xa3ca, 0x481f, { 0xbd, 0xff, 0x92, 0x78, 0x2f, 0x9a, 0x99, 0x3c } \
    }

typedef struct _EDKII_VTD_LOG_PROTOCOL  EDKII_VTD_LOG_PROTOCOL;

#define EDKII_VTD_LOG_PROTOCOL_REVISION 0x00010000

/**
  Callback function of each VTd log event.
  @param[in]  Context               Event context
  @param[in]  Header                Event header

  @retval     UINT32                Number of events
**/
typedef
VOID
(EFIAPI *EDKII_VTD_LOG_HANDLE_EVENT) (
  IN  VOID                          *Context,
  IN  VTDLOG_EVENT_HEADER           *Header
  );

/**
  Get the VTd log events.
  @param[in]      Context           Event context
  @param[in out]  CallbackHandle    Callback function for each VTd log event

  @retval         UINT32            Number of events
**/
typedef
UINT64
(EFIAPI *EDKII_VTD_LOG_GET_EVENTS) (
  IN      VOID                          *Context,
  IN OUT  EDKII_VTD_LOG_HANDLE_EVENT    CallbackHandle
  );

struct _EDKII_VTD_LOG_PROTOCOL {
  UINT64                                Revision;
  EDKII_VTD_LOG_GET_EVENTS              GetEvents;
};

extern EFI_GUID gEdkiiVTdLogProtocolGuid;

#endif