/// <summary> /// Video Stage /// </summary> public static unsafe void InitFrameBuffer() { if (!BootInfo.Header->FBPresent || BootInfo.Header->VBEMode < 0x100) { KernelMessage.Path("fb", "not present"); return; } KernelMessage.WriteLine("InitFrameBuffer"); Fb = new FrameBuffer(BootInfo.Header->FbInfo.FbAddr, BootInfo.Header->FbInfo.FbWidth, BootInfo.Header->FbInfo.FbHeight, BootInfo.Header->FbInfo.FbPitch, 8); Fb.Init(); FrameBufferTextScreen = new FrameBufferTextScreenDevice(Fb); Console.SetOutputDevice(FrameBufferTextScreen); }
/// <summary> /// Video Stage /// </summary> public static unsafe void InitFrameBuffer() { if (!BootInfo.Header->FBPresent || BootInfo.Header->VBEMode < 0x100) { KernelMessage.Path("fb", "not present"); return; } KernelMessage.WriteLine("InitFrameBuffer"); Fb = new FrameBuffer(ref BootInfo.Header->FbInfo); for (uint at = Fb.Addr; at < Fb.Addr + Fb.MemorySize; at += 4096) { PageTable.KernelTable.MapVirtualAddressToPhysical(at, at); } PageTable.KernelTable.Flush(); FrameBufferTextScreen = new FrameBufferTextScreenDevice(Fb); Console.SetOutputDevice(FrameBufferTextScreen); }