3 Copyright (c) 1999 - 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 This protocol manages the PIRQ for PCI devices
23 The EFI Legacy Interrupt Protocol is compliant with CSM spec 0.96.
27 #ifndef _EFI_LEGACY_INTERRUPT_H_
28 #define _EFI_LEGACY_INTERRUPT_H_
30 #define EFI_LEGACY_INTERRUPT_PROTOCOL_GUID \
32 0x31ce593d, 0x108a, 0x485d, 0xad, 0xb2, 0x78, 0xf2, 0x1f, 0x29, 0x66, 0xbe \
35 EFI_FORWARD_DECLARATION (EFI_LEGACY_INTERRUPT_PROTOCOL
);
39 (EFIAPI
*EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS
) (
40 IN EFI_LEGACY_INTERRUPT_PROTOCOL
* This
,
41 OUT UINT8
*NumberPirqs
47 Return the number of PIRQs this hardware supports.
50 This - Protocol instance pointer.
51 NumberPirsq - Number of PIRQs.
54 EFI_SUCCESS - Number of PIRQs returned.
59 (EFIAPI
*EFI_LEGACY_INTERRUPT_GET_LOCATION
) (
60 IN EFI_LEGACY_INTERRUPT_PROTOCOL
* This
,
69 Return PCI location of this device. $PIR table requires this info.
72 This - Protocol instance pointer.
75 Function - PCI Function
78 EFI_SUCCESS - Bus/Device/Function returned
83 (EFIAPI
*EFI_LEGACY_INTERRUPT_READ_PIRQ
) (
84 IN EFI_LEGACY_INTERRUPT_PROTOCOL
* This
,
92 Read the PIRQ register and return the data
95 This - Protocol instance pointer.
96 PirqNumber - PIRQ register to read
100 EFI_SUCCESS - Data was read
101 EFI_INVALID_PARAMETER - Invalid PIRQ number
106 (EFIAPI
*EFI_LEGACY_INTERRUPT_WRITE_PIRQ
) (
107 IN EFI_LEGACY_INTERRUPT_PROTOCOL
* This
,
115 Write the specified PIRQ register with the given data.
118 This - Protocol instance pointer.
119 PirqNumber - PIRQ register to read.
120 PirqData - Data written.
123 EFI_SUCCESS - Table pointer returned
124 EFI_INVALID_PARAMETER - Invalid PIRQ number
127 typedef struct _EFI_LEGACY_INTERRUPT_PROTOCOL
{
128 EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS GetNumberPirqs
;
129 EFI_LEGACY_INTERRUPT_GET_LOCATION GetLocation
;
130 EFI_LEGACY_INTERRUPT_READ_PIRQ ReadPirq
;
131 EFI_LEGACY_INTERRUPT_WRITE_PIRQ WritePirq
;
132 } EFI_LEGACY_INTERRUPT_PROTOCOL
;
134 extern EFI_GUID gEfiLegacyInterruptProtocolGuid
;