Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="InterruptHandler"/> class.
        /// </summary>
        /// <param name="interruptManager">The interrupt manager.</param>
        /// <param name="irq">The irq.</param>
        /// <param name="hardwareDevice">The hardware device.</param>
        public InterruptHandler(InterruptManager interruptManager, byte irq, IHardwareDevice hardwareDevice)
        {
            if (hardwareDevice == null)
                HAL.Abort("hardwareDevice == null");

            this.interruptManager = interruptManager;
            this.irq = irq;
            this.hardwareDevice = hardwareDevice;
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InterruptHandler"/> class.
 /// </summary>
 /// <param name="interruptManager">The interrupt manager.</param>
 /// <param name="irq">The irq.</param>
 /// <param name="hardwareDevice">The hardware device.</param>
 public InterruptHandler(InterruptManager interruptManager, byte irq, IHardwareDevice hardwareDevice)
 {
     this.interruptManager = interruptManager;
     this.irq = irq;
     this.hardwareDevice = hardwareDevice;
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResourceManager"/> class.
 /// </summary>
 public ResourceManager()
 {
     ioPortResources = new IOPortResources();
     memoryResources = new MemoryResources();
     interruptManager = new InterruptManager();
 }
Example #4
0
        /// <summary>
        /// Initializes the Device Driver System.
        /// </summary>
        public static void Initialize()
        {
            // Create Device Manager
            deviceManager = new DeviceManager();

            // Create Interrupt Manager
            interruptManager = new InterruptManager();

            // Create the Device Driver Manager
            deviceDriverRegistry = new DeviceDriverRegistry(PlatformArchitecture.X86);

            // Create the PCI Controller Manager
            pciControllerManager = new PCIControllerManager(deviceManager);

            // Setup hardware abstraction interface
            var hardware = new Mosa.CoolWorld.x86.HAL.Hardware();

            // Set device driver system to the hardware HAL
            Mosa.HardwareSystem.HAL.SetHardwareAbstraction(hardware);

            // Set the interrupt handler
            Mosa.HardwareSystem.HAL.SetInterruptHandler(InterruptManager.ProcessInterrupt);

            partitionManager = new PartitionManager(deviceManager);
        }