]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkPkg/Include/Protocol/LegacyInterrupt.h
Remove IntelFrameworkModulePkg
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / LegacyInterrupt.h
CommitLineData
79964ac8 1/** @file\r
8411f1c0 2 This protocol abstracts the PIRQ programming from the generic EFI Compatibility Support Modules (CSMs).\r
79964ac8 3\r
1c2f052d 4Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
22a69a5e 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
79964ac8 6\r
79964ac8 7 @par Revision Reference:\r
f22f941e 8 This protocol is defined in Framework for the EFI Compatibility Support Module specification.\r
0f899407 9 Version 0.97.\r
79964ac8 10\r
11**/\r
12\r
13#ifndef _EFI_LEGACY_INTERRUPT_H_\r
14#define _EFI_LEGACY_INTERRUPT_H_\r
15\r
b80fbe85 16\r
79964ac8 17#define EFI_LEGACY_INTERRUPT_PROTOCOL_GUID \\r
18 { \\r
19 0x31ce593d, 0x108a, 0x485d, {0xad, 0xb2, 0x78, 0xf2, 0x1f, 0x29, 0x66, 0xbe } \\r
20 }\r
21\r
22typedef struct _EFI_LEGACY_INTERRUPT_PROTOCOL EFI_LEGACY_INTERRUPT_PROTOCOL;\r
23\r
24/**\r
25 Get the number of PIRQs this hardware supports.\r
26\r
f22f941e 27 @param This The protocol instance pointer.\r
28 @param NumberPirsq The number of PIRQs that are supported.\r
79964ac8 29\r
b4124f44 30 @retval EFI_SUCCESS The number of PIRQs was returned successfully.\r
79964ac8 31\r
32**/\r
33typedef\r
34EFI_STATUS\r
69686d56 35(EFIAPI *EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS)(\r
79964ac8 36 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
37 OUT UINT8 *NumberPirqs\r
38 );\r
39\r
40/**\r
41 Gets the PCI location associated with this protocol.\r
42\r
f22f941e 43 @param This The Protocol instance pointer.\r
44 @param Bus The PCI Bus.\r
45 @param Device The PCI Device.\r
46 @param Function The PCI Function.\r
79964ac8 47\r
f22f941e 48 @retval EFI_SUCCESS The Bus, Device, and Function were returned successfully.\r
79964ac8 49\r
50**/\r
51typedef\r
52EFI_STATUS\r
69686d56 53(EFIAPI *EFI_LEGACY_INTERRUPT_GET_LOCATION)(\r
79964ac8 54 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
55 OUT UINT8 *Bus,\r
56 OUT UINT8 *Device,\r
57 OUT UINT8 *Function\r
58 );\r
59\r
60/**\r
61 Read the PIRQ register and return the data\r
62\r
f22f941e 63 @param This The protocol instance pointer.\r
64 @param PirqNumber The PIRQ register to read.\r
65 @param PirqData The data read.\r
79964ac8 66\r
f22f941e 67 @retval EFI_SUCCESS The data was read.\r
68 @retval EFI_INVALID_PARAMETER Invalid PIRQ number.\r
79964ac8 69\r
70**/\r
71typedef\r
72EFI_STATUS\r
69686d56 73(EFIAPI *EFI_LEGACY_INTERRUPT_READ_PIRQ)(\r
79964ac8 74 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
75 IN UINT8 PirqNumber,\r
76 OUT UINT8 *PirqData\r
77 );\r
78\r
79/**\r
80 Write the specified PIRQ register with the given data.\r
81\r
f22f941e 82 @param This The protocol instance pointer.\r
83 @param PirqNumber A PIRQ register to read.\r
84 @param PirqData The data to write.\r
79964ac8 85\r
f22f941e 86 @retval EFI_SUCCESS The PIRQ was programmed.\r
87 @retval EFI_INVALID_PARAMETER Invalid PIRQ number.\r
79964ac8 88\r
89**/\r
90typedef\r
91EFI_STATUS\r
69686d56 92(EFIAPI *EFI_LEGACY_INTERRUPT_WRITE_PIRQ)(\r
79964ac8 93 IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r
94 IN UINT8 PirqNumber,\r
95 IN UINT8 PirqData\r
96 );\r
97\r
79964ac8 98struct _EFI_LEGACY_INTERRUPT_PROTOCOL {\r
2bbaeb0d 99 ///\r
100 /// Gets the number of PIRQs supported.\r
101 ///\r
79964ac8 102 EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS GetNumberPirqs;\r
2bbaeb0d 103\r
104 ///\r
f22f941e 105 /// Gets the PCI bus, device, and function that is associated with this protocol.\r
2bbaeb0d 106 ///\r
79964ac8 107 EFI_LEGACY_INTERRUPT_GET_LOCATION GetLocation;\r
2bbaeb0d 108\r
109 ///\r
110 /// Reads the indicated PIRQ register.\r
111 ///\r
79964ac8 112 EFI_LEGACY_INTERRUPT_READ_PIRQ ReadPirq;\r
2bbaeb0d 113\r
114 ///\r
115 /// Writes to the indicated PIRQ register.\r
116 ///\r
79964ac8 117 EFI_LEGACY_INTERRUPT_WRITE_PIRQ WritePirq;\r
118};\r
119\r
120extern EFI_GUID gEfiLegacyInterruptProtocolGuid;\r
121\r
122#endif\r