hc
2024-03-22 a0752693d998599af469473b8dc239ef973a012f
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
/** @file
  Defines and prototypes for the System Agent PCIe library module
  This library is expected to share between DXE and SMM drivers.
 
  Copyright (c) 2019 Intel Corporation. All rights reserved. <BR>
 
  SPDX-License-Identifier: BSD-2-Clause-Patent
**/
 
#ifndef _SA_PCIE_LIB_H_
#define _SA_PCIE_LIB_H_
 
#include <Library/S3BootScriptLib.h>
#include <Protocol/SaPolicy.h>
 
#define MAX_SUPPORTED_ROOT_BRIDGE_NUMBER  3
#define MAX_SUPPORTED_DEVICE_NUMBER       192
 
/**
  Enumerate all end point devices connected to root bridge ports and record their MMIO base address
 
  @exception EFI_UNSUPPORTED      PCIe capability structure not found
  @retval    EFI_SUCCESS          All done successfully
**/
EFI_STATUS
EnumerateAllPcieDevices (
  VOID
  );
 
/**
  Sets Common Clock, TCx-VC0 mapping, and Max Payload for PCIe
**/
VOID
SaPcieConfigBeforeOpRom (
  VOID
  );
 
/**
  This function does all SA ASPM initialization
**/
VOID
SaAspm (
  VOID
  );
 
/**
  This function checks PEG end point device for extended tag capability and enables them if they are.
**/
VOID
EnableExtendedTag (
  VOID
  );
 
/**
  This function handles SA S3 resume
**/
VOID
SaS3Resume (
  VOID
  );
 
/**
  Wrapper function for all SA S3 resume tasks which can be a callback function.
**/
VOID
SaS3ResumeCallback (
  VOID
  );
 
#endif