]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/LegacyInterrupt.h
Renaming files/directories
[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
b80fbe85 24#include <PiDxe.h>\r
25\r
79964ac8 26#define EFI_LEGACY_INTERRUPT_PROTOCOL_GUID \\r
27 { \\r
28 0x31ce593d, 0x108a, 0x485d, {0xad, 0xb2, 0x78, 0xf2, 0x1f, 0x29, 0x66, 0xbe } \\r
29 }\r
30\r
31typedef struct _EFI_LEGACY_INTERRUPT_PROTOCOL EFI_LEGACY_INTERRUPT_PROTOCOL;\r
32\r
33/**\r
34 Get the number of PIRQs this hardware supports.\r
35\r
36 @param This Protocol instance pointer.\r
37 @param NumberPirsq Number of PIRQs.\r
38\r
39 @retval EFI_SUCCESS Number of PIRQs returned.\r
40\r
41**/\r
42typedef\r
43EFI_STATUS\r
44(EFIAPI *EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS) (\r
45 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
46 OUT UINT8 *NumberPirqs\r
47 );\r
48\r
49/**\r
50 Gets the PCI location associated with this protocol.\r
51\r
52 @param This Protocol instance pointer.\r
53 @param Bus PCI Bus\r
54 @param Device PCI Device\r
55 @param Function PCI Function\r
56\r
57 @retval EFI_SUCCESS Bus/Device/Function returned\r
58\r
59**/\r
60typedef\r
61EFI_STATUS\r
62(EFIAPI *EFI_LEGACY_INTERRUPT_GET_LOCATION) (\r
63 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
64 OUT UINT8 *Bus,\r
65 OUT UINT8 *Device,\r
66 OUT UINT8 *Function\r
67 );\r
68\r
69/**\r
70 Read the PIRQ register and return the data\r
71\r
72 @param This Protocol instance pointer.\r
73 @param PirqNumber PIRQ register to read\r
74 @param PirqData Data read\r
75\r
76 @retval EFI_SUCCESS Data was read\r
77 @retval EFI_INVALID_PARAMETER Invalid PIRQ number\r
78\r
79**/\r
80typedef\r
81EFI_STATUS\r
82(EFIAPI *EFI_LEGACY_INTERRUPT_READ_PIRQ) (\r
83 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
84 IN UINT8 PirqNumber,\r
85 OUT UINT8 *PirqData\r
86 );\r
87\r
88/**\r
89 Write the specified PIRQ register with the given data.\r
90\r
91 @param This Protocol instance pointer.\r
92 @param PirqNumber PIRQ register to read.\r
93 @param PirqData Data written.\r
94\r
95 @retval EFI_SUCCESS Table pointer returned\r
96 @retval EFI_INVALID_PARAMETER Invalid PIRQ number\r
97\r
98**/\r
99typedef\r
100EFI_STATUS\r
101(EFIAPI *EFI_LEGACY_INTERRUPT_WRITE_PIRQ) (\r
102 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
103 IN UINT8 PirqNumber,\r
104 IN UINT8 PirqData\r
105 );\r
106\r
107/**\r
108 @par Protocol Description:\r
109 Abstracts the PIRQ programming from the generic EFI Compatibility Support Modules\r
110\r
111 @param GetNumberPirqs\r
112 Gets the number of PIRQs supported.\r
113\r
114 @param GetLocation\r
115 Gets the PCI bus, device, and function that associated with this protocol.\r
116\r
117 @param ReadPirq\r
118 Reads the indicated PIRQ register.\r
119\r
120 @param WritePirq\r
121 Writes to the indicated PIRQ register.\r
122\r
123**/\r
124struct _EFI_LEGACY_INTERRUPT_PROTOCOL {\r
125 EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS GetNumberPirqs;\r
126 EFI_LEGACY_INTERRUPT_GET_LOCATION GetLocation;\r
127 EFI_LEGACY_INTERRUPT_READ_PIRQ ReadPirq;\r
128 EFI_LEGACY_INTERRUPT_WRITE_PIRQ WritePirq;\r
129};\r
130\r
131extern EFI_GUID gEfiLegacyInterruptProtocolGuid;\r
132\r
133#endif\r