mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-13 19:52:25 +00:00
Done bootstrap API
This commit is contained in:
parent
83b274f08e
commit
11d5dbe5c7
1 changed files with 22 additions and 0 deletions
|
|
@ -1,23 +1,45 @@
|
|||
namespace Cosmos.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Bootstrap class. Used to invoke pre-boot methods.
|
||||
/// </summary>
|
||||
/// <remarks>Bootstrap is a class designed only to get the essentials done.</remarks>
|
||||
public unsafe static class Bootstrap
|
||||
{
|
||||
// See note in Global - these are a "hack" for now so
|
||||
// we dont force static init of Global, and it "pulls" these later till
|
||||
// we eventually eliminate them
|
||||
/// <summary>
|
||||
/// PIC interrupt.
|
||||
/// </summary>
|
||||
static public PIC PIC;
|
||||
// Has to be static for now, ZeroFill gets called before the Init.
|
||||
/// <summary>
|
||||
/// CPU.
|
||||
/// </summary>
|
||||
static public readonly CPU CPU = new CPU();
|
||||
|
||||
/// <summary>
|
||||
/// Multiboot header pointer.
|
||||
/// </summary>
|
||||
public static Multiboot.Header* header;
|
||||
|
||||
/// <summary>
|
||||
/// VBE mode info pointer.
|
||||
/// </summary>
|
||||
public static VBE.ModeInfo* modeinfo;
|
||||
/// <summary>
|
||||
/// VBE controller info pointer.
|
||||
/// </summary>
|
||||
public static VBE.ControllerInfo* controllerinfo;
|
||||
|
||||
// Bootstrap is a class designed only to get the essentials done.
|
||||
// ie the stuff needed to "pre boot". Do only the very minimal here.
|
||||
// IDT, PIC, and Float
|
||||
// Note: This is changing a bit GDT (already) and IDT are moving to a real preboot area.
|
||||
/// <summary>
|
||||
/// Init the boot strap. Invoke pre-boot methods.
|
||||
/// </summary>
|
||||
public static void Init()
|
||||
{
|
||||
// Drag this stuff in to the compiler manually until we add the always include attrib
|
||||
|
|
|
|||
Loading…
Reference in a new issue