summaryrefslogtreecommitdiff
path: root/Include/PciBusEx.h
blob: 53b17965eeeba4ae3404f5c41c170fd4025a838b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2005, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**             6145-F Northbelt Pkwy, Norcross, GA 30071            **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: /Alaska/BIN/Core/Modules/PciBus/PciBusEx.h 2     11/14/08 1:36p Yakovlevs $
//
// $Revision: 2 $
//
// $Date: 11/14/08 1:36p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/BIN/Core/Modules/PciBus/PciBusEx.h $
// 
// 2     11/14/08 1:36p Yakovlevs
// Removed unused function from PciBusEx protocol.
// 
// 1     9/25/08 11:29a Yakovlevs
// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:	PciBusEx.h
//
// Description:	Defines PciBus Extended protocol Interface to provide
//              additional PCI Bus related functions.
//
//<AMI_FHDR_END>
//**********************************************************************
#ifndef __PCI_BUS_EX__H__
#define __PCI_BUS_EX__H__
#ifdef __cplusplus
extern "C" {
#endif


#include <Efi.h>
#include <PciBus.h>
#include <Protocol\PciIo.h>

#define AMI_PCI_BUS_EXT_PROTOCOL_GUID \
{ 0xf42a009d, 0x977f, 0x4f08, 0x94, 0x40, 0xbc, 0xa5, 0xa3, 0xbe, 0xd9, 0xaf };

//-------------------------------------------------
//Forward Declarations
//-------------------------------------------------
typedef struct _AMI_PCI_EXT_PROTOCOL AMI_PCI_EXT_PROTOCOL;


//-------------------------------------------------
// Protocol Function Definitions
//-------------------------------------------------
typedef EFI_STATUS (EFIAPI * AMI_PCI_EXT_IS_PCI_EXPRESS)(
	IN  AMI_PCI_EXT_PROTOCOL	              			*This,
	IN  EFI_HANDLE                               		PciDeviceHandle,
	IN  EFI_PCI_IO_PROTOCOL								*PciIo 		    OPTIONAL,
    OUT PCIE_DATA                                       **PciExpData    OPTIONAL
);

//-------------------------------------------------
typedef EFI_STATUS (EFIAPI * AMI_PCI_EXT_IS_PCI_X)(
	IN  AMI_PCI_EXT_PROTOCOL	              			*This,
	IN  EFI_HANDLE                               		PciDeviceHandle,
	IN  EFI_PCI_IO_PROTOCOL								*PciIo 		    OPTIONAL,
    OUT PCIX_DATA                                       **PciXData    OPTIONAL
);

//-------------------------------------------------
typedef EFI_STATUS (EFIAPI * AMI_PCI_EXT_IS_P2P_BRG)(
	IN  AMI_PCI_EXT_PROTOCOL	              			*This,
	IN  EFI_HANDLE                               		PciDeviceHandle,
	IN  EFI_PCI_IO_PROTOCOL								*PciIo 		    OPTIONAL,
    OUT PCI_BRG_EXT                                     **BrgData       OPTIONAL
);

//-------------------------------------------------
typedef EFI_STATUS (EFIAPI * AMI_PCI_EXT_IS_CRD_BRG)(
	IN  AMI_PCI_EXT_PROTOCOL	              			*This,
	IN  EFI_HANDLE                               		PciDeviceHandle,
	IN  EFI_PCI_IO_PROTOCOL								*PciIo 		    OPTIONAL,
    OUT PCI_BRG_EXT                                     **BrgData       OPTIONAL
);

//-------------------------------------------------
typedef EFI_STATUS (EFIAPI * AMI_PCI_EXT_IS_REG_DEVICE)(
	IN  AMI_PCI_EXT_PROTOCOL	              			*This,
	IN  EFI_HANDLE                               		PciDeviceHandle,
	IN  EFI_PCI_IO_PROTOCOL								*PciIo 		OPTIONAL
);

typedef EFI_STATUS (EFIAPI * AMI_PCI_EXT_GET_CLASS_CODES_INFO) (
	IN  AMI_PCI_EXT_PROTOCOL	              			*This,
	IN  EFI_HANDLE                               		PciDeviceHandle,
	IN  EFI_PCI_IO_PROTOCOL								*PciIo 		OPTIONAL,
	OUT PCI_DEV_CLASS									*CassCodes
);

typedef EFI_STATUS (EFIAPI * AMI_PCI_EXT_GET_PCI_PIC_IRQ) (
	IN  AMI_PCI_EXT_PROTOCOL	              			*This,
	IN  EFI_HANDLE                               		PciDeviceHandle,
	IN  EFI_PCI_IO_PROTOCOL								*PciIo 		OPTIONAL,
    OUT PCI_IRQ_PIC_ROUTE                               **PicIrqTblEntry,
    EFI_PCI_CONFIGURATION_ADDRESS                       **ParentDevices,
    OUT UINTN                                           *EntryCount
);

typedef EFI_STATUS (EFIAPI * AMI_PCI_EXT_GET_PCI_APIC_IRQ) (
	IN  AMI_PCI_EXT_PROTOCOL	              			*This,
	IN  EFI_HANDLE                               		PciDeviceHandle,
	IN  EFI_PCI_IO_PROTOCOL								*PciIo 		OPTIONAL,
    OUT PCI_IRQ_APIC_ROUTE                              **ApicIrqTblEntry,
    EFI_PCI_CONFIGURATION_ADDRESS                       **ParentDevices,
    OUT UINTN                                           *EntryCount
);



typedef struct _AMI_PCI_EXT_PROTOCOL {
	AMI_PCI_EXT_IS_PCI_EXPRESS			IsPciExpress;
	AMI_PCI_EXT_IS_PCI_X				IsPciX;
	AMI_PCI_EXT_IS_P2P_BRG				IsPci2PciBridge;
	AMI_PCI_EXT_IS_CRD_BRG				IsPci2CrdBridge;
	AMI_PCI_EXT_IS_REG_DEVICE			IsPciDevice;
	AMI_PCI_EXT_GET_CLASS_CODES_INFO	GetClassCodesInfo;
    AMI_PCI_EXT_GET_PCI_PIC_IRQ         GetPciPicIrq;
    AMI_PCI_EXT_GET_PCI_APIC_IRQ        GetPciApicIrq;
    EFI_HANDLE                          PciExtHanle;
} AMI_PCI_EXT_PROTOCOL;

/****** DO NOT WRITE BELOW THIS LINE *******/
#ifdef __cplusplus
}
#endif
#endif
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2005, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**             6145-F Northbelt Pkwy, Norcross, GA 30071            **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************