hc
2024-08-12 233ab1bd4c5697f5cdec94e60206e8c6ac609b4c
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
/** @file
  Header file for CpuPcieRpLib.
 
  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
  SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _CPU_PCIERP_LIB_H_
#define _CPU_PCIERP_LIB_H_
 
#include <Ppi/SiPolicy.h>
#include <Library/HobLib.h>
 
#pragma pack(1)
 
typedef struct {
  UINT8   Segment;
  UINT8   Bus;
  UINT8   Device;
  UINT8   Function;
  BOOLEAN Enable;
} CPU_PCIE_RP_INFO;
 
#pragma pack()
 
/**
  Determines whether PCIe link is active
 
  @param[in] RpBase    Root Port base address
  @retval Link Active state
**/
BOOLEAN
CpuPcieIsLinkActive (
  UINT64  RpBase
  );
 
/**
  Get max PCIe link speed supported by the root port.
 
  @param[in] RpBase    Root Port pci segment base address
  @return    Max link speed
**/
UINT32
CpuPcieGetMaxLinkSpeed (
  UINT64 RpBase
  );
 
#endif // _CPU_PCIERP_LIB_H_