Home | History | Annotate | Download | only in PciCfg2OnPciCfgThunk
      1 ## @file

      2 # Module produces PciCfgPpi2 on top of PciCfgPpi. It also updates the 

      3 # PciCfg2Ppi pointer in the EFI_PEI_SERVICES upon a installation of

      4 # EcpPeiPciCfgPpi. 

      5 #

      6 # EcpPeiPciCfgPpi is installed by a framework module which

      7 # produce PciCfgPpi originally. Such framework module is updated based on the 

      8 # following rule to install EcpPeiPciCfgPpi instead of updating the PciCfg pointer

      9 # in the Framework PeiServicesTable: 

     10 # 

     11 # Search pattern:

     12 # 	   PeiServices->PciCfg = <*>;

     13 # Replace pattern:

     14 #         {

     15 #           static EFI_PEI_PPI_DESCRIPTOR gEcpPeiPciCfgPpiList = {

     16 #             (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),

     17 #             &gEcpPeiPciCfgPpiGuid,

     18 #             <*>

     19 #           };

     20 #           (**PeiServices).InstallPpi (PeiServices, &gEcpPeiPciCfgPpiList);

     21 #         }

     22 # 

     23 # In addition, the PeiServicesTable definition in PeiApi.h is updated to

     24 # 

     25 # struct _EFI_PEI_SERVICES {

     26 #   EFI_TABLE_HEADER              Hdr;

     27 #   ...

     28 # 

     29 #   //

     30 #   // Pointer to PPI interface

     31 #   //

     32 # #if (PI_SPECIFICATION_VERSION < 0x00010000)

     33 # 

     34 #   PEI_CPU_IO_PPI                 *CpuIo;

     35 #   ECP_PEI_PCI_CFG_PPI        *PciCfg;  //Changed.

     36 # #else

     37 # ...

     38 # #endif

     39 # 

     40 # };

     41 # 

     42 # This change enable the detection of code segment which invokes PeiServices->PciCfg->Modify.

     43 # Such code causes a build break as ECP_PEI_PCI_CFG_PPI does not has "Modify" field. 

     44 # This should be updated to a call to PeiLibPciCfgModify as shown below:

     45 # 

     46 # Search pattern:

     47 # 		*->Modify(<*>); 

     48 # Replace pattern:

     49 # 		PeiLibPciCfgModify(<*>);

     50 #

     51 # PIWG's PI specification replaces Inte's EFI Specification 1.10.

     52 # EFI_PEI_PCI_CFG_PPI defined in Inte's EFI Specification 1.10 is replaced by

     53 # EFI_PEI_PCI_CFG2_PPI in PI 1.0.

     54 # This module produces PciCfgPpi on top of PciCfgPpi2. This module is used on platform when both of

     55 # these two conditions are true:

     56 # 1) Framework module present that produces PCI CFG PPI  AND

     57 # 2) PI module that produces PCI CFG2 is not present

     58 #

     59 #

     60 # Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>

     61 #

     62 #  This program and the accompanying materials

     63 #  are licensed and made available under the terms and conditions of the BSD License

     64 #  which accompanies this distribution. The full text of the license may be found at

     65 #  http://opensource.org/licenses/bsd-license.php

     66 #  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

     67 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

     68 #

     69 #

     70 ##

     71 
     72 [Defines]
     73   INF_VERSION                    = 0x00010005
     74   BASE_NAME                      = PciCfg2OnPciCfgThunk
     75   FILE_GUID                      = 41401688-2862-431b-BAAC-6ECADAC384AB
     76   MODULE_TYPE                    = PEIM
     77   VERSION_STRING                 = 1.0
     78 
     79   ENTRY_POINT                    = PeimInitializePciCfg2
     80 
     81 #

     82 # The following information is for reference only and not required by the build tools.

     83 #

     84 #  VALID_ARCHITECTURES           = IA32 X64 IPF EBC

     85 #

     86 
     87 [Sources]
     88   PciCfg2OnPciCfgThunk.c
     89 
     90 [Packages]
     91   MdePkg/MdePkg.dec
     92   IntelFrameworkPkg/IntelFrameworkPkg.dec
     93   EdkCompatibilityPkg/EdkCompatibilityPkg.dec
     94 
     95 [LibraryClasses]
     96   PeimEntryPoint
     97   DebugLib
     98 
     99 [Ppis]
    100   gEfiPciCfgPpiInServiceTableGuid
    101   gEfiPciCfg2PpiGuid
    102   gEcpPeiPciCfgPpiGuid
    103 
    104 [Depex]
    105   TRUE
    106