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_
17 #define EFI_LEGACY_INTERRUPT_PROTOCOL_GUID \
19 0x31ce593d, 0x108a, 0x485d, {0xad, 0xb2, 0x78, 0xf2, 0x1f, 0x29, 0x66, 0xbe } \
22 typedef struct _EFI_LEGACY_INTERRUPT_PROTOCOL EFI_LEGACY_INTERRUPT_PROTOCOL
;
25 Get the number of PIRQs this hardware supports.
27 @param This The protocol instance pointer.
28 @param NumberPirsq The number of PIRQs that are supported.
30 @retval EFI_SUCCESS The number of PIRQs was returned successfully.
35 (EFIAPI
*EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS
)(
36 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
37 OUT UINT8
*NumberPirqs
41 Gets the PCI location associated with this protocol.
43 @param This The Protocol instance pointer.
44 @param Bus The PCI Bus.
45 @param Device The PCI Device.
46 @param Function The PCI Function.
48 @retval EFI_SUCCESS The Bus, Device, and Function were returned successfully.
53 (EFIAPI
*EFI_LEGACY_INTERRUPT_GET_LOCATION
)(
54 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
61 Read the PIRQ register and return the data
63 @param This The protocol instance pointer.
64 @param PirqNumber The PIRQ register to read.
65 @param PirqData The data read.
67 @retval EFI_SUCCESS The data was read.
68 @retval EFI_INVALID_PARAMETER Invalid PIRQ number.
73 (EFIAPI
*EFI_LEGACY_INTERRUPT_READ_PIRQ
)(
74 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
80 Write the specified PIRQ register with the given data.
82 @param This The protocol instance pointer.
83 @param PirqNumber A PIRQ register to read.
84 @param PirqData The data to write.
86 @retval EFI_SUCCESS The PIRQ was programmed.
87 @retval EFI_INVALID_PARAMETER Invalid PIRQ number.
92 (EFIAPI
*EFI_LEGACY_INTERRUPT_WRITE_PIRQ
)(
93 IN EFI_LEGACY_INTERRUPT_PROTOCOL
*This
,
98 struct _EFI_LEGACY_INTERRUPT_PROTOCOL
{
100 /// Gets the number of PIRQs supported.
102 EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS GetNumberPirqs
;
105 /// Gets the PCI bus, device, and function that is associated with this protocol.
107 EFI_LEGACY_INTERRUPT_GET_LOCATION GetLocation
;
110 /// Reads the indicated PIRQ register.
112 EFI_LEGACY_INTERRUPT_READ_PIRQ ReadPirq
;
115 /// Writes to the indicated PIRQ register.
117 EFI_LEGACY_INTERRUPT_WRITE_PIRQ WritePirq
;
120 extern EFI_GUID gEfiLegacyInterruptProtocolGuid
;