1 /** @file 2 This PPI is the same as the PPI in the framework PciCfg, with one exception. 3 Specifically, this PPI does not include a modify API, while the PPI in the framework PciCfg does. 4 5 Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR> 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php. 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 14 **/ 15 16 #ifndef _PEI_PCI_CFG_H_ 17 #define _PEI_PCI_CFG_H_ 18 19 #include <Ppi/PciCfg.h> 20 21 #define ECP_PEI_PCI_CFG_PPI_GUID \ 22 {0xb0ee53d4, 0xa049, 0x4a79, { 0xb2, 0xff, 0x19, 0xd9, 0xfa, 0xef, 0xaa, 0x94}} 23 24 typedef struct _ECP_PEI_PCI_CFG_PPI ECP_PEI_PCI_CFG_PPI; 25 26 /** 27 A PCI read and write operation. 28 29 Writes to, or reads from, a given location in the PCI configuration space. 30 31 @param PeiServices An indirect pointer to the PEI Services Table 32 published by the PEI Foundation. 33 @param This The pointer to local data for the interface. 34 @param Width The width of the access. Enumerated in bytes. 35 @param Address The physical address of the access. The format of 36 the address is described by EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS. 37 @param Buffer A pointer to the buffer of data. 38 @retval EFI_SUCCESS The function completed successfully. 39 @retval EFI_DEVICE_ERROR There was a problem with the transaction. 40 @retval EFI_DEVICE_NOT_READY The device is not capable of supporting the 41 operation at this time. 42 **/ 43 typedef 44 EFI_STATUS 45 (EFIAPI *ECP_PEI_PCI_CFG_PPI_IO)( 46 IN EFI_PEI_SERVICES **PeiServices, 47 IN EFI_PEI_PCI_CFG_PPI * This, 48 IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, 49 IN UINT64 Address, 50 IN OUT VOID *Buffer 51 ); 52 53 struct _ECP_PEI_PCI_CFG_PPI { 54 ECP_PEI_PCI_CFG_PPI_IO Read; 55 ECP_PEI_PCI_CFG_PPI_IO Write; 56 }; 57 58 extern EFI_GUID gEcpPeiPciCfgPpiGuid; 59 60 #endif 61