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