/// <summary> /// Setups the free memory. /// </summary> private static void SetupFreeMemory() { uint cnt = 0; if (!Multiboot.IsMultiboot()) { return; } for (uint index = 0; index < Multiboot.MemoryMapCount; index++) { uint value = (uint)Multiboot.GetMemoryMapType(index); Mosa.HelloWorld.Screen.SetCursor(22, index); Mosa.HelloWorld.Screen.Write(value); ulong start = Multiboot.GetMemoryMapBase(index); ulong size = Multiboot.GetMemoryMapLength(index); if (value == 1) { AddFreeMemory(cnt++, (uint)start, (uint)size); } } }
/// <summary> /// Main /// </summary> public static void Main() { Mosa.Kernel.x86.Kernel.Setup(); Console = ConsoleManager.Controller.Boot; Console.Clear(); IDT.SetInterruptHandler(ProcessInterrupt); Console.Color = Colors.White; Console.Goto(0, 0); Console.Color = Colors.Yellow; Console.BackgroundColor = Colors.Black; Console.Write("MOSA OS Version 1.4 '"); Console.Color = Colors.Red; Console.Write("Neptune"); Console.Color = Colors.Yellow; Console.Write("' Copyright 2008-2015"); Console.Color = 0x0F; Console.Write(new String((char)205, 60)); Console.Write((char)203); Console.Write(new String((char)205, 19)); Console.WriteLine(); Console.Goto(2, 0); Console.Color = Colors.Green; Console.Write("Multibootaddress: "); Console.Color = Colors.Gray; unsafe { Console.Write((uint)Multiboot.MultiBootInfo, 16, 8); } Console.WriteLine(); Console.Color = Colors.Green; Console.Write("Multiboot-Flags: "); Console.Color = Colors.Gray; Console.Write(Multiboot.Flags, 2, 32); Console.WriteLine(); Console.WriteLine(); Console.Color = Colors.Green; Console.Write("Size of Memory: "); Console.Color = Colors.Gray; Console.Write((Multiboot.MemoryLower + Multiboot.MemoryUpper) / 1024, 10, -1); Console.Write(" MB ("); Console.Write(Multiboot.MemoryLower + Multiboot.MemoryUpper, 10, -1); Console.Write(" KB)"); Console.WriteLine(); Console.Color = Colors.White; for (uint index = 0; index < 60; index++) { Console.Write((char)205); } Console.WriteLine(); Console.Color = Colors.Green; Console.Write("Memory-Map:"); Console.WriteLine(); for (uint index = 0; index < Multiboot.MemoryMapCount; index++) { Console.Color = Colors.White; Console.Write(Multiboot.GetMemoryMapBase(index), 16, 10); Console.Write(" - "); Console.Write(Multiboot.GetMemoryMapBase(index) + Multiboot.GetMemoryMapLength(index) - 1, 16, 10); Console.Write(" ("); Console.Color = Colors.Gray; Console.Write(Multiboot.GetMemoryMapLength(index), 16, 10); Console.Color = Colors.White; Console.Write(") "); Console.Color = Colors.Gray; Console.Write("Type: "); Console.Write(Multiboot.GetMemoryMapType(index), 16, 1); Console.WriteLine(); } Console.WriteLine(); Console.WriteLine(); Console.Color = Colors.Green; Console.Write("Smbios Info: "); if (SmbiosManager.IsAvailable) { Console.Color = Colors.White; Console.Write("["); Console.Color = Colors.Gray; Console.Write("Version "); Console.Write(SmbiosManager.MajorVersion, 10, -1); Console.Write("."); Console.Write(SmbiosManager.MinorVersion, 10, -1); Console.Color = Colors.White; Console.Write("]"); Console.WriteLine(); Console.Color = Colors.Yellow; Console.Write("[Bios]"); Console.Color = Colors.White; Console.WriteLine(); BiosInformationStructure biosInformation = new BiosInformationStructure(); Console.Color = Colors.White; Console.Write("Vendor: "); Console.Color = Colors.Gray; Console.Write(biosInformation.BiosVendor); Console.WriteLine(); Console.Color = Colors.White; Console.Write("Version: "); Console.Color = Colors.Gray; Console.Write(biosInformation.BiosVersion); Console.WriteLine(); Console.Color = Colors.White; Console.Write("Date: "); Console.Color = Colors.Gray; Console.Write(biosInformation.BiosDate); Console.Color = Colors.Yellow; Console.Row = 8; Console.Column = 35; Console.Write("[Cpu]"); Console.Color = Colors.White; Console.WriteLine(); Console.Column = 35; CpuStructure cpuStructure = new CpuStructure(); Console.Color = Colors.White; Console.Write("Vendor: "); Console.Color = Colors.Gray; Console.Write(cpuStructure.Vendor); Console.WriteLine(); Console.Column = 35; Console.Color = Colors.White; Console.Write("Version: "); Console.Color = Colors.Gray; Console.Write(cpuStructure.Version); Console.WriteLine(); Console.Column = 35; Console.Color = Colors.White; Console.Write("Socket: "); Console.Color = Colors.Gray; Console.Write(cpuStructure.Socket); Console.Write(" MHz"); Console.WriteLine(); Console.Column = 35; Console.Color = Colors.White; Console.Write("Cur. Speed: "); Console.Color = Colors.Gray; Console.Write(cpuStructure.MaxSpeed, 10, -1); Console.Write(" MHz"); Console.WriteLine(); Console.Column = 35; } else { Console.Color = Colors.Red; Console.Write("No SMBIOS available on this system!"); } Console.Goto(14, 0); Console.Color = 0x0F; for (uint index = 0; index < 60; index++) { Console.Write((char)205); } Console.WriteLine(); //CpuInfo cpuInfo = new CpuInfo(); //#region Vendor //Console.Color = Colors.Green; //Console.Write("Vendor: "); //Console.Color = Colors.White; //cpuInfo.PrintVendorString(Console); //Console.WriteLine(); //#endregion Vendor //#region Brand //Console.Color = Colors.Green; //Console.Write("Brand: "); //Console.Color = Colors.White; //cpuInfo.PrintBrandString(Console); //Console.WriteLine(); //#endregion Brand //#region Stepping //Console.Color = Colors.Green; //Console.Write("Stepping: "); //Console.Color = Colors.White; //Console.Write(cpuInfo.Stepping, 16, 2); //#endregion Stepping //#region Model //Console.Color = Colors.Green; //Console.Write(" Model: "); //Console.Color = Colors.White; //Console.Write(cpuInfo.Model, 16, 2); //#endregion Model //#region Family //Console.Color = Colors.Green; //Console.Write(" Family: "); //Console.Color = Colors.White; //Console.Write(cpuInfo.Family, 16, 2); //#endregion Family //#region Type //Console.Color = Colors.Green; //Console.Write(" Type: "); //Console.Color = Colors.White; //Console.Write(cpuInfo.Type, 16, 2); //Console.WriteLine(); //Console.Color = Colors.Green; //Console.Write("Cores: "); //Console.Color = Colors.White; //Console.Write(cpuInfo.NumberOfCores, 16, 2); //#endregion Type Console.Row = 19; for (uint index = 0; index < 80; index++) { Console.Column = index; Console.Write((char)205); } Console.Row = 23; for (uint index = 0; index < 80; index++) { Console.Column = index; Console.Write((char)205); } for (uint index = 2; index < 20; index++) { Console.Column = 60; Console.Row = index; Console.Color = Colors.White; if (index == 6) { Console.Write((char)185); } else if (index == 14) { Console.Write((char)185); } else if (index == 19) { Console.Write((char)202); } else { Console.Write((char)186); } } Console.Goto(24, 29); Console.Color = Colors.Yellow; Console.Write("www.mosa-project.org"); Console.Goto(12, 0); byte last = 0; while (true) { DisplayCMOS(); DisplayTime(); byte second = CMOS.Second; if (second % 10 != 5 & last != second) { last = CMOS.Second; DebugClient.SendAlive(); } Native.Hlt(); } }
/// <summary> /// Mains this instance. /// </summary> public static void Main() { Screen.Clear(); Screen.Color = 0x0E; Screen.SetCursor(24, 0); Screen.Write('1'); Multiboot.SetMultibootLocation(Memory.Get32(0x200004), Memory.Get32(0x200000)); // Screen.SetCursor(24, 1); Screen.Write('2'); PageFrameAllocator.Setup(); Screen.SetCursor(24, 2); Screen.Write('3'); Screen.SetCursor(24, 3); Screen.Write('4'); Screen.GotoTop(); Screen.Color = 0x0E; Screen.Write('M'); Screen.Write('O'); Screen.Write('S'); Screen.Write('A'); Screen.Write(' '); Screen.Write('O'); Screen.Write('S'); Screen.Write(' '); Screen.Write('V'); Screen.Write('e'); Screen.Write('r'); Screen.Write('s'); Screen.Write('i'); Screen.Write('o'); Screen.Write('n'); Screen.Write(' '); Screen.Write('0'); Screen.Write('.'); Screen.Write('6'); Screen.Write(' '); Screen.Write('\''); Screen.Color = 0x0C; Screen.Write('T'); Screen.Write('a'); Screen.Write('n'); Screen.Write('i'); Screen.Write('g'); Screen.Write('a'); Screen.Write('w'); Screen.Write('a'); Screen.Color = 0x0E; Screen.Write('\''); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Color = 0x0E; Screen.Write('C'); Screen.Write('o'); Screen.Write('p'); Screen.Write('y'); Screen.Write('r'); Screen.Write('i'); Screen.Write('g'); Screen.Write('h'); Screen.Write('t'); Screen.Write(' '); Screen.Write('2'); Screen.Write('0'); Screen.Write('0'); Screen.Write('8'); Screen.Write('-'); Screen.Write('2'); Screen.Write('0'); Screen.Write('0'); Screen.Write('9'); Screen.NextLine(); Screen.Color = 0x0F; for (uint index = 0; index < 80; index++) { if (index == 60) { Screen.Write((char)203); } else { Screen.Write((char)205); } } Screen.NextLine(); Screen.SetCursor(2, 0); Screen.Color = 0x0A; Screen.Write('M'); Screen.Write('u'); Screen.Write('l'); Screen.Write('t'); Screen.Write('i'); Screen.Write('b'); Screen.Write('o'); Screen.Write('o'); Screen.Write('t'); Screen.Write('a'); Screen.Write('d'); Screen.Write('d'); Screen.Write('r'); Screen.Write('e'); Screen.Write('s'); Screen.Write('s'); Screen.Write(':'); Screen.Write(' '); Screen.Color = 0x07; Screen.Write(Memory.Get32(0x200004), 16, 8); Screen.NextLine(); Screen.Color = 0x0A; Screen.Write('M'); Screen.Write('a'); Screen.Write('g'); Screen.Write('i'); Screen.Write('c'); Screen.Write(' '); Screen.Write('n'); Screen.Write('u'); Screen.Write('m'); Screen.Write('b'); Screen.Write('e'); Screen.Write('r'); Screen.Write(':'); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Color = 0x07; Screen.Write(Memory.Get32(0x200000), 16, 8); Screen.NextLine(); Screen.Color = 0x0A; Screen.Write('M'); Screen.Write('u'); Screen.Write('l'); Screen.Write('t'); Screen.Write('i'); Screen.Write('b'); Screen.Write('o'); Screen.Write('o'); Screen.Write('t'); Screen.Write('-'); Screen.Write('F'); Screen.Write('l'); Screen.Write('a'); Screen.Write('g'); Screen.Write('s'); Screen.Write(':'); Screen.Write(' '); Screen.Write(' '); Screen.Color = 0x07; Screen.Write(Multiboot.Flags, 2, 32); Screen.NextLine(); Screen.NextLine(); Screen.Color = 0x0A; Screen.Write('S'); Screen.Write('i'); Screen.Write('z'); Screen.Write('e'); Screen.Write(' '); Screen.Write('o'); Screen.Write('f'); Screen.Write(' '); Screen.Write('M'); Screen.Write('e'); Screen.Write('m'); Screen.Write('o'); Screen.Write('r'); Screen.Write('y'); Screen.Write(':'); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Color = 0x07; Screen.Write((Multiboot.MemoryLower + Multiboot.MemoryUpper) / 1024, 10, -1); Screen.Write(' '); Screen.Write('M'); Screen.Write('B'); Screen.Write(' '); Screen.Write('('); Screen.Write(Multiboot.MemoryLower + Multiboot.MemoryUpper, 10, -1); Screen.Write(' '); Screen.Write('K'); Screen.Write('B'); Screen.Write(')'); Screen.NextLine(); Screen.Color = 0x0F; for (uint index = 0; index < 60; index++) { Screen.Write((char)205); } Screen.NextLine(); Screen.Color = 0x0A; Screen.Write('M'); Screen.Write('e'); Screen.Write('m'); Screen.Write('o'); Screen.Write('r'); Screen.Write('y'); Screen.Write('-'); Screen.Write('M'); Screen.Write('a'); Screen.Write('p'); Screen.Write(':'); Screen.NextLine(); for (uint index = 0; index < (Multiboot.MemoryMapCount & 7); index++) { Screen.Color = 0x0F; Screen.Write(Multiboot.GetMemoryMapBaseLow(index), 16, 10); Screen.Write(' '); Screen.Write('-'); Screen.Write(' '); Screen.Write(Multiboot.GetMemoryMapBaseLow(index) + Multiboot.GetMemoryMapLengthLow(index), 16, 10); Screen.Write(' '); Screen.Write('('); Screen.Color = 0x07; Screen.Write(Multiboot.GetMemoryMapLengthLow(index), 16, 10); Screen.Color = 0x0F; Screen.Write(')'); Screen.Write(' '); Screen.Color = 0x07; Screen.Write('T'); Screen.Write('y'); Screen.Write('p'); Screen.Write('e'); Screen.Write(':'); Screen.Write(' '); Screen.Write(Multiboot.GetMemoryMapType(index), 16, 1); Screen.NextLine(); } Screen.Color = 0x0F; for (uint index = 0; index < 60; index++) { Screen.Write((char)205); } Screen.NextLine(); Screen.NextLine(); #region Vendor Screen.Color = 0x0A; Screen.Write('V'); Screen.Write('e'); Screen.Write('n'); Screen.Write('d'); Screen.Write('o'); Screen.Write('r'); Screen.Write(':'); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Color = 0x0F; int identifier = Platforms.x86.Native.CpuIdEbx(0); for (int i = 0; i < 4; ++i) { Screen.Write((char)((identifier >> (i * 8)) & 0xFF)); } identifier = Platforms.x86.Native.CpuIdEdx(0); for (int i = 0; i < 4; ++i) { Screen.Write((char)((identifier >> (i * 8)) & 0xFF)); } identifier = Platforms.x86.Native.CpuIdEcx(0); for (int i = 0; i < 4; ++i) { Screen.Write((char)((identifier >> (i * 8)) & 0xFF)); } Screen.NextLine(); #endregion #region Brand Screen.Color = 0x0A; Screen.Write('B'); Screen.Write('r'); Screen.Write('a'); Screen.Write('n'); Screen.Write('d'); Screen.Write(':'); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Write(' '); Screen.Color = 0x0F; PrintBrand((uint)2147483650); PrintBrand((uint)2147483651); PrintBrand((uint)2147483652); Screen.NextLine(); #endregion int info = Platforms.x86.Native.CpuIdEax(1); #region Stepping Screen.Color = 0x0A; Screen.Write('S'); Screen.Write('t'); Screen.Write('e'); Screen.Write('p'); Screen.Write('p'); Screen.Write('i'); Screen.Write('n'); Screen.Write('g'); Screen.Write(':'); Screen.Write(' '); Screen.Color = 0x0F; Screen.Write((ulong)(info & 0xF), 16, 2); #endregion #region Model Screen.Color = 0x0A; Screen.Write(' '); Screen.Write('M'); Screen.Write('o'); Screen.Write('d'); Screen.Write('e'); Screen.Write('l'); Screen.Write(':'); Screen.Write(' '); Screen.Color = 0x0F; Screen.Write((ulong)((info & 0xF0) >> 4), 16, 2); #endregion #region Family Screen.Color = 0x0A; Screen.Write(' '); Screen.Write('F'); Screen.Write('a'); Screen.Write('m'); Screen.Write('i'); Screen.Write('l'); Screen.Write('y'); Screen.Write(':'); Screen.Write(' '); Screen.Color = 0x0F; Screen.Write((ulong)((info & 0xF00) >> 8), 16, 2); #endregion #region Type Screen.Color = 0x0A; Screen.Write(' '); Screen.Write('T'); Screen.Write('y'); Screen.Write('p'); Screen.Write('e'); Screen.Write(':'); Screen.Write(' '); Screen.Color = 0x0F; Screen.Write((ulong)((info & 0x3000) >> 12), 16, 2); Screen.NextLine(); #endregion //Multiboot.Dump(4,53); Screen.Row = 23; for (uint index = 0; index < 80; index++) { Screen.Column = index; Screen.Write((char)205); } for (uint index = 2; index < 24; index++) { Screen.Column = 60; Screen.Row = index; Screen.Color = 0x0F; if (index == 7) { Screen.Write((char)185); } else if (index == 15) { Screen.Write((char)185); } else if (index == 23) { Screen.Write((char)202); } else { Screen.Write((char)186); } } Screen.SetCursor(24, 29); Screen.Color = 0x0E; Screen.Write('w'); Screen.Write('w'); Screen.Write('w'); Screen.Write('.'); Screen.Write('m'); Screen.Write('o'); Screen.Write('s'); Screen.Write('a'); Screen.Write('-'); Screen.Write('p'); Screen.Write('r'); Screen.Write('o'); Screen.Write('j'); Screen.Write('e'); Screen.Write('c'); Screen.Write('t'); Screen.Write('.'); Screen.Write('o'); Screen.Write('r'); Screen.Write('g'); while (true) { CMOS.Dump(2, 65); DisplayTime(); } }
static void SetupMemoryMap() { uint customMaps = 7; var mbMapCount = Multiboot.MemoryMapCount; BootInfo->MemoryMapLength = mbMapCount + customMaps; BootInfo->MemoryMapArray = (BootInfoMemory *)MallocBootInfoData((USize)(sizeof(MultiBootMemoryMap) * MemoryMapReserve)); for (uint i = 0; i < mbMapCount; i++) { BootInfo->MemoryMapArray[i].Start = Multiboot.GetMemoryMapBase(i); BootInfo->MemoryMapArray[i].Size = Multiboot.GetMemoryMapLength(i); var memType = BootInfoMemoryType.Reserved; var type = (BIOSMemoryMapType)Multiboot.GetMemoryMapType(i); switch (type) { case BIOSMemoryMapType.Usable: memType = BootInfoMemoryType.SystemUsable; break; case BIOSMemoryMapType.Reserved: memType = BootInfoMemoryType.Reserved; break; case BIOSMemoryMapType.ACPI_Relaimable: memType = BootInfoMemoryType.ACPI_Relaimable; break; case BIOSMemoryMapType.ACPI_NVS_Memory: memType = BootInfoMemoryType.ACPI_NVS_Memory; break; case BIOSMemoryMapType.BadMemory: memType = BootInfoMemoryType.BadMemory; break; default: memType = BootInfoMemoryType.Unknown; break; } BootInfo->MemoryMapArray[i].Type = memType; } var idx = mbMapCount + 0; BootInfo->MemoryMapArray[idx].Start = Address.OriginalKernelElfSection; BootInfo->MemoryMapArray[idx].Size = KMath.AlignValueCeil(LoaderStart.OriginalKernelElf.TotalFileSize, 0x1000); BootInfo->MemoryMapArray[idx].Type = BootInfoMemoryType.OriginalKernelElfImage; idx++; BootInfo->MemoryMapArray[idx].Start = Address.KernelElfSection; BootInfo->MemoryMapArray[idx].Size = KMath.AlignValueCeil(LoaderStart.OriginalKernelElf.TotalFileSize, 0x1000); BootInfo->MemoryMapArray[idx].Type = BootInfoMemoryType.KernelElf; idx++; BootInfo->MemoryMapArray[idx].Start = Address.KernelBootInfo; BootInfo->MemoryMapArray[idx].Size = 0x1000; BootInfo->MemoryMapArray[idx].Type = BootInfoMemoryType.BootInfoHeader; idx++; BootInfo->MemoryMapArray[idx].Start = BootInfo->HeapStart; BootInfo->MemoryMapArray[idx].Size = 0x1000; //TODO: Recaluclate after Setup all Infos BootInfo->MemoryMapArray[idx].Type = BootInfoMemoryType.BootInfoHeap; idx++; uint stackSize = 0x100000; // 1MB BootInfo->MemoryMapArray[idx].Start = Address.InitialStack - stackSize; BootInfo->MemoryMapArray[idx].Size = stackSize; BootInfo->MemoryMapArray[idx].Type = BootInfoMemoryType.InitialStack; idx++; BootInfo->MemoryMapArray[idx].Start = Address.GCInitialMemory; BootInfo->MemoryMapArray[idx].Size = Address.GCInitialMemorySize; BootInfo->MemoryMapArray[idx].Type = BootInfoMemoryType.InitialGCMemory; idx++; BootInfo->MemoryMapArray[idx].Start = 0x0; BootInfo->MemoryMapArray[idx].Size = 0xA0000; // 640 KB BootInfo->MemoryMapArray[idx].Type = BootInfoMemoryType.KernelReserved; }
/// <summary> /// Main /// </summary> public static void Main() { Kernel.x86.Kernel.Setup(); Console = ConsoleManager.Controller.Boot; Console.Clear(); Console.Goto(0, 0); IDT.SetInterruptHandler(ProcessInterrupt); Console.ScrollRow = 25; Console.Color = ScreenColor.Yellow; Console.BackgroundColor = ScreenColor.Black; Console.Write("MOSA OS Version 1.4 '"); Console.Color = ScreenColor.Red; Console.Write("Neptune"); Console.Color = ScreenColor.Yellow; Console.Write("' Copyright 2008-2018"); Console.Color = ScreenColor.White; Console.Write(new String((char)205, 60)); Console.Write((char)203); Console.Write(new String((char)205, 19)); Console.WriteLine(); Console.Goto(2, 0); Console.Color = ScreenColor.Green; Console.Write("Multibootaddress: "); Console.Color = ScreenColor.Gray; Console.Write(Multiboot.MultibootAddress, 16, 8); Console.WriteLine(); Console.Color = ScreenColor.Green; Console.Write("Multiboot-Flags: "); Console.Color = ScreenColor.Gray; Console.Write(Multiboot.Flags, 2, 32); Console.WriteLine(); Console.Color = ScreenColor.Green; Console.Write("Size of Memory: "); Console.Color = ScreenColor.Gray; Console.Write((Multiboot.MemoryLower + Multiboot.MemoryUpper) / 1024, 10, -1); Console.Write(" MB ("); Console.Write(Multiboot.MemoryLower + Multiboot.MemoryUpper, 10, -1); Console.Write(" KB)"); Console.WriteLine(); Console.WriteLine(); Console.WriteLine(); Console.Color = ScreenColor.Green; Console.Write("Smbios Info: "); if (SmbiosManager.IsAvailable) { Console.Color = ScreenColor.White; Console.Write("["); Console.Color = ScreenColor.Gray; Console.Write("Version "); Console.Write(SmbiosManager.MajorVersion, 10, -1); Console.Write("."); Console.Write(SmbiosManager.MinorVersion, 10, -1); Console.Color = ScreenColor.White; Console.Write("]"); Console.WriteLine(); Console.Color = ScreenColor.Yellow; Console.Write("[Bios]"); Console.Color = ScreenColor.White; Console.WriteLine(); var biosInformation = new BiosInformationStructure(); Console.Color = ScreenColor.White; Console.Write("Vendor: "); Console.Color = ScreenColor.Gray; Console.Write(biosInformation.BiosVendor); Console.WriteLine(); Console.Color = ScreenColor.White; Console.Write("Version: "); Console.Color = ScreenColor.Gray; Console.Write(biosInformation.BiosVersion); Console.WriteLine(); Console.Color = ScreenColor.White; Console.Write("Date: "); Console.Color = ScreenColor.Gray; Console.Write(biosInformation.BiosDate); Console.Color = ScreenColor.Yellow; Console.Row = 8; Console.Column = 35; Console.Write("[Cpu]"); Console.Color = ScreenColor.White; Console.WriteLine(); Console.Column = 35; var cpuStructure = new CpuStructure(); Console.Color = ScreenColor.White; Console.Write("Vendor: "); Console.Color = ScreenColor.Gray; Console.Write(cpuStructure.Vendor); Console.WriteLine(); Console.Column = 35; Console.Color = ScreenColor.White; Console.Write("Version: "); Console.Color = ScreenColor.Gray; Console.Write(cpuStructure.Version); Console.WriteLine(); Console.Column = 35; Console.Color = ScreenColor.White; Console.Write("Socket: "); Console.Color = ScreenColor.Gray; Console.Write(cpuStructure.Socket); Console.Write(" MHz"); Console.WriteLine(); Console.Column = 35; Console.Color = ScreenColor.White; Console.Write("Cur. Speed: "); Console.Color = ScreenColor.Gray; Console.Write(cpuStructure.MaxSpeed, 10, -1); Console.Write(" MHz"); Console.WriteLine(); Console.Column = 35; } else { Console.Color = ScreenColor.Red; Console.Write("No SMBIOS available on this system!"); } Console.WriteLine(); Console.WriteLine(); Console.Color = ScreenColor.Green; Console.Write("Memory-Map:"); Console.WriteLine(); for (uint index = 0; index < Multiboot.MemoryMapCount; index++) { Console.Color = ScreenColor.White; Console.Write(Multiboot.GetMemoryMapBase(index), 16, 8); Console.Write(" - "); Console.Write(Multiboot.GetMemoryMapBase(index) + Multiboot.GetMemoryMapLength(index) - 1, 16, 8); Console.Write(" ("); Console.Color = ScreenColor.Gray; Console.Write(Multiboot.GetMemoryMapLength(index), 16, 8); Console.Color = ScreenColor.White; Console.Write(") "); Console.Color = ScreenColor.Gray; Console.Write("Type: "); Console.Write(Multiboot.GetMemoryMapType(index), 16, 1); Console.WriteLine(); } Console.Color = ScreenColor.Yellow; Console.Goto(24, 29); Console.Write("www.mosa-project.org"); // Borders Console.Color = ScreenColor.White; for (uint index = 0; index < 60; index++) { Console.Goto(14, index); Console.Write((char)205); } for (uint index = 0; index < 60; index++) { Console.Goto(6, index); Console.Write((char)205); } for (uint index = 60; index < 80; index++) { Console.Goto(19, index); Console.Write((char)205); } for (uint index = 0; index < 80; index++) { Console.Goto(23, index); Console.Write((char)205); } for (uint index = 2; index < 20; index++) { Console.Goto(index, 60); if (index == 6) { Console.Write((char)185); } else if (index == 14) { Console.Write((char)185); } else if (index == 19) { Console.Write((char)200); } else { Console.Write((char)186); } } Console.Goto(12, 0); while (true) { DisplayCMOS(); DisplayTime(); Native.Hlt(); } }