2 This protocol abstracts the PIRQ programming from the generic EFI Compatibility Support Modules (CSMs).
4 Copyright (c) 2007 - 2009, 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
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.
13 @par Revision Reference:
14 This protocol is defined in Framework for EFI Compatibility Support Module spec
19 #ifndef _EFI_LEGACY_INTERRUPT_H_
20 #define _EFI_LEGACY_INTERRUPT_H_
23 #define EFI_LEGACY_INTERRUPT_PROTOCOL_GUID \
25 0x31ce593d, 0x108a, 0x485d, {0xad, 0xb2, 0x78, 0xf2, 0x1f, 0x29, 0x66, 0xbe } \
28 typedef struct _EFI_LEGACY_INTERRUPT_PROTOCOL EFI_LEGACY_INTERRUPT_PROTOCOL
;
31 Get the number of PIRQs this hardware supports.
33 @param This Protocol instance pointer.
34 @param NumberPirsq Number of PIRQs that are supported.
36 @retval EFI_SUCCESS The number of PIRQs was returned successfully.
41 (EFIAPI
*EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS
)(
42 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
43 OUT UINT8
*NumberPirqs
47 Gets the PCI location associated with this protocol.
49 @param This Protocol instance pointer.
51 @param Device PCI Device
52 @param Function PCI Function
54 @retval EFI_SUCCESS The Bus, Device, and Function were returned successfully
59 (EFIAPI
*EFI_LEGACY_INTERRUPT_GET_LOCATION
)(
60 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
67 Read the PIRQ register and return the data
69 @param This Protocol instance pointer.
70 @param PirqNumber PIRQ register to read
71 @param PirqData Data read
73 @retval EFI_SUCCESS Data was read
74 @retval EFI_INVALID_PARAMETER Invalid PIRQ number
79 (EFIAPI
*EFI_LEGACY_INTERRUPT_READ_PIRQ
)(
80 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
86 Write the specified PIRQ register with the given data.
88 @param This Protocol instance pointer.
89 @param PirqNumber PIRQ register to read.
90 @param PirqData Data to write.
92 @retval EFI_SUCCESS The PIRQ was programmed
93 @retval EFI_INVALID_PARAMETER Invalid PIRQ number
98 (EFIAPI
*EFI_LEGACY_INTERRUPT_WRITE_PIRQ
)(
99 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
104 struct _EFI_LEGACY_INTERRUPT_PROTOCOL
{
106 /// Gets the number of PIRQs supported.
108 EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS GetNumberPirqs
;
111 /// Gets the PCI bus, device, and function that associated with this protocol.
113 EFI_LEGACY_INTERRUPT_GET_LOCATION GetLocation
;
116 /// Reads the indicated PIRQ register.
118 EFI_LEGACY_INTERRUPT_READ_PIRQ ReadPirq
;
121 /// Writes to the indicated PIRQ register.
123 EFI_LEGACY_INTERRUPT_WRITE_PIRQ WritePirq
;
126 extern EFI_GUID gEfiLegacyInterruptProtocolGuid
;