]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/LegacyInterrupt.h
add some framework definitions
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / LegacyInterrupt.h
CommitLineData
79964ac8 1/** @file\r
2 This protocol manages the legacy memory regions between 0xc0000 - 0xfffff\r
3\r
4 Copyright (c) 2007, Intel Corporation\r
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13 Module Name: LegacyInterrupt.h\r
14\r
15 @par Revision Reference:\r
16 This protocol is defined in Framework for EFI Compatibility Support Module spec\r
17 Version 0.96\r
18\r
19**/\r
20\r
21#ifndef _EFI_LEGACY_INTERRUPT_H_\r
22#define _EFI_LEGACY_INTERRUPT_H_\r
23\r
24#define EFI_LEGACY_INTERRUPT_PROTOCOL_GUID \\r
25 { \\r
26 0x31ce593d, 0x108a, 0x485d, {0xad, 0xb2, 0x78, 0xf2, 0x1f, 0x29, 0x66, 0xbe } \\r
27 }\r
28\r
29typedef struct _EFI_LEGACY_INTERRUPT_PROTOCOL EFI_LEGACY_INTERRUPT_PROTOCOL;\r
30\r
31/**\r
32 Get the number of PIRQs this hardware supports.\r
33\r
34 @param This Protocol instance pointer.\r
35 @param NumberPirsq Number of PIRQs.\r
36\r
37 @retval EFI_SUCCESS Number of PIRQs returned.\r
38\r
39**/\r
40typedef\r
41EFI_STATUS\r
42(EFIAPI *EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS) (\r
43 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
44 OUT UINT8 *NumberPirqs\r
45 );\r
46\r
47/**\r
48 Gets the PCI location associated with this protocol.\r
49\r
50 @param This Protocol instance pointer.\r
51 @param Bus PCI Bus\r
52 @param Device PCI Device\r
53 @param Function PCI Function\r
54\r
55 @retval EFI_SUCCESS Bus/Device/Function returned\r
56\r
57**/\r
58typedef\r
59EFI_STATUS\r
60(EFIAPI *EFI_LEGACY_INTERRUPT_GET_LOCATION) (\r
61 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
62 OUT UINT8 *Bus,\r
63 OUT UINT8 *Device,\r
64 OUT UINT8 *Function\r
65 );\r
66\r
67/**\r
68 Read the PIRQ register and return the data\r
69\r
70 @param This Protocol instance pointer.\r
71 @param PirqNumber PIRQ register to read\r
72 @param PirqData Data read\r
73\r
74 @retval EFI_SUCCESS Data was read\r
75 @retval EFI_INVALID_PARAMETER Invalid PIRQ number\r
76\r
77**/\r
78typedef\r
79EFI_STATUS\r
80(EFIAPI *EFI_LEGACY_INTERRUPT_READ_PIRQ) (\r
81 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
82 IN UINT8 PirqNumber,\r
83 OUT UINT8 *PirqData\r
84 );\r
85\r
86/**\r
87 Write the specified PIRQ register with the given data.\r
88\r
89 @param This Protocol instance pointer.\r
90 @param PirqNumber PIRQ register to read.\r
91 @param PirqData Data written.\r
92\r
93 @retval EFI_SUCCESS Table pointer returned\r
94 @retval EFI_INVALID_PARAMETER Invalid PIRQ number\r
95\r
96**/\r
97typedef\r
98EFI_STATUS\r
99(EFIAPI *EFI_LEGACY_INTERRUPT_WRITE_PIRQ) (\r
100 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
101 IN UINT8 PirqNumber,\r
102 IN UINT8 PirqData\r
103 );\r
104\r
105/**\r
106 @par Protocol Description:\r
107 Abstracts the PIRQ programming from the generic EFI Compatibility Support Modules\r
108\r
109 @param GetNumberPirqs\r
110 Gets the number of PIRQs supported.\r
111\r
112 @param GetLocation\r
113 Gets the PCI bus, device, and function that associated with this protocol.\r
114\r
115 @param ReadPirq\r
116 Reads the indicated PIRQ register.\r
117\r
118 @param WritePirq\r
119 Writes to the indicated PIRQ register.\r
120\r
121**/\r
122struct _EFI_LEGACY_INTERRUPT_PROTOCOL {\r
123 EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS GetNumberPirqs;\r
124 EFI_LEGACY_INTERRUPT_GET_LOCATION GetLocation;\r
125 EFI_LEGACY_INTERRUPT_READ_PIRQ ReadPirq;\r
126 EFI_LEGACY_INTERRUPT_WRITE_PIRQ WritePirq;\r
127};\r
128\r
129extern EFI_GUID gEfiLegacyInterruptProtocolGuid;\r
130\r
131#endif\r