Пример #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");
        }
Пример #2
0
        static public void Init(TextScreenBase textScreen, Keyboard keyboard)
        {
            if (textScreen != null)
            {
                TextScreen = textScreen;
            }
            if (keyboard == null)
            {
                Core.Global.Dbg.Send("No keyboard specified!");
                Keyboard = new PS2Keyboard();
            }
            else
            {
                Keyboard = keyboard;
            }
            Global.Dbg.Send("Before Core.Global.Init");
            Core.Global.Init();
            Global.Dbg.Send("Static Devices");
            InitStaticDevices();
            Global.Dbg.Send("PCI Devices");
            InitPciDevices();
            Global.Dbg.Send("Done initializing Cosmos.HAL.Global");

            Global.Dbg.Send("ATA Primary Master");
            InitAta(BlockDevice.Ata.ControllerIdEnum.Primary, BlockDevice.Ata.BusPositionEnum.Master);

            //TODO Need to change code to detect if ATA controllers are present or not. How to do this? via PCI enum?
            // They do show up in PCI space as well as the fixed space.
            // Or is it always here, and was our compiler stack corruption issue?
            Global.Dbg.Send("ATA Secondary Master");
            InitAta(BlockDevice.Ata.ControllerIdEnum.Secondary, BlockDevice.Ata.BusPositionEnum.Master);
            //InitAta(BlockDevice.Ata.ControllerIdEnum.Secondary, BlockDevice.Ata.BusPositionEnum.Slave);
        }
Пример #3
0
        public static void Init(TextScreenBase textScreen, Keyboard keyboard)
        {
            if (textScreen != null)
              {
            TextScreen = textScreen;
              }
              if (keyboard == null)
              {
            mDebugger.Send("No keyboard specified!");
            throw new SystemException("No keyboard specified!");
              }
              else
              {
            Keyboard = keyboard;
              }
              mDebugger.Send("Before Core.Global.Init");
              Core.Global.Init();
              mDebugger.Send("Static Devices");
              InitStaticDevices();
              mDebugger.Send("PCI Devices");
              InitPciDevices();
              mDebugger.Send("Done initializing Cosmos.HAL.Global");

              mDebugger.Send("ATA Primary Master");
              InitAta(Ata.ControllerIdEnum.Primary, Ata.BusPositionEnum.Master);

              //TODO Need to change code to detect if ATA controllers are present or not. How to do this? via PCI enum?
              // They do show up in PCI space as well as the fixed space.
              // Or is it always here, and was our compiler stack corruption issue?
              mDebugger.Send("ATA Secondary Master");
              InitAta(Ata.ControllerIdEnum.Secondary, Ata.BusPositionEnum.Master);
              //InitAta(BlockDevice.Ata.ControllerIdEnum.Secondary, BlockDevice.Ata.BusPositionEnum.Slave);
        }
Пример #4
0
        static public void Init(TextScreenBase textScreen)
        {
            if (textScreen != null)
            {
                TextScreen = textScreen;
            }

            mDebugger.Send("Before Core.Global.Init");
            Core.Global.Init();
            mDebugger.Send("Static Devices");
            InitStaticDevices();
            mDebugger.Send("PCI Devices");
            InitPciDevices();
            mDebugger.Send("ACPI Init");
            StartACPI();
            mDebugger.Send("Done initializing Cosmos.HAL.Global");

            mDebugger.Send("ATA Primary Master");
            InitAta(Ata.ControllerIdEnum.Primary, Ata.BusPositionEnum.Master);

            //TODO Need to change code to detect if ATA controllers are present or not. How to do this? via PCI enum?
            // They do show up in PCI space as well as the fixed space.
            // Or is it always here, and was our compiler stack corruption issue?
            mDebugger.Send("ATA Secondary Master");
            InitAta(Ata.ControllerIdEnum.Secondary, Ata.BusPositionEnum.Master);
            //InitAta(BlockDevice.Ata.ControllerIdEnum.Secondary, BlockDevice.Ata.BusPositionEnum.Slave);

            InitMultitasking();
        }
Пример #5
0
 public Console(TextScreenBase textScreen)
 {
     if (textScreen == null)
     {
         mText = new TextScreen();
     }
     else
     {
         mText = textScreen;
     }
 }
Пример #6
0
 public VGAConsole(TextScreenBase textScreen)
 {
     Name = "VGA Textmode";
     //Kernel.debugger.Send("VGA Textmode Class");
     if (textScreen == null)
     {
         mText = new TextScreen();
     }
     else
     {
         mText = textScreen;
     }
 }
Пример #7
0
    static public void Init(TextScreenBase textScreen, Keyboard keyboard){
      // We must init Console before calling Inits. This is part of the
      // "minimal" boot to allow output
      Global.Dbg.Send("Creating Console");
      if (textScreen != null)
      {
        Console = new Console(textScreen);
      }

      Global.Dbg.Send("HW Init");
      Cosmos.HAL.Global.Init(textScreen, keyboard);
      //Network.NetworkStack.Init();
    }
Пример #8
0
 static public void Init(TextScreenBase textScreen)
 {
     if (textScreen != null)
     {
         TextScreen = textScreen;
     }
     Core.Bootstrap.Init();
     Core.Global.Init();
     Global.Dbg.Send("Static Devices");
     InitStaticDevices();
     Global.Dbg.Send("PCI Devices");
     InitPciDevices();
 }
Пример #9
0
 public static void Init(TextScreenBase textScreen, Keyboard keyboard)
 {
     if (textScreen != null)
     {
         TextScreen = textScreen;
     }
     if (keyboard != null)
     {
         Keyboard = keyboard;
     }
     Core.Bootstrap.Init();
     Core.Global.Init();
     Global.Dbg.Send("Static Devices");
     InitStaticDevices();
     Global.Dbg.Send("PCI Devices");
     InitPciDevices();
 }
Пример #10
0
        public static void Init(TextScreenBase textScreen, Keyboard keyboard)
        {
            // We must init Console before calling Inits.
            // This is part of the "minimal" boot to allow output.
            mDebugger.Send("Creating Console");
            if (textScreen != null)
            {
                Console = new Console(textScreen);
            }

            mDebugger.Send("HW Init");
            HAL.Global.Init(textScreen, keyboard);
            NumLock = false;
            CapsLock = false;
            ScrollLock = false;
            //Network.NetworkStack.Init();
        }
Пример #11
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");
        }
Пример #12
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();

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

            mDebugger.Send("ATA Primary Master");
            InitAta(Ata.ControllerIdEnum.Primary, Ata.BusPositionEnum.Master);

            //TODO Need to change code to detect if ATA controllers are present or not. How to do this? via PCI enum?
            // They do show up in PCI space as well as the fixed space.
            // Or is it always here, and was our compiler stack corruption issue?
            mDebugger.Send("ATA Secondary Master");
            InitAta(Ata.ControllerIdEnum.Secondary, Ata.BusPositionEnum.Master);
            //InitAta(BlockDevice.Ata.ControllerIdEnum.Secondary, BlockDevice.Ata.BusPositionEnum.Slave);
        }
Пример #13
0
 static public void Init(TextScreenBase textScreen, Keyboard keyboard)
 {
   if (textScreen != null)
   {
     TextScreen = textScreen;
   }
   if (keyboard != null)
   {
       Keyboard = keyboard;
   }
   Core.Bootstrap.Init();
   Core.Global.Init();
   Global.Dbg.Send("Static Devices");
   InitStaticDevices();
   Global.Dbg.Send("PCI Devices");
   InitPciDevices();
 }