2
This file declares the PciCfg PPI used to access the PCI configuration space in PEI
4
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
5
This program and the accompanying materials are licensed and made available under
6
the terms and conditions of the BSD License that accompanies this distribution.
7
The full text of the license may be found at
8
http://opensource.org/licenses/bsd-license.php.
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.
13
@par Revision Reference:
14
This PPI is defined in PEI CIS
19
#ifndef __PEI_PCI_CFG_H__
20
#define __PEI_PCI_CFG_H__
22
#include <Ppi/PciCfg2.h>
24
// Get the common definitions for EFI_PEI_PCI_CFG_PPI_WIDTH.
27
#define EFI_PEI_PCI_CFG_PPI_INSTALLED_GUID \
29
0xe1f2eba0, 0xf7b9, 0x4a26, {0x86, 0x20, 0x13, 0x12, 0x21, 0x64, 0x2a, 0x90 } \
32
typedef struct _EFI_PEI_PCI_CFG_PPI EFI_PEI_PCI_CFG_PPI;
34
#define PEI_PCI_CFG_ADDRESS(bus, dev, func, reg) ( \
35
(UINT64) ((((UINTN) bus) << 24) + (((UINTN) dev) << 16) + (((UINTN) func) << 8) + ((UINTN) reg)) \
36
) & 0x00000000ffffffff
39
PCI read and write operation.
41
@param PeiServices An indirect pointer to the PEI Services Table
42
published by the PEI Foundation.
43
@param This Pointer to local data for the interface.
44
@param Width The width of the access. Enumerated in bytes.
45
@param Address The physical address of the access.
46
@param Buffer A pointer to the buffer of data.
48
@retval EFI_SUCCESS The function completed successfully.
49
@retval EFI_NOT_YET_AVAILABLE The service has not been installed.
54
(EFIAPI *EFI_PEI_PCI_CFG_PPI_IO)(
55
IN EFI_PEI_SERVICES **PeiServices,
56
IN EFI_PEI_PCI_CFG_PPI *This,
57
IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,
63
PCI read-modify-write operation.
65
@param PeiServices An indirect pointer to the PEI Services Table
66
published by the PEI Foundation.
67
@param This The pointer to local data for the interface.
68
@param Width The width of the access. Enumerated in bytes.
69
@param Address The physical address of the access.
70
@param SetBits Value of the bits to set.
71
@param ClearBits Value of the bits to clear.
73
@retval EFI_SUCCESS The function completed successfully.
78
(EFIAPI *EFI_PEI_PCI_CFG_PPI_RW)(
79
IN EFI_PEI_SERVICES **PeiServices,
80
IN EFI_PEI_PCI_CFG_PPI *This,
81
IN EFI_PEI_PCI_CFG_PPI_WIDTH Width,
88
The EFI_PEI_PCI_CFG_PPI interfaces are used to abstract accesses to PCI
89
controllers behind a PCI root bridge controller.
91
struct _EFI_PEI_PCI_CFG_PPI {
93
/// PCI read services. See the Read() function description.
95
EFI_PEI_PCI_CFG_PPI_IO Read;
98
/// PCI write services. See the Write() function description.
100
EFI_PEI_PCI_CFG_PPI_IO Write;
103
/// PCI read-modify-write services. See the Modify() function description.
105
EFI_PEI_PCI_CFG_PPI_RW Modify;
108
extern EFI_GUID gEfiPciCfgPpiInServiceTableGuid;