hc
2024-03-25 edb30157bad0c0001c32b854271ace01d3b9a16a
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/** @file
  Prototype of the DxePchHdaNhltLib library.
 
  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
  SPDX-License-Identifier: BSD-2-Clause-Patent
**/
 
#ifndef _DXE_HDA_NHLT_LIB_H_
#define _DXE_HDA_NHLT_LIB_H_
 
#include <DxeHdaNhlt.h>
 
/**
  Returns pointer to Endpoint ENDPOINT_DESCRIPTOR structure.
 
  @param[in] *NhltTable    Endpoint for which Format address is retrieved
  @param[in] FormatIndex   Index of Format to be retrieved
 
  @retval                  Pointer to ENDPOINT_DESCRIPTOR structure with given index
**/
ENDPOINT_DESCRIPTOR *
GetNhltEndpoint (
  IN CONST NHLT_ACPI_TABLE      *NhltTable,
  IN CONST UINT8                EndpointIndex
  );
 
/**
  Returns pointer to Endpoint Specific Configuration SPECIFIC_CONFIG structure.
 
  @param[in] *Endpoint     Endpoint for which config address is retrieved
 
  @retval                  Pointer to SPECIFIC_CONFIG structure with endpoint's capabilities
**/
SPECIFIC_CONFIG *
GetNhltEndpointDeviceCapabilities (
  IN CONST ENDPOINT_DESCRIPTOR  *Endpoint
  );
 
/**
  Returns pointer to all Formats Configuration FORMATS_CONFIG structure.
 
  @param[in] *Endpoint     Endpoint for which Formats address is retrieved
 
  @retval                  Pointer to FORMATS_CONFIG structure
**/
FORMATS_CONFIG *
GetNhltEndpointFormatsConfig (
  IN CONST ENDPOINT_DESCRIPTOR  *Endpoint
  );
 
/**
  Returns pointer to Format Configuration FORMAT_CONFIG structure.
 
  @param[in] *Endpoint     Endpoint for which Format address is retrieved
  @param[in] FormatIndex   Index of Format to be retrieved
 
  @retval                  Pointer to FORMAT_CONFIG structure with given index
**/
FORMAT_CONFIG *
GetNhltEndpointFormat (
  IN CONST ENDPOINT_DESCRIPTOR  *Endpoint,
  IN CONST UINT8                FormatIndex
  );
 
/**
  Returns pointer to all Device Information DEVICES_INFO structure.
 
  @param[in] *Endpoint     Endpoint for which DevicesInfo address is retrieved
 
  @retval                  Pointer to DEVICES_INFO structure
**/
DEVICES_INFO *
GetNhltEndpointDevicesInfo (
  IN CONST ENDPOINT_DESCRIPTOR  *Endpoint
  );
 
/**
  Returns pointer to Device Information DEVICES_INFO structure.
 
  @param[in] *Endpoint       Endpoint for which Device Info address is retrieved
  @param[in] DeviceInfoIndex Index of Device Info to be retrieved
 
  @retval                    Pointer to DEVICE_INFO structure with given index
**/
DEVICE_INFO *
GetNhltEndpointDeviceInfo (
  IN CONST ENDPOINT_DESCRIPTOR  *Endpoint,
  IN CONST UINT8                DeviceInfoIndex
  );
 
 
/**
  Returns pointer to OED Configuration SPECIFIC_CONFIG structure.
 
  @param[in] *NhltTable    NHLT table for which OED address is retrieved
 
  @retval                  Pointer to SPECIFIC_CONFIG structure with NHLT capabilities
**/
SPECIFIC_CONFIG *
GetNhltOedConfig (
  IN CONST NHLT_ACPI_TABLE      *NhltTable
  );
 
/**
  Prints Format configuration.
 
  @param[in] *Format       Format to be printed
 
  @retval None
**/
VOID
NhltFormatDump (
  IN CONST FORMAT_CONFIG        *Format
  );
 
 
/**
  Prints Endpoint configuration.
 
  @param[in] *Endpoint     Endpoint to be printed
 
  @retval None
**/
VOID
NhltEndpointDump (
  IN CONST ENDPOINT_DESCRIPTOR  *Endpoint
  );
 
/**
  Prints OED (Offload Engine Driver) configuration.
 
  @param[in] *OedConfig   OED to be printed
 
  @retval None
**/
VOID
NhltOedConfigDump (
  IN CONST SPECIFIC_CONFIG      *OedConfig
  );
 
/**
  Prints NHLT (Non HDA-Link Table) to be exposed via ACPI (aka. OED (Offload Engine Driver) Configuration Table).
 
  @param[in] *NhltTable    The NHLT table to print
 
  @retval None
**/
VOID
NhltAcpiTableDump (
  IN NHLT_ACPI_TABLE            *NhltTable
  );
 
#endif // _DXE_HDA_NHLT_LIB_H_