TianoCore EDK2 master
|
#include "8259.h"
Go to the source code of this file.
Variables | |
EFI_LEGACY_8259_PROTOCOL | mInterrupt8259 |
EFI_HANDLE | m8259Handle = NULL |
UINT8 | mMasterBase = 0xff |
UINT8 | mSlaveBase = 0xff |
EFI_8259_MODE | mMode = Efi8259ProtectedMode |
UINT16 | mProtectedModeMask = 0xffff |
UINT16 | mLegacyModeMask |
UINT16 | mProtectedModeEdgeLevel = 0x0000 |
UINT16 | mLegacyModeEdgeLevel |
This contains the installation function for the driver.
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file 8259.c.
EFI_STATUS EFIAPI Install8259 | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
EFI_STATUS EFIAPI Interrupt8259DisableIrq | ( | IN EFI_LEGACY_8259_PROTOCOL * | This, |
IN EFI_8259_IRQ | Irq | ||
) |
EFI_STATUS EFIAPI Interrupt8259EnableIrq | ( | IN EFI_LEGACY_8259_PROTOCOL * | This, |
IN EFI_8259_IRQ | Irq, | ||
IN BOOLEAN | LevelTriggered | ||
) |
Enables the specified IRQ.
[in] | This | Indicates the EFI_LEGACY_8259_PROTOCOL instance. |
[in] | Irq | IRQ0-IRQ15. |
[in] | LevelTriggered | 0 = Edge triggered; 1 = Level triggered. |
EFI_SUCCESS | The Irq was enabled on the 8259 PIC. |
EFI_INVALID_PARAMETER | The Irq is not valid. |
EFI_STATUS EFIAPI Interrupt8259EndOfInterrupt | ( | IN EFI_LEGACY_8259_PROTOCOL * | This, |
IN EFI_8259_IRQ | Irq | ||
) |
Issues the End of Interrupt (EOI) commands to PICs.
[in] | This | Indicates the EFI_LEGACY_8259_PROTOCOL instance. |
[in] | Irq | The interrupt for which to issue the EOI command. |
EFI_SUCCESS | The EOI command was issued. |
EFI_INVALID_PARAMETER | The Irq is not valid. |
EFI_STATUS EFIAPI Interrupt8259GetInterruptLine | ( | IN EFI_LEGACY_8259_PROTOCOL * | This, |
IN EFI_HANDLE | PciHandle, | ||
OUT UINT8 * | Vector | ||
) |
Reads the PCI configuration space to get the interrupt number that is assigned to the card.
[in] | This | Indicates the EFI_LEGACY_8259_PROTOCOL instance. |
[in] | PciHandle | PCI function for which to return the vector. |
[out] | Vector | IRQ number that corresponds to the interrupt line. |
EFI_SUCCESS | The interrupt line value was read successfully. |
EFI_STATUS EFIAPI Interrupt8259GetMask | ( | IN EFI_LEGACY_8259_PROTOCOL * | This, |
OUT UINT16 *LegacyMask | OPTIONAL, | ||
OUT UINT16 *LegacyEdgeLevel | OPTIONAL, | ||
OUT UINT16 *ProtectedMask | OPTIONAL, | ||
OUT UINT16 *ProtectedEdgeLevel | OPTIONAL | ||
) |
Gets the current 16-bit real mode and 32-bit protected-mode IRQ masks.
[in] | This | Indicates the EFI_LEGACY_8259_PROTOCOL instance. |
[out] | LegacyMask | 16-bit mode interrupt mask for IRQ0-IRQ15. |
[out] | LegacyEdgeLevel | 16-bit mode edge/level mask for IRQ-IRQ15. |
[out] | ProtectedMask | 32-bit mode interrupt mask for IRQ0-IRQ15. |
[out] | ProtectedEdgeLevel | 32-bit mode edge/level mask for IRQ0-IRQ15. |
EFI_SUCCESS | The 8259 PIC was programmed successfully. |
EFI_DEVICE_ERROR | There was an error while reading the 8259 PIC. |
EFI_STATUS EFIAPI Interrupt8259GetVector | ( | IN EFI_LEGACY_8259_PROTOCOL * | This, |
IN EFI_8259_IRQ | Irq, | ||
OUT UINT8 * | Vector | ||
) |
Translates the IRQ into a vector.
[in] | This | Indicates the EFI_LEGACY_8259_PROTOCOL instance. |
[in] | Irq | IRQ0-IRQ15. |
[out] | Vector | The vector that is assigned to the IRQ. |
EFI_SUCCESS | The Vector that matches Irq was returned. |
EFI_INVALID_PARAMETER | Irq is not valid. |
Read from mask and edge/level triggered registers of master and slave PICs.
[out] | Mask | low byte for master PIC mask register, high byte for slave PIC mask register. |
[out] | EdgeLevel | low byte for master PIC edge/level triggered register, high byte for slave PIC edge/level triggered register. |
EFI_STATUS EFIAPI Interrupt8259SetMask | ( | IN EFI_LEGACY_8259_PROTOCOL * | This, |
IN UINT16 *LegacyMask | OPTIONAL, | ||
IN UINT16 *LegacyEdgeLevel | OPTIONAL, | ||
IN UINT16 *ProtectedMask | OPTIONAL, | ||
IN UINT16 *ProtectedEdgeLevel | OPTIONAL | ||
) |
Sets the current 16-bit real mode and 32-bit protected-mode IRQ masks.
[in] | This | Indicates the EFI_LEGACY_8259_PROTOCOL instance. |
[in] | LegacyMask | 16-bit mode interrupt mask for IRQ0-IRQ15. |
[in] | LegacyEdgeLevel | 16-bit mode edge/level mask for IRQ-IRQ15. |
[in] | ProtectedMask | 32-bit mode interrupt mask for IRQ0-IRQ15. |
[in] | ProtectedEdgeLevel | 32-bit mode edge/level mask for IRQ0-IRQ15. |
EFI_SUCCESS | The 8259 PIC was programmed successfully. |
EFI_DEVICE_ERROR | There was an error while writing the 8259 PIC. |
EFI_STATUS EFIAPI Interrupt8259SetMode | ( | IN EFI_LEGACY_8259_PROTOCOL * | This, |
IN EFI_8259_MODE | Mode, | ||
IN UINT16 *Mask | OPTIONAL, | ||
IN UINT16 *EdgeLevel | OPTIONAL | ||
) |
Sets the mode of the PICs.
[in] | This | Indicates the EFI_LEGACY_8259_PROTOCOL instance. |
[in] | Mode | 16-bit real or 32-bit protected mode. |
[in] | Mask | The value with which to set the interrupt mask. |
[in] | EdgeLevel | The value with which to set the edge/level mask. |
EFI_SUCCESS | The mode was set successfully. |
EFI_INVALID_PARAMETER | The mode was not set. |
EFI_STATUS EFIAPI Interrupt8259SetVectorBase | ( | IN EFI_LEGACY_8259_PROTOCOL * | This, |
IN UINT8 | MasterBase, | ||
IN UINT8 | SlaveBase | ||
) |
Sets the base address for the 8259 master and slave PICs.
[in] | This | Indicates the EFI_LEGACY_8259_PROTOCOL instance. |
[in] | MasterBase | Interrupt vectors for IRQ0-IRQ7. |
[in] | SlaveBase | Interrupt vectors for IRQ8-IRQ15. |
EFI_SUCCESS | The 8259 PIC was programmed successfully. |
EFI_DEVICE_ERROR | There was an error while writing to the 8259 PIC. |
Write to mask and edge/level triggered registers of master and slave PICs.
[in] | Mask | low byte for master PIC mask register, high byte for slave PIC mask register. |
[in] | EdgeLevel | low byte for master PIC edge/level triggered register, high byte for slave PIC edge/level triggered register. |
EFI_HANDLE m8259Handle = NULL |
EFI_LEGACY_8259_PROTOCOL mInterrupt8259 |