]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Framework/Include/EfiPciCfg.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Include / EfiPciCfg.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 EfiPciCfg.h\r
15\r
16Abstract:\r
17\r
18 Abstract the common fields of PciCfg definition between Framework 0.9x\r
19 and PI 1.0.\r
20 \r
21--*/\r
22\r
23#ifndef _EFI_PCI_CFG_H_\r
24#define _EFI_PCI_CFG_H_\r
25\r
26//\r
27// Framework specification 0.9x definition.\r
28//\r
29typedef enum {\r
30 PeiPciCfgWidthUint8 = 0,\r
31 PeiPciCfgWidthUint16 = 1,\r
32 PeiPciCfgWidthUint32 = 2,\r
33 PeiPciCfgWidthUint64 = 3,\r
34 PeiPciCfgWidthMaximum\r
35} PEI_PCI_CFG_PPI_WIDTH;\r
36\r
37#define PEI_PCI_CFG_ADDRESS(bus, dev, func, reg) ( \\r
38 (UINT64) ((((UINTN) bus) << 24) + (((UINTN) dev) << 16) + (((UINTN) func) << 8) + ((UINTN) reg)) \\r
39 ) & 0x00000000ffffffff\r
40\r
41//\r
42// PI 1.0 definition.\r
43//\r
44typedef enum {\r
45 EfiPeiPciCfgWidthUint8 = 0,\r
46 EfiPeiPciCfgWidthUint16 = 1,\r
47 EfiPeiPciCfgWidthUint32 = 2,\r
48 EfiPeiPciCfgWidthUint64 = 3,\r
49 EfiPeiPciCfgWidthMaximum\r
50} EFI_PEI_PCI_CFG_PPI_WIDTH;\r
51\r
52#define EFI_PEI_PCI_CFG_ADDRESS(bus, dev, func, reg) \\r
53 ( ((bus) << 24) | \\r
54 ((dev) << 16) | \\r
55 ((func) << 8) | \\r
56 ((reg) < 256 ? (reg): ((UINT64)(reg) << 32))) \r
57\r
58\r
59#if (PI_SPECIFICATION_VERSION < 0x00010000)\r
60\r
61typedef struct {\r
62 UINT8 Register;\r
63 UINT8 Function;\r
64 UINT8 Device;\r
65 UINT8 Bus;\r
66 UINT8 Reserved[4];\r
67} PEI_PCI_CFG_PPI_PCI_ADDRESS;\r
68\r
69typedef PEI_PCI_CFG_PPI_PCI_ADDRESS EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS;\r
70\r
71#else\r
72\r
73typedef struct {\r
74 UINT8 Register;\r
75 UINT8 Function;\r
76 UINT8 Device;\r
77 UINT8 Bus;\r
78 UINT32 ExtendedRegister;\r
79} EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS;\r
80#endif\r
81\r
82#endif\r