]>
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 |
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 | |
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 | #include <PiDxe.h>\r |
23 | \r | |
79964ac8 | 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 | |
29 | typedef 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 | |
b4124f44 | 35 | @param NumberPirsq Number of PIRQs that are supported.\r |
79964ac8 | 36 | \r |
b4124f44 | 37 | @retval EFI_SUCCESS The number of PIRQs was returned successfully.\r |
79964ac8 | 38 | \r |
39 | **/\r | |
40 | typedef\r | |
41 | EFI_STATUS\r | |
69686d56 | 42 | (EFIAPI *EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS)(\r |
79964ac8 | 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 | |
b4124f44 | 55 | @retval EFI_SUCCESS The Bus, Device, and Function were returned successfully\r |
79964ac8 | 56 | \r |
57 | **/\r | |
58 | typedef\r | |
59 | EFI_STATUS\r | |
69686d56 | 60 | (EFIAPI *EFI_LEGACY_INTERRUPT_GET_LOCATION)(\r |
79964ac8 | 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 | |
78 | typedef\r | |
79 | EFI_STATUS\r | |
69686d56 | 80 | (EFIAPI *EFI_LEGACY_INTERRUPT_READ_PIRQ)(\r |
79964ac8 | 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 | |
b4124f44 | 91 | @param PirqData Data to write.\r |
79964ac8 | 92 | \r |
b4124f44 | 93 | @retval EFI_SUCCESS The PIRQ was programmed\r |
79964ac8 | 94 | @retval EFI_INVALID_PARAMETER Invalid PIRQ number\r |
95 | \r | |
96 | **/\r | |
97 | typedef\r | |
98 | EFI_STATUS\r | |
69686d56 | 99 | (EFIAPI *EFI_LEGACY_INTERRUPT_WRITE_PIRQ)(\r |
79964ac8 | 100 | IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,\r |
101 | IN UINT8 PirqNumber,\r | |
102 | IN UINT8 PirqData\r | |
103 | );\r | |
104 | \r | |
79964ac8 | 105 | struct _EFI_LEGACY_INTERRUPT_PROTOCOL {\r |
b4124f44 | 106 | ///\r |
107 | /// Gets the number of PIRQs supported.\r | |
108 | ///\r | |
79964ac8 | 109 | EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS GetNumberPirqs;\r |
b4124f44 | 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 |
b4124f44 | 114 | ///\r |
115 | /// Reads the indicated PIRQ register.\r | |
116 | ///\r | |
79964ac8 | 117 | EFI_LEGACY_INTERRUPT_READ_PIRQ ReadPirq;\r |
b4124f44 | 118 | ///\r |
119 | /// Writes to the indicated PIRQ register.\r | |
120 | ///\r | |
79964ac8 | 121 | EFI_LEGACY_INTERRUPT_WRITE_PIRQ WritePirq;\r |
122 | };\r | |
123 | \r | |
124 | extern EFI_GUID gEfiLegacyInterruptProtocolGuid;\r | |
125 | \r | |
126 | #endif\r |