Cosmos/source2/Kernel/System/Hardware/Cosmos.Hardware/Global.cs
kudzu_cp 4830098551
2010-08-28 13:06:50 +00:00

37 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.Hardware {
static public class Global {
static readonly public Cosmos.Debug.Kernel.Debugger Dbg = new Cosmos.Debug.Kernel.Debugger("Hardware", "");
static public Keyboard Keyboard;
//static public PIT PIT = new PIT();
static public TextScreen TextScreen;
static public ATA ATA1;
static public void Init() {
// DANGER! This is before heap? Yet somehow its working currently...
// Leaving it for now because Core.Init outputs to Console, but we need
// to change this...
TextScreen = new TextScreen();
Global.Dbg.Send("Cosmos.Hardware.Global.Init");
Core.PciBus.OnPCIDeviceFound = PCIDeviceFound;
Cosmos.Core.Global.Init();
Keyboard = new Keyboard();
//ATA1.Test();
}
static void PCIDeviceFound(Core.PciBus.PciInfo aInfo, Core.IOGroup.PciDevice aIO) {
// Later we need to dynamically load these, but we need to finish the design first.
if ((aInfo.VendorID == 0x8086) && (aInfo.DeviceID == 0x7111)) {
//ATA1 = new ATA(Core.Global.BaseIOGroups.ATA1);
}
}
}
}