mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 22:12:25 +00:00
53 lines
1.7 KiB
C#
53 lines
1.7 KiB
C#
using System;
|
|
using System.Threading;
|
|
using Cosmos.Build.Windows;
|
|
using Cosmos.Hardware;
|
|
using Cosmos.Kernel;
|
|
using Cosmos.Sys;
|
|
|
|
namespace EsxTest
|
|
{
|
|
class Program
|
|
{
|
|
#region Cosmos Builder logic
|
|
// Most users wont touch this. This will call the Cosmos Build tool
|
|
[STAThread]
|
|
static void Main(string[] args)
|
|
{
|
|
BuildUI.Run();
|
|
}
|
|
|
|
#endregion
|
|
|
|
// Main entry point of the kernel
|
|
public static void Init()
|
|
{
|
|
Cosmos.Sys.Boot.Default();
|
|
PCIBus.Init();
|
|
var deviceIDs = new PCIBus.DeviceIDs();
|
|
foreach (var device in PCIBus.Devices)
|
|
{
|
|
Console.WriteLine("DeviceID: " + device.DeviceID);
|
|
Console.WriteLine("VendorID: " + device.VendorID);
|
|
if (deviceIDs.FindVendor(device.VendorID) != null)
|
|
{
|
|
Console.WriteLine("Vendor: " + deviceIDs.FindVendor(device.VendorID));
|
|
}
|
|
else
|
|
{
|
|
Console.WriteLine("Vendor: unknown");
|
|
}
|
|
Console.WriteLine("Type: " + device.HeaderType);
|
|
Console.WriteLine("IRQ: " + device.InterruptLine);
|
|
Console.WriteLine("Classcode: " + device.ClassCode);
|
|
Console.WriteLine("SubClass: " + device.SubClass);
|
|
Console.WriteLine(device.GetClassInfo());
|
|
Console.ReadLine();
|
|
}
|
|
Console.WriteLine("No more devices");
|
|
Console.WriteLine("Press Enter for Reboot");
|
|
Console.ReadLine();
|
|
Deboot.Reboot();
|
|
}
|
|
}
|
|
}
|