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