/** @file
Legacy Interrupt Support
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are
licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include "LegacyInterrupt.h"
//
// Handle for the Legacy Interrupt Protocol instance produced by this driver
//
//
// The Legacy Interrupt Protocol instance produced by this driver
//
};
/**
Return the number of PIRQs supported by this chipset.
@param[in] This Pointer to LegacyInterrupt Protocol
@param[out] NumberPirqs The pointer to return the max IRQ number supported
@retval EFI_SUCCESS Max PIRQs successfully returned
**/
)
{
return EFI_SUCCESS;
}
/**
Return PCI location of this device.
$PIR table requires this info.
@param[in] This - Protocol instance pointer.
@param[out] Bus - PCI Bus
@param[out] Device - PCI Device
@param[out] Function - PCI Function
**/
)
{
*Bus = LEGACY_INT_BUS;
*Device = LEGACY_INT_DEV;
return EFI_SUCCESS;
}
/**
Builds the PCI configuration address for the register specified by PirqNumber
@param[in] PirqNumber - The PIRQ number to build the PCI configuration address for
@return The PCI Configuration address for the PIRQ
**/
)
{
return PCI_LIB_ADDRESS(
);
}
/**
Read the given PIRQ register
@param[in] This Protocol instance pointer
@param[in] PirqNumber The Pirq register 0 = A, 1 = B etc
@param[out] PirqData Value read
@retval EFI_SUCCESS Decoding change affected.
@retval EFI_INVALID_PARAMETER Invalid PIRQ number
**/
ReadPirq (
)
{
if (PirqNumber >= MAX_PIRQ_NUMBER) {
return EFI_INVALID_PARAMETER;
}
return EFI_SUCCESS;
}
/**
Write the given PIRQ register
@param[in] This Protocol instance pointer
@param[in] PirqNumber The Pirq register 0 = A, 1 = B etc
@param[out] PirqData Value to write
@retval EFI_SUCCESS Decoding change affected.
@retval EFI_INVALID_PARAMETER Invalid PIRQ number
**/
)
{
if (PirqNumber >= MAX_PIRQ_NUMBER) {
return EFI_INVALID_PARAMETER;
}
return EFI_SUCCESS;
}
/**
Initialize Legacy Interrupt support
@retval EFI_SUCCESS Successfully initialized
**/
)
{
//
// Make sure the Legacy Interrupt Protocol is not already installed in the system
//
//
// Make a new handle and install the protocol
//
);
return Status;
}