Lines Matching refs:gKernelArgs
130 if (!get_free_address_range(gKernelArgs.physical_allocated_range, in allocate_physical()
131 gKernelArgs.num_physical_allocated_ranges, base, size, &base)) { in allocate_physical()
178 if (gKernelArgs.arch_args.num_pgtables == MAX_BOOT_PTABLES) { in add_page_table()
195 gKernelArgs.arch_args.pgtables[gKernelArgs.arch_args.num_pgtables++] in add_page_table()
207 if (base > gKernelArgs.arch_args.virtual_end) in add_page_table()
208 gKernelArgs.arch_args.virtual_end = base; in add_page_table()
338 gKernelArgs.arch_args.phys_pgdir = (uint32)sPageDirectory; in init_page_directory()
367 gKernelArgs.arch_args.num_pgtables = 0; in init_page_directory()
469 if (!is_address_range_covered(gKernelArgs.physical_memory_range, in mmu_allocate_physical()
470 gKernelArgs.num_physical_memory_ranges, base, size)) { in mmu_allocate_physical()
476 if (!get_free_address_range(gKernelArgs.physical_allocated_range, in mmu_allocate_physical()
477 gKernelArgs.num_physical_allocated_ranges, base, size, &foundBase) in mmu_allocate_physical()
598 gKernelArgs.virtual_allocated_range[0].start = KERNEL_LOAD_BASE; in mmu_init_for_kernel()
599 gKernelArgs.virtual_allocated_range[0].size in mmu_init_for_kernel()
601 gKernelArgs.num_virtual_allocated_ranges = 1; in mmu_init_for_kernel()
604 sort_address_ranges(gKernelArgs.physical_memory_range, in mmu_init_for_kernel()
605 gKernelArgs.num_physical_memory_ranges); in mmu_init_for_kernel()
606 sort_address_ranges(gKernelArgs.physical_allocated_range, in mmu_init_for_kernel()
607 gKernelArgs.num_physical_allocated_ranges); in mmu_init_for_kernel()
608 sort_address_ranges(gKernelArgs.virtual_allocated_range, in mmu_init_for_kernel()
609 gKernelArgs.num_virtual_allocated_ranges); in mmu_init_for_kernel()
616 for (i = 0; i < gKernelArgs.num_physical_memory_ranges; i++) { in mmu_init_for_kernel()
618 gKernelArgs.physical_memory_range[i].start, in mmu_init_for_kernel()
619 gKernelArgs.physical_memory_range[i].size); in mmu_init_for_kernel()
623 for (i = 0; i < gKernelArgs.num_physical_allocated_ranges; i++) { in mmu_init_for_kernel()
625 gKernelArgs.physical_allocated_range[i].start, in mmu_init_for_kernel()
626 gKernelArgs.physical_allocated_range[i].size); in mmu_init_for_kernel()
630 for (i = 0; i < gKernelArgs.num_virtual_allocated_ranges; i++) { in mmu_init_for_kernel()
632 gKernelArgs.virtual_allocated_range[i].start, in mmu_init_for_kernel()
633 gKernelArgs.virtual_allocated_range[i].size); in mmu_init_for_kernel()
645 gKernelArgs.arch_args.virtual_end = KERNEL_LOAD_BASE; in mmu_init()
647 gKernelArgs.physical_allocated_range[0].start = sNextPhysicalAddress; in mmu_init()
648 gKernelArgs.physical_allocated_range[0].size = 0; in mmu_init()
649 gKernelArgs.physical_allocated_range[1].start = sNextPhysicalKernelAddress; in mmu_init()
650 gKernelArgs.physical_allocated_range[1].size = 0; in mmu_init()
651 gKernelArgs.num_physical_allocated_ranges = 2; in mmu_init()
663 gKernelArgs.arch_args.vir_pgdir = get_next_virtual_page(); in mmu_init()
664 map_page(gKernelArgs.arch_args.vir_pgdir, (uint32)sPageDirectory, in mmu_init()
668 gKernelArgs.cpu_kstack[0].start = (addr_t)mmu_allocate(NULL, in mmu_init()
670 gKernelArgs.cpu_kstack[0].size = KERNEL_STACK_SIZE in mmu_init()
674 gKernelArgs.cpu_kstack[0].start, gKernelArgs.cpu_kstack[0].start in mmu_init()
675 + gKernelArgs.cpu_kstack[0].size); in mmu_init()
682 gKernelArgs.num_physical_memory_ranges = 0; in mmu_init()
714 gKernelArgs.ignored_physical_memory in mmu_init()
750 sort_address_ranges(gKernelArgs.physical_memory_range, in mmu_init()
751 gKernelArgs.num_physical_memory_ranges); in mmu_init()
757 for (int32 i = gKernelArgs.num_physical_memory_ranges - 1; i >= 0; in mmu_init()
759 uint64 size = gKernelArgs.physical_memory_range[i].size; in mmu_init()
761 uint64 start = gKernelArgs.physical_memory_range[i].start; in mmu_init()
766 gKernelArgs.ignored_physical_memory in mmu_init()
773 gKernelArgs.physical_memory_range[0].start = 0; in mmu_init()
774 gKernelArgs.physical_memory_range[0].size = 0x9f000; in mmu_init()
775 gKernelArgs.physical_memory_range[1].start = 0x100000; in mmu_init()
786 gKernelArgs.physical_memory_range[1].size = memSize - 0x100000; in mmu_init()
789 gKernelArgs.physical_memory_range[1].size = regs.eax * 1024; in mmu_init()
791 gKernelArgs.num_physical_memory_ranges = 2; in mmu_init()
794 gKernelArgs.physical_memory_range[1].size = regs.ecx * 1024; in mmu_init()
795 gKernelArgs.physical_memory_range[2].start = 0x1000000; in mmu_init()
796 gKernelArgs.physical_memory_range[2].size = regs.edx * 64 * 1024; in mmu_init()
797 gKernelArgs.num_physical_memory_ranges = 3; in mmu_init()
801 gKernelArgs.arch_args.page_hole = 0xffc00000; in mmu_init()