Beispiel #1
0
        public static void Setup()
        {
            GDTTable = new GDTTable(PhysicalPageAllocator.ReservePage());

            PageDirectory = PhysicalPageAllocator.ReservePage();

            Console.Write("D");
            PageTables = PhysicalPageAllocator.ReservePages(1024);
            Console.Write("E");
        }
Beispiel #2
0
        public static void Setup()
        {
            Console.Write("A");

            GDTTable = new GDTTable(PhysicalPageAllocator.ReservePage());
            Console.Write("B");
            PageDirectory = PhysicalPageAllocator.ReservePage();
            Console.Write("C");
            PageTables = PhysicalPageAllocator.ReservePages(Page.Size * 1024);
            Console.Write("D");
        }
Beispiel #3
0
        private static void Main()
        {
            Emulate.Multiboot.Setup(128 * 1024 * 1024);             // 128 MB

            Boot.EntryPoint();

            var page1 = PhysicalPageAllocator.ReservePages(1, 0);

            System.Console.WriteLine($"Page: {page1.ToInt32()}");

            var page2 = PhysicalPageAllocator.ReservePages(65, 0);

            System.Console.WriteLine($"Page: {page2.ToInt32()}");

            var page3 = PhysicalPageAllocator.ReservePages(1, 0);

            System.Console.WriteLine($"Page: {page3.ToInt32()}");

            return;
        }
Beispiel #4
0
 public static void Setup()
 {
     GDTTable      = new GDTTable(PhysicalPageAllocator.ReservePage());
     PageDirectory = PhysicalPageAllocator.ReservePage();
     PageTables    = PhysicalPageAllocator.ReservePages(Page.Size * 1024);
 }
Beispiel #5
0
        private static void Main()
        {
            Emulate.Multiboot.Setup(128 * 1024 * 1024);             // 128 MB

            Boot.PlatformInitialization();

            Boot.GarbageCollectionInitialization();

            Boot.EntryPoint();

            Console.WriteLine();

            Pointer page;

            page = PhysicalPageAllocator.ReservePages(1, 0);
            Console.WriteLine($"Page:  0x{page.ToInt32():X8} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(64, 0);
            Console.WriteLine($"Page:  0x{page.ToInt32():X8} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(1, 0);
            Console.WriteLine($"Page:  0x{page.ToInt32():X8} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(1, 0);
            Console.WriteLine($"Page:  0x{page.ToInt32():X8} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(1, 0);
            Console.WriteLine($"Page:  0x{page.ToInt32():X8} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(1, 0);
            Console.WriteLine($"Page:  0x{page.ToInt32():X8} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(1, 0);
            Console.WriteLine($"Page: {page.ToInt32()} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(1, 0);
            Console.WriteLine($"Page: {page.ToInt32()} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(1, 0);
            Console.WriteLine($"Page: {page.ToInt32()} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(1, 0);
            Console.WriteLine($"Page: {page.ToInt32()} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(1, 0);
            Console.WriteLine($"Page: {page.ToInt32()} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(2, 0);
            Console.WriteLine($"Page: {page.ToInt32()} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(4, 0);
            Console.WriteLine($"Page: {page.ToInt32()} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(8, 0);
            Console.WriteLine($"Page: {page.ToInt32()} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(16, 0);
            Console.WriteLine($"Page: {page.ToInt32()} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(32, 0);
            Console.WriteLine($"Page: {page.ToInt32()} {page.ToInt32() / Page.Size}");

            page = PhysicalPageAllocator.ReservePages(1, 0);
            Console.WriteLine($"Page: {page.ToInt32()} {page.ToInt32() / Page.Size}");

            return;
        }