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
| /** SerDesHelperLib.h
| The Header file for SerDesHelperLib
|
| Copyright 2020 NXP
|
| SPDX-License-Identifier: BSD-2-Clause-Patent
| **/
|
| #ifndef SERDES_HELPER_LIB_H
| #define SERDES_HELPER_LIB_H
|
| #include <Uefi.h>
| #include <Library/SerDes.h>
|
| typedef struct {
| UINT16 Protocol;
| UINT8 SerDesLane[FixedPcdGet8 (PcdSerDesLanes)];
| } SERDES_CONFIG;
|
| typedef enum {
| SERDES_1 = 0,
| SERDES_2,
| SERDES_3,
| SERDES_MAX
| } SERDES_NUMBER;
|
| UINT32
| GetSerDesProtocol (
| IN INTN SerDes,
| IN INTN SerDesProtocol,
| IN INTN Lane,
| IN UINT32 SerDesMaxProtocol,
| IN SERDES_CONFIG *Config
| );
|
| EFI_STATUS
| IsSerDesProtocolValid (
| IN INTN SerDes,
| IN UINT32 SerDesProtocol,
| IN UINT8 SerDesNumLanes,
| IN SERDES_CONFIG *Config
| );
|
| EFI_STATUS
| GetSerDesMap (
| IN UINT32 SerDes,
| IN UINT32 SerDesProtocol,
| IN UINT8 SerDesNumLanes,
| IN UINT32 SerDesMaxProtocol,
| IN SERDES_CONFIG *Config,
| OUT UINT64 *SerDesProtocolMap
| );
|
| VOID
| SerDesInstanceProbeLanes (
| IN UINT32 SerDes,
| IN UINT32 SerDesProtocol,
| IN UINT8 SerDesNumLanes,
| IN UINT32 SerDesMaxProtocol,
| IN SERDES_CONFIG *Config,
| IN SERDES_PROBE_LANES_CALLBACK SerDesLaneProbeCallback,
| IN VOID *Arg
| );
| #endif
|
|