Beispiel #1
0
        static public void Init(TextScreenBase textScreen)
        {
            if (textScreen != null)
            {
                TextScreen = textScreen;
            }

            mDebugger.Send("Before Core.Global.Init");
            Core.Global.Init();

            //TODO Redo this - Global init should be other.
            // Move PCI detection to hardware? Or leave it in core? Is Core PC specific, or deeper?
            // If we let hardware do it, we need to protect it from being used by System.
            // Probably belongs in hardware, and core is more specific stuff like CPU, memory, etc.
            //Core.PCI.OnPCIDeviceFound = PCIDeviceFound;

            //TODO: Since this is FCL, its "common". Otherwise it should be
            // system level and not accessible from Core. Need to think about this
            // for the future.

            Console.WriteLine("Finding PCI Devices");
            mDebugger.Send("PCI Devices");
            PCI.Setup();

            Console.WriteLine("Starting ACPI");
            mDebugger.Send("ACPI Init");
            ACPI.Start();

            IDE.InitDriver();
            AHCI.InitDriver();
            //EHCI.InitDriver();

            mDebugger.Send("Done initializing Cosmos.HAL.Global");
        }
Beispiel #2
0
        // TODO: continue adding exceptions to the list, as HAL and Core would be documented.
        /// <summary>
        /// Init <see cref="Global"/> instance.
        /// </summary>
        /// <param name="textScreen">Text screen.</param>
        /// <exception cref="System.IO.IOException">Thrown on IO error.</exception>
        static public void Init(TextScreenBase textScreen)
        {
            if (textScreen != null)
            {
                TextScreen = textScreen;
            }

            mDebugger.Send("Before Core.Global.Init");
            Core.Global.Init();

            //TODO Redo this - Global init should be other.
            // Move PCI detection to hardware? Or leave it in core? Is Core PC specific, or deeper?
            // If we let hardware do it, we need to protect it from being used by System.
            // Probably belongs in hardware, and core is more specific stuff like CPU, memory, etc.
            //Core.PCI.OnPCIDeviceFound = PCIDeviceFound;

            //TODO: Since this is FCL, its "common". Otherwise it should be
            // system level and not accessible from Core. Need to think about this
            // for the future.
            Console.Clear();
            Console.WriteLine("Finding PCI Devices");
            mDebugger.Send("PCI Devices");
            PCI.Setup();

            Console.WriteLine("Starting ACPI");
            mDebugger.Send("ACPI Init");
            ACPI.Start();

            // http://wiki.osdev.org/%228042%22_PS/2_Controller#Initialising_the_PS.2F2_Controller
            // TODO: USB should be initialized before the PS/2 controller
            // TODO: ACPI should be used to check if a PS/2 controller exists
            mDebugger.Send("PS/2 Controller Init");
            PS2Controller.Initialize();

            IDE.InitDriver();
            AHCI.InitDriver();
            //EHCI.InitDriver();

            mDebugger.Send("Network Devices Init");
            NetworkInit.Init();

            mDebugger.Send("Done initializing Cosmos.HAL.Global");
        }