2007-06-15 12:02:42 +02:00
|
|
|
/** @file
|
2008-04-08 09:40:30 +02:00
|
|
|
This protocol abstracts the PIRQ programming from the generic EFI Compatibility Support Modules (CSMs).
|
2007-06-15 12:02:42 +02:00
|
|
|
|
2010-04-23 17:52:13 +02:00
|
|
|
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
2010-03-16 02:53:11 +01:00
|
|
|
This program and the accompanying materials are licensed and made available under
|
|
|
|
the terms and conditions of the BSD License that accompanies this distribution.
|
|
|
|
The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php.
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
|
|
|
@par Revision Reference:
|
2010-03-16 02:53:11 +01:00
|
|
|
This protocol is defined in Framework for the EFI Compatibility Support Module specification.
|
2009-05-21 11:04:03 +02:00
|
|
|
Version 0.97.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef _EFI_LEGACY_INTERRUPT_H_
|
|
|
|
#define _EFI_LEGACY_INTERRUPT_H_
|
|
|
|
|
2007-06-28 14:23:11 +02:00
|
|
|
|
2007-06-15 12:02:42 +02:00
|
|
|
#define EFI_LEGACY_INTERRUPT_PROTOCOL_GUID \
|
|
|
|
{ \
|
|
|
|
0x31ce593d, 0x108a, 0x485d, {0xad, 0xb2, 0x78, 0xf2, 0x1f, 0x29, 0x66, 0xbe } \
|
|
|
|
}
|
|
|
|
|
|
|
|
typedef struct _EFI_LEGACY_INTERRUPT_PROTOCOL EFI_LEGACY_INTERRUPT_PROTOCOL;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the number of PIRQs this hardware supports.
|
|
|
|
|
2010-03-16 02:53:11 +01:00
|
|
|
@param This The protocol instance pointer.
|
|
|
|
@param NumberPirsq The number of PIRQs that are supported.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
2009-06-10 19:07:59 +02:00
|
|
|
@retval EFI_SUCCESS The number of PIRQs was returned successfully.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-07-31 09:44:54 +02:00
|
|
|
(EFIAPI *EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS)(
|
2007-06-15 12:02:42 +02:00
|
|
|
IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,
|
|
|
|
OUT UINT8 *NumberPirqs
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Gets the PCI location associated with this protocol.
|
|
|
|
|
2010-03-16 02:53:11 +01:00
|
|
|
@param This The Protocol instance pointer.
|
|
|
|
@param Bus The PCI Bus.
|
|
|
|
@param Device The PCI Device.
|
|
|
|
@param Function The PCI Function.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
2010-03-16 02:53:11 +01:00
|
|
|
@retval EFI_SUCCESS The Bus, Device, and Function were returned successfully.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-07-31 09:44:54 +02:00
|
|
|
(EFIAPI *EFI_LEGACY_INTERRUPT_GET_LOCATION)(
|
2007-06-15 12:02:42 +02:00
|
|
|
IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,
|
|
|
|
OUT UINT8 *Bus,
|
|
|
|
OUT UINT8 *Device,
|
|
|
|
OUT UINT8 *Function
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Read the PIRQ register and return the data
|
|
|
|
|
2010-03-16 02:53:11 +01:00
|
|
|
@param This The protocol instance pointer.
|
|
|
|
@param PirqNumber The PIRQ register to read.
|
|
|
|
@param PirqData The data read.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
2010-03-16 02:53:11 +01:00
|
|
|
@retval EFI_SUCCESS The data was read.
|
|
|
|
@retval EFI_INVALID_PARAMETER Invalid PIRQ number.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-07-31 09:44:54 +02:00
|
|
|
(EFIAPI *EFI_LEGACY_INTERRUPT_READ_PIRQ)(
|
2007-06-15 12:02:42 +02:00
|
|
|
IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,
|
|
|
|
IN UINT8 PirqNumber,
|
|
|
|
OUT UINT8 *PirqData
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Write the specified PIRQ register with the given data.
|
|
|
|
|
2010-03-16 02:53:11 +01:00
|
|
|
@param This The protocol instance pointer.
|
|
|
|
@param PirqNumber A PIRQ register to read.
|
|
|
|
@param PirqData The data to write.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
2010-03-16 02:53:11 +01:00
|
|
|
@retval EFI_SUCCESS The PIRQ was programmed.
|
|
|
|
@retval EFI_INVALID_PARAMETER Invalid PIRQ number.
|
2007-06-15 12:02:42 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
typedef
|
|
|
|
EFI_STATUS
|
2008-07-31 09:44:54 +02:00
|
|
|
(EFIAPI *EFI_LEGACY_INTERRUPT_WRITE_PIRQ)(
|
2007-06-15 12:02:42 +02:00
|
|
|
IN EFI_LEGACY_INTERRUPT_PROTOCOL *This,
|
|
|
|
IN UINT8 PirqNumber,
|
|
|
|
IN UINT8 PirqData
|
|
|
|
);
|
|
|
|
|
|
|
|
struct _EFI_LEGACY_INTERRUPT_PROTOCOL {
|
2009-07-02 09:40:24 +02:00
|
|
|
///
|
|
|
|
/// Gets the number of PIRQs supported.
|
|
|
|
///
|
2007-06-15 12:02:42 +02:00
|
|
|
EFI_LEGACY_INTERRUPT_GET_NUMBER_PIRQS GetNumberPirqs;
|
2009-07-02 09:40:24 +02:00
|
|
|
|
|
|
|
///
|
2010-03-16 02:53:11 +01:00
|
|
|
/// Gets the PCI bus, device, and function that is associated with this protocol.
|
2009-07-02 09:40:24 +02:00
|
|
|
///
|
2007-06-15 12:02:42 +02:00
|
|
|
EFI_LEGACY_INTERRUPT_GET_LOCATION GetLocation;
|
2009-07-02 09:40:24 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// Reads the indicated PIRQ register.
|
|
|
|
///
|
2007-06-15 12:02:42 +02:00
|
|
|
EFI_LEGACY_INTERRUPT_READ_PIRQ ReadPirq;
|
2009-07-02 09:40:24 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// Writes to the indicated PIRQ register.
|
|
|
|
///
|
2007-06-15 12:02:42 +02:00
|
|
|
EFI_LEGACY_INTERRUPT_WRITE_PIRQ WritePirq;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern EFI_GUID gEfiLegacyInterruptProtocolGuid;
|
|
|
|
|
|
|
|
#endif
|