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