2 This protocol abstracts the PIRQ programming from the generic EFI Compatibility Support Modules (CSMs).
4 Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
7 @par Revision Reference:
8 This protocol is defined in Framework for the EFI Compatibility Support Module specification.
13 #ifndef _EFI_LEGACY_INTERRUPT_H_
14 #define _EFI_LEGACY_INTERRUPT_H_
16 #define EFI_LEGACY_INTERRUPT_PROTOCOL_GUID \
18 0x31ce593d, 0x108a, 0x485d, {0xad, 0xb2, 0x78, 0xf2, 0x1f, 0x29, 0x66, 0xbe } \
21 typedef struct _EFI_LEGACY_INTERRUPT_PROTOCOL EFI_LEGACY_INTERRUPT_PROTOCOL
;
24 Get the number of PIRQs this hardware supports.
26 @param This The protocol instance pointer.
27 @param NumberPirsq The number of PIRQs that are supported.
29 @retval EFI_SUCCESS The number of PIRQs was returned successfully.
34 (EFIAPI
*EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS
)(
35 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
36 OUT UINT8
*NumberPirqs
40 Gets the PCI location associated with this protocol.
42 @param This The Protocol instance pointer.
43 @param Bus The PCI Bus.
44 @param Device The PCI Device.
45 @param Function The PCI Function.
47 @retval EFI_SUCCESS The Bus, Device, and Function were returned successfully.
52 (EFIAPI
*EFI_LEGACY_INTERRUPT_GET_LOCATION
)(
53 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
60 Read the PIRQ register and return the data
62 @param This The protocol instance pointer.
63 @param PirqNumber The PIRQ register to read.
64 @param PirqData The data read.
66 @retval EFI_SUCCESS The data was read.
67 @retval EFI_INVALID_PARAMETER Invalid PIRQ number.
72 (EFIAPI
*EFI_LEGACY_INTERRUPT_READ_PIRQ
)(
73 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
79 Write the specified PIRQ register with the given data.
81 @param This The protocol instance pointer.
82 @param PirqNumber A PIRQ register to read.
83 @param PirqData The data to write.
85 @retval EFI_SUCCESS The PIRQ was programmed.
86 @retval EFI_INVALID_PARAMETER Invalid PIRQ number.
91 (EFIAPI
*EFI_LEGACY_INTERRUPT_WRITE_PIRQ
)(
92 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
97 struct _EFI_LEGACY_INTERRUPT_PROTOCOL
{
99 /// Gets the number of PIRQs supported.
101 EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS GetNumberPirqs
;
104 /// Gets the PCI bus, device, and function that is associated with this protocol.
106 EFI_LEGACY_INTERRUPT_GET_LOCATION GetLocation
;
109 /// Reads the indicated PIRQ register.
111 EFI_LEGACY_INTERRUPT_READ_PIRQ ReadPirq
;
114 /// Writes to the indicated PIRQ register.
116 EFI_LEGACY_INTERRUPT_WRITE_PIRQ WritePirq
;
119 extern EFI_GUID gEfiLegacyInterruptProtocolGuid
;