X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=PcAtChipsetPkg%2F8259InterruptControllerDxe%2F8259.h;h=0d4c1e8223540244169c0cb1425ae45c2e04356a;hp=f77494c946faf90ce3ea58eb60971e999b804789;hb=e78aab9d2f1423f2ec4a82e0e36eff4dfd7c56ea;hpb=c9b1a9df152050dd17eda4f844386b11211e29e1
diff --git a/PcAtChipsetPkg/8259InterruptControllerDxe/8259.h b/PcAtChipsetPkg/8259InterruptControllerDxe/8259.h
index f77494c946..0d4c1e8223 100644
--- a/PcAtChipsetPkg/8259InterruptControllerDxe/8259.h
+++ b/PcAtChipsetPkg/8259InterruptControllerDxe/8259.h
@@ -1,20 +1,14 @@
-/**
-
-Copyright (c) 2005, Intel Corporation
-All rights reserved. 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
-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.
-
-Module Name:
- 8259.h
+/** @file
+ Driver implementing the Tiano Legacy 8259 Protocol
-Abstract:
+Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.
+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
+http://opensource.org/licenses/bsd-license.php.
- Driver implementing the Tiano Legacy 8259 Protocol
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -24,14 +18,18 @@ Abstract:
#include
#include
+#include
#include
#include
#include
+#include
+#include
+
+#include
-//
// 8259 Hardware definitions
-//
+
#define LEGACY_MODE_BASE_VECTOR_MASTER 0x08
#define LEGACY_MODE_BASE_VECTOR_SLAVE 0x70
@@ -47,247 +45,182 @@ Abstract:
#define LEGACY_8259_EOI 0x20
-//
// Protocol Function Prototypes
-//
-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.
-Routine Description:
+ @param[in] This Indicates the EFI_LEGACY_8259_PROTOCOL instance.
+ @param[in] MasterBase Interrupt vectors for IRQ0-IRQ7.
+ @param[in] SlaveBase Interrupt vectors for IRQ8-IRQ15.
- TODO: Add function description
+ @retval EFI_SUCCESS The 8259 PIC was programmed successfully.
+ @retval EFI_DEVICE_ERROR There was an error while writing to the 8259 PIC.
-Arguments:
+**/
+EFI_STATUS
+EFIAPI
+Interrupt8259SetVectorBase (
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN UINT8 MasterBase,
+ IN UINT8 SlaveBase
+ );
- This - TODO: add argument description
- MasterBase - TODO: add argument description
- SlaveBase - TODO: add argument description
+/**
+ Gets the current 16-bit real mode and 32-bit protected-mode IRQ masks.
-Returns:
+ @param[in] This Indicates the EFI_LEGACY_8259_PROTOCOL instance.
+ @param[out] LegacyMask 16-bit mode interrupt mask for IRQ0-IRQ15.
+ @param[out] LegacyEdgeLevel 16-bit mode edge/level mask for IRQ-IRQ15.
+ @param[out] ProtectedMask 32-bit mode interrupt mask for IRQ0-IRQ15.
+ @param[out] ProtectedEdgeLevel 32-bit mode edge/level mask for IRQ0-IRQ15.
- TODO: add return values
+ @retval EFI_SUCCESS The 8259 PIC was programmed successfully.
+ @retval EFI_DEVICE_ERROR There was an error while reading the 8259 PIC.
**/
-;
-
EFI_STATUS
EFIAPI
Interrupt8259GetMask (
- IN EFI_LEGACY_8259_PROTOCOL * This,
+ IN EFI_LEGACY_8259_PROTOCOL *This,
OUT UINT16 *LegacyMask, OPTIONAL
OUT UINT16 *LegacyEdgeLevel, OPTIONAL
OUT UINT16 *ProtectedMask, OPTIONAL
OUT UINT16 *ProtectedEdgeLevel OPTIONAL
- )
-/**
-
-Routine Description:
-
- TODO: Add function description
+ );
-Arguments:
-
- This - TODO: add argument description
- LegacyMask - TODO: add argument description
- LegacyEdgeLevel - TODO: add argument description
- ProtectedMask - TODO: add argument description
- ProtectedEdgeLevel - TODO: add argument description
+/**
+ Sets the current 16-bit real mode and 32-bit protected-mode IRQ masks.
-Returns:
+ @param[in] This Indicates the EFI_LEGACY_8259_PROTOCOL instance.
+ @param[in] LegacyMask 16-bit mode interrupt mask for IRQ0-IRQ15.
+ @param[in] LegacyEdgeLevel 16-bit mode edge/level mask for IRQ-IRQ15.
+ @param[in] ProtectedMask 32-bit mode interrupt mask for IRQ0-IRQ15.
+ @param[in] ProtectedEdgeLevel 32-bit mode edge/level mask for IRQ0-IRQ15.
- TODO: add return values
+ @retval EFI_SUCCESS The 8259 PIC was programmed successfully.
+ @retval EFI_DEVICE_ERROR There was an error while writing the 8259 PIC.
**/
-;
-
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
- )
-/**
-
-Routine Description:
-
- TODO: Add function description
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN UINT16 *LegacyMask, OPTIONAL
+ IN UINT16 *LegacyEdgeLevel, OPTIONAL
+ IN UINT16 *ProtectedMask, OPTIONAL
+ IN UINT16 *ProtectedEdgeLevel OPTIONAL
+ );
-Arguments:
-
- This - TODO: add argument description
- LegacyMask - TODO: add argument description
- LegacyEdgeLevel - TODO: add argument description
- ProtectedMask - TODO: add argument description
- ProtectedEdgeLevel - TODO: add argument description
+/**
+ Sets the mode of the PICs.
-Returns:
+ @param[in] This Indicates the EFI_LEGACY_8259_PROTOCOL instance.
+ @param[in] Mode 16-bit real or 32-bit protected mode.
+ @param[in] Mask The value with which to set the interrupt mask.
+ @param[in] EdgeLevel The value with which to set the edge/level mask.
- TODO: add return values
+ @retval EFI_SUCCESS The mode was set successfully.
+ @retval EFI_INVALID_PARAMETER The mode was not set.
**/
-;
-
EFI_STATUS
EFIAPI
Interrupt8259SetMode (
- IN EFI_LEGACY_8259_PROTOCOL * This,
- IN EFI_8259_MODE Mode,
- IN UINT16 *Mask, OPTIONAL
- IN UINT16 *EdgeLevel OPTIONAL
- )
-/**
-
-Routine Description:
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN EFI_8259_MODE Mode,
+ IN UINT16 *Mask, OPTIONAL
+ IN UINT16 *EdgeLevel OPTIONAL
+ );
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Mode - TODO: add argument description
- Mask - TODO: add argument description
- EdgeLevel - TODO: add argument description
+/**
+ Translates the IRQ into a vector.
-Returns:
+ @param[in] This Indicates the EFI_LEGACY_8259_PROTOCOL instance.
+ @param[in] Irq IRQ0-IRQ15.
+ @param[out] Vector The vector that is assigned to the IRQ.
- TODO: add return values
+ @retval EFI_SUCCESS The Vector that matches Irq was returned.
+ @retval EFI_INVALID_PARAMETER Irq is not valid.
**/
-;
-
EFI_STATUS
EFIAPI
Interrupt8259GetVector (
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_IRQ Irq,
OUT UINT8 *Vector
- )
-/**
-
-Routine Description:
-
- TODO: Add function description
+ );
-Arguments:
-
- This - TODO: add argument description
- Irq - TODO: add argument description
- Vector - TODO: add argument description
+/**
+ Enables the specified IRQ.
-Returns:
+ @param[in] This Indicates the EFI_LEGACY_8259_PROTOCOL instance.
+ @param[in] Irq IRQ0-IRQ15.
+ @param[in] LevelTriggered 0 = Edge triggered; 1 = Level triggered.
- TODO: add return values
+ @retval EFI_SUCCESS The Irq was enabled on the 8259 PIC.
+ @retval EFI_INVALID_PARAMETER The Irq is not valid.
**/
-;
-
EFI_STATUS
EFIAPI
Interrupt8259EnableIrq (
- IN EFI_LEGACY_8259_PROTOCOL *This,
- IN EFI_8259_IRQ Irq,
- IN BOOLEAN LevelTriggered
- )
-/**
-
-Routine Description:
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN EFI_8259_IRQ Irq,
+ IN BOOLEAN LevelTriggered
+ );
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Irq - TODO: add argument description
- LevelTriggered - TODO: add argument description
+/**
+ Disables the specified IRQ.
-Returns:
+ @param[in] This Indicates the EFI_LEGACY_8259_PROTOCOL instance.
+ @param[in] Irq IRQ0-IRQ15.
- TODO: add return values
+ @retval EFI_SUCCESS The Irq was disabled on the 8259 PIC.
+ @retval EFI_INVALID_PARAMETER The Irq is not valid.
**/
-;
-
EFI_STATUS
EFIAPI
Interrupt8259DisableIrq (
- IN EFI_LEGACY_8259_PROTOCOL *This,
- IN EFI_8259_IRQ Irq
- )
-/**
-
-Routine Description:
-
- TODO: Add function description
+ IN EFI_LEGACY_8259_PROTOCOL *This,
+ IN EFI_8259_IRQ Irq
+ );
-Arguments:
-
- This - TODO: add argument description
- Irq - TODO: add argument description
+/**
+ Reads the PCI configuration space to get the interrupt number that is assigned to the card.
-Returns:
+ @param[in] This Indicates the EFI_LEGACY_8259_PROTOCOL instance.
+ @param[in] PciHandle PCI function for which to return the vector.
+ @param[out] Vector IRQ number that corresponds to the interrupt line.
- TODO: add return values
+ @retval EFI_SUCCESS The interrupt line value was read successfully.
**/
-;
-
EFI_STATUS
EFIAPI
Interrupt8259GetInterruptLine (
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_HANDLE PciHandle,
OUT UINT8 *Vector
- )
-/**
-
-Routine Description:
+ );
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- PciHandle - TODO: add argument description
- Vector - TODO: add argument description
+/**
+ Issues the End of Interrupt (EOI) commands to PICs.
-Returns:
+ @param[in] This Indicates the EFI_LEGACY_8259_PROTOCOL instance.
+ @param[in] Irq The interrupt for which to issue the EOI command.
- TODO: add return values
+ @retval EFI_SUCCESS The EOI command was issued.
+ @retval EFI_INVALID_PARAMETER The Irq is not valid.
**/
-;
-
EFI_STATUS
EFIAPI
Interrupt8259EndOfInterrupt (
IN EFI_LEGACY_8259_PROTOCOL *This,
IN EFI_8259_IRQ Irq
- )
-/**
-
-Routine Description:
-
- TODO: Add function description
-
-Arguments:
-
- This - TODO: add argument description
- Irq - TODO: add argument description
-
-Returns:
-
- TODO: add return values
-
-**/
-;
+ );
#endif