]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/IndustryStandard/Pci30.h
add a macro IS_PCI_SATADPA to judge if device is a SATA controller which is running...
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / Pci30.h
1 /** @file
2 Support for PCI 3.0 standard.
3
4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
5 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 __PCI30_H__
16 #define __PCI30_H__
17
18
19 #include <IndustryStandard/Pci23.h>
20
21 ///
22 /// Definitions of PCI class bytes and manipulation macros.
23 ///
24 #define PCI_CLASS_MASS_STORAGE_SATADPA 0x06
25 #define PCI_IF_MASS_STORAGE_SATA 0x00
26 #define PCI_IF_MASS_STORAGE_AHCI 0x01
27
28 /**
29 Macro that checks whether device is a SATA controller.
30
31 @param _p Specified device.
32
33 @retval TRUE Device is a SATA controller.
34 @retval FALSE Device is not a SATA controller.
35
36 **/
37 #define IS_PCI_SATADPA(_p) IS_CLASS2 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_SATADPA)
38
39 ///
40 /// PCI Capability List IDs and records
41 ///
42 #define EFI_PCI_CAPABILITY_ID_PCIEXP 0x10
43
44 #pragma pack(1)
45
46 ///
47 /// PCI Data Structure Format
48 /// Section 5.1.2, PCI Firmware Specification, Revision 3.0
49 ///
50 typedef struct {
51 UINT32 Signature; ///< "PCIR"
52 UINT16 VendorId;
53 UINT16 DeviceId;
54 UINT16 DeviceListOffset;
55 UINT16 Length;
56 UINT8 Revision;
57 UINT8 ClassCode[3];
58 UINT16 ImageLength;
59 UINT16 CodeRevision;
60 UINT8 CodeType;
61 UINT8 Indicator;
62 UINT16 MaxRuntimeImageLength;
63 UINT16 ConfigUtilityCodeHeaderOffset;
64 UINT16 DMTFCLPEntryPointOffset;
65 } PCI_3_0_DATA_STRUCTURE;
66
67 #pragma pack()
68
69 #endif