/////////////////////////////////////////////////////////////////////////////// // // Microsoft Research Singularity // // Copyright (c) Microsoft Corporation. All rights reserved. // // File: HalPic.cs // // Note: // // This file is an implementation of Interfaces/Hal/HalPic.csi // using System; using System.Collections; using System.Runtime.CompilerServices; using System.Threading; namespace Microsoft.Singularity.Hal { public class HalPic { private Pic pic; internal HalPic(Pic thePic) { this.pic = thePic; } /// /// Maximum valid IRQ property. On legacy PC systems this value is /// 15. On APIC PC systems this number will usually be larger. /// public byte MaximumIrq { [NoHeapAllocation] get { return pic.MaximumIrq; } } /// /// Convert interrupt vector to interrupt request line. /// [NoHeapAllocation] public byte InterruptToIrq(byte interrupt) { return pic.InterruptToIrq(interrupt); } /// /// Convert interrupt request line to interrupt vector. /// [NoHeapAllocation] public byte IrqToInterrupt(byte irq) { return pic.IrqToInterrupt(irq); } /// /// Acknowledge the interrupt request. (EOI) /// [NoHeapAllocation] public void AckIrq(byte irq) { pic.AckIrq(irq); } /// /// Enable interrupt request by removing mask. /// [NoHeapAllocation] public void EnableIrq(byte irq) { pic.EnableIrq(irq); } /// /// Disable interrupt request by applying mask. /// [NoHeapAllocation] public void DisableIrq(byte irq) { pic.DisableIrq(irq); } /// /// Acknowledge and mask interrupt. /// [NoHeapAllocation] public void ClearInterrupt(byte interrupt) { pic.ClearInterrupt(interrupt); } } } // namespace Microsoft.Singularity.Hal