]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Framework/Protocol/LegacyInterrupt/LegacyInterrupt.h
Update Guid Value format.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Protocol / LegacyInterrupt / LegacyInterrupt.h
CommitLineData
3eb9473e 1/*++\r
2\r
3Copyright (c) 1999 - 2006, Intel Corporation\r
4All rights reserved. This program and the accompanying materials\r
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
12\r
13Module Name:\r
14\r
15 LegacyInterrupt.h\r
16 \r
17Abstract:\r
18\r
19 This protocol manages the PIRQ for PCI devices\r
20\r
21Revision History\r
22\r
23 The EFI Legacy Interrupt Protocol is compliant with CSM spec 0.96.\r
24\r
25--*/\r
26\r
27#ifndef _EFI_LEGACY_INTERRUPT_H_\r
28#define _EFI_LEGACY_INTERRUPT_H_\r
29\r
30#define EFI_LEGACY_INTERRUPT_PROTOCOL_GUID \\r
31 { \\r
7ccf38a3 32 0x31ce593d, 0x108a, 0x485d, {0xad, 0xb2, 0x78, 0xf2, 0x1f, 0x29, 0x66, 0xbe} \\r
3eb9473e 33 }\r
34\r
35EFI_FORWARD_DECLARATION (EFI_LEGACY_INTERRUPT_PROTOCOL);\r
36\r
37typedef\r
38EFI_STATUS\r
39(EFIAPI *EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS) (\r
40 IN EFI_LEGACY_INTERRUPT_PROTOCOL * This,\r
41 OUT UINT8 *NumberPirqs\r
42 );\r
43\r
44/*++\r
45\r
46 Routine Description:\r
47 Return the number of PIRQs this hardware supports.\r
48\r
49 Arguments:\r
50 This - Protocol instance pointer.\r
51 NumberPirsq - Number of PIRQs.\r
52\r
53 Returns:\r
54 EFI_SUCCESS - Number of PIRQs returned.\r
55\r
56--*/\r
57typedef\r
58EFI_STATUS\r
59(EFIAPI *EFI_LEGACY_INTERRUPT_GET_LOCATION) (\r
60 IN EFI_LEGACY_INTERRUPT_PROTOCOL * This,\r
61 OUT UINT8 *Bus,\r
62 OUT UINT8 *Device,\r
63 OUT UINT8 *Function\r
64 );\r
65\r
66/*++\r
67\r
68 Routine Description:\r
69 Return PCI location of this device. $PIR table requires this info.\r
70\r
71 Arguments:\r
72 This - Protocol instance pointer.\r
73 Bus - PCI Bus\r
74 Device - PCI Device\r
75 Function - PCI Function\r
76\r
77 Returns:\r
78 EFI_SUCCESS - Bus/Device/Function returned\r
79\r
80--*/\r
81typedef\r
82EFI_STATUS\r
83(EFIAPI *EFI_LEGACY_INTERRUPT_READ_PIRQ) (\r
84 IN EFI_LEGACY_INTERRUPT_PROTOCOL * This,\r
85 IN UINT8 PirqNumber,\r
86 OUT UINT8 *PirqData\r
87 );\r
88\r
89/*++\r
90\r
91 Routine Description:\r
92 Read the PIRQ register and return the data\r
93\r
94 Arguments:\r
95 This - Protocol instance pointer.\r
96 PirqNumber - PIRQ register to read\r
97 PirqData - Data read\r
98\r
99 Returns:\r
100 EFI_SUCCESS - Data was read\r
101 EFI_INVALID_PARAMETER - Invalid PIRQ number\r
102\r
103--*/\r
104typedef\r
105EFI_STATUS\r
106(EFIAPI *EFI_LEGACY_INTERRUPT_WRITE_PIRQ) (\r
107 IN EFI_LEGACY_INTERRUPT_PROTOCOL * This,\r
108 IN UINT8 PirqNumber,\r
109 IN UINT8 PirqData\r
110 );\r
111\r
112/*++\r
113\r
114 Routine Description:\r
115 Write the specified PIRQ register with the given data.\r
116\r
117 Arguments:\r
118 This - Protocol instance pointer.\r
119 PirqNumber - PIRQ register to read.\r
120 PirqData - Data written.\r
121\r
122 Returns:\r
123 EFI_SUCCESS - Table pointer returned\r
124 EFI_INVALID_PARAMETER - Invalid PIRQ number\r
125\r
126--*/\r
5d46191d 127struct _EFI_LEGACY_INTERRUPT_PROTOCOL {\r
3eb9473e 128 EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS GetNumberPirqs;\r
129 EFI_LEGACY_INTERRUPT_GET_LOCATION GetLocation;\r
130 EFI_LEGACY_INTERRUPT_READ_PIRQ ReadPirq;\r
131 EFI_LEGACY_INTERRUPT_WRITE_PIRQ WritePirq;\r
5d46191d 132};\r
3eb9473e 133\r
134extern EFI_GUID gEfiLegacyInterruptProtocolGuid;\r
135\r
136#endif\r