summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Compatibility/PciCfg2OnPciCfgThunk/PciCfg2ToPciCfgThunk.inf
blob: b6695e48a5370466c8b8625769a528491daf0b1c (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
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
#/** @file
# Module produces PciCfgPpi2 on top of PciCfgPpi. It also updates the 
# PciCfg2Ppi pointer in the EFI_PEI_SERVICES upon a installation of
# EcpPeiPciCfgPpi. 
#
# EcpPeiPciCfgPpi is installed by a framework module which
# produce PciCfgPpi originally. Such framework module is updated based on the 
# following rule to install EcpPeiPciCfgPpi instead of updating the PciCfg pointer
# in the Framework PeiServicesTable: 
# 
# Search pattern:
# 	   PeiServices->PciCfg = <*>;
# Replace pattern:
#         {
#           static EFI_PEI_PPI_DESCRIPTOR gEcpPeiPciCfgPpiList = {
#             (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
#             &gEcpPeiPciCfgPpiGuid,
#             <*>
#           };
#           (**PeiServices).InstallPpi (PeiServices, &gEcpPeiPciCfgPpiList);
#         }
# 
# In addition, the PeiServicesTable definition in PeiApi.h is updated to
# 
# struct _EFI_PEI_SERVICES {
#   EFI_TABLE_HEADER              Hdr;
#   ...
# 
#   //
#   // Pointer to PPI interface
#   //
# #if (PI_SPECIFICATION_VERSION < 0x00010000)
# 
#   PEI_CPU_IO_PPI                 *CpuIo;
#   ECP_PEI_PCI_CFG_PPI        *PciCfg;  //Changed.
# #else
# ...
# #endif
# 
# };
# 
# This change enable the detection of code segment which invokes PeiServices->PciCfg->Modify.
# Such code causes a build break as ECP_PEI_PCI_CFG_PPI does not has "Modify" field. 
# This should be updated to a call to PeiLibPciCfgModify as shown below:
# 
# Search pattern:
# 		*->Modify(<*>); 
# Replace pattern:
# 		PeiLibPciCfgModify(<*>);
#
# PIWG's PI specification replaces Inte's EFI Specification 1.10.
# EFI_PEI_PCI_CFG_PPI defined in Inte's EFI Specification 1.10 is replaced by
# EFI_PEI_PCI_CFG2_PPI in PI 1.0.
# This module produces PciCfgPpi on top of PciCfgPpi2. This module is used on platform when both of
# these two conditions are true:
# 1) Framework module present that produces PCI CFG PPI  AND
# 2) PI module that produces PCI CFG2 is not present

#
# PEIM to provide the Variable functionality.
# Copyright (c) 2006 - 2007, Intel Corporation
#
#  All rights reserved. This program and the accompanying materials
#  are licensed and made available under the terms and conditions of the BSD License
#  which accompanies this distribution. The full text of the license may be found at
#  http://opensource.org/licenses/bsd-license.php
#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#
#**/

[Defines]
  INF_VERSION                    = 0x00010005
  BASE_NAME                      = PciCfg2OnPciCfgThunk
  FILE_GUID                      = 41401688-2862-431b-BAAC-6ECADAC384AB
  MODULE_TYPE                    = PEIM
  VERSION_STRING                 = 1.0
  EDK_RELEASE_VERSION            = 0x00020000
  EFI_SPECIFICATION_VERSION      = 0x00020000

  ENTRY_POINT                    = PeimInitializePciCfg2

#
# The following information is for reference only and not required by the build tools.
#
#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC
#

[Sources.common]
  PciCfg2OnPciCfgThunk.c

[Packages]
  MdePkg/MdePkg.dec
  IntelFrameworkPkg/IntelFrameworkPkg.dec
  EdkCompatibilityPkg/EdkCompatibilityPkg.dec

[LibraryClasses]
  PeimEntryPoint
  DebugLib

[Ppis]
  gEfiPciCfgPpiInServiceTableGuid
  gEfiPciCfg2PpiGuid
  gEcpPeiPciCfgPpiGuid

[Depex]
  TRUE