Lines Matching refs:gKernelArgs

56 	return *(volatile uint32 *)((addr_t)(void *)gKernelArgs.arch_args.apic + offset);  in apic_read()
63 *(volatile uint32 *)((addr_t)(void *)gKernelArgs.arch_args.apic + offset) = data; in apic_write()
103 gKernelArgs.num_cpus = 1; in smp_do_mp_config()
108 gKernelArgs.num_cpus = 2; in smp_do_mp_config()
109 gKernelArgs.cpu_apic_id[0] = 0; in smp_do_mp_config()
110 gKernelArgs.cpu_apic_id[1] = 1; in smp_do_mp_config()
123 gKernelArgs.num_cpus = 0; in smp_do_mp_config()
143 gKernelArgs.arch_args.apic_phys = (uint32)config->apic; in smp_do_mp_config()
144 if ((gKernelArgs.arch_args.apic_phys % 4096) != 0) { in smp_do_mp_config()
147 (void *)gKernelArgs.arch_args.apic_phys); in smp_do_mp_config()
160 if (gKernelArgs.num_cpus == SMP_MAX_CPUS) { in smp_do_mp_config()
173 gKernelArgs.arch_args.cpu_apic_id[gKernelArgs.num_cpus] in smp_do_mp_config()
175 gKernelArgs.arch_args.cpu_apic_version[gKernelArgs.num_cpus] in smp_do_mp_config()
183 gKernelArgs.num_cpus, in smp_do_mp_config()
188 gKernelArgs.num_cpus++; in smp_do_mp_config()
208 if (gKernelArgs.arch_args.ioapic_phys == 0) { in smp_do_mp_config()
209 gKernelArgs.arch_args.ioapic_phys = (uint32)io->addr; in smp_do_mp_config()
210 if (gKernelArgs.arch_args.ioapic_phys % 1024) { in smp_do_mp_config()
213 (void *)gKernelArgs.arch_args.ioapic_phys)); in smp_do_mp_config()
242 if (gKernelArgs.num_cpus == 0) { in smp_do_mp_config()
248 (void *)gKernelArgs.arch_args.apic_phys, in smp_do_mp_config()
249 (void *)gKernelArgs.arch_args.ioapic_phys, in smp_do_mp_config()
250 gKernelArgs.num_cpus); in smp_do_mp_config()
262 gKernelArgs.num_cpus = 0; in smp_do_acpi_config()
271 gKernelArgs.arch_args.apic_phys = madt->local_apic_address; in smp_do_acpi_config()
280 if (gKernelArgs.num_cpus == SMP_MAX_CPUS) { in smp_do_acpi_config()
294 gKernelArgs.arch_args.cpu_apic_id[gKernelArgs.num_cpus] in smp_do_acpi_config()
297 gKernelArgs.arch_args.cpu_apic_version[gKernelArgs.num_cpus] in smp_do_acpi_config()
299 gKernelArgs.num_cpus++; in smp_do_acpi_config()
307 if (gKernelArgs.arch_args.ioapic_phys == 0) in smp_do_acpi_config()
308 gKernelArgs.arch_args.ioapic_phys = ioApic->io_apic_address; in smp_do_acpi_config()
318 return gKernelArgs.num_cpus > 0 ? B_OK : B_ERROR; in smp_do_acpi_config()
349 gKernelArgs.arch_args.apic_time_cv_factor in calculate_apic_timer_conversion_factor()
353 gKernelArgs.arch_args.apic_time_cv_factor); in calculate_apic_timer_conversion_factor()
363 if (gKernelArgs.arch_args.apic == NULL) in smp_get_current_cpu()
367 for (uint32 i = 0; i < gKernelArgs.num_cpus; i++) { in smp_get_current_cpu()
368 if (gKernelArgs.arch_args.cpu_apic_id[i] == apicID) in smp_get_current_cpu()
382 gKernelArgs.num_cpus = 1; in smp_init_other_cpus()
387 gKernelArgs.arch_args.apic_phys = 0; in smp_init_other_cpus()
388 gKernelArgs.num_cpus = 1; in smp_init_other_cpus()
391 if (gKernelArgs.arch_args.apic_phys == 0) in smp_init_other_cpus()
394 dprintf("smp: found %d cpu%s\n", gKernelArgs.num_cpus, in smp_init_other_cpus()
395 gKernelArgs.num_cpus != 1 ? "s" : ""); in smp_init_other_cpus()
396 dprintf("smp: apic_phys = %p\n", (void *)gKernelArgs.arch_args.apic_phys); in smp_init_other_cpus()
398 (void *)gKernelArgs.arch_args.ioapic_phys); in smp_init_other_cpus()
401 gKernelArgs.arch_args.apic = (void *)mmu_map_physical_memory( in smp_init_other_cpus()
402 gKernelArgs.arch_args.apic_phys, B_PAGE_SIZE, kDefaultPageFlags); in smp_init_other_cpus()
404 dprintf("smp: apic (mapped) = %p\n", (void *)gKernelArgs.arch_args.apic); in smp_init_other_cpus()
409 if (gKernelArgs.num_cpus < 2) in smp_init_other_cpus()
412 for (uint32 i = 1; i < gKernelArgs.num_cpus; i++) { in smp_init_other_cpus()
414 gKernelArgs.cpu_kstack[i].start = (addr_t)mmu_allocate(NULL, in smp_init_other_cpus()
416 gKernelArgs.cpu_kstack[i].size = KERNEL_STACK_SIZE in smp_init_other_cpus()
425 if (gKernelArgs.num_cpus < 2) in smp_boot_other_cpus()
449 for (uint32 i = 1; i < gKernelArgs.num_cpus; i++) { in smp_boot_other_cpus()
457 finalStack = (uint32 *)gKernelArgs.cpu_kstack[i].start; in smp_boot_other_cpus()
488 if (gKernelArgs.arch_args.cpu_apic_version[i] & 0xf0) { in smp_boot_other_cpus()
496 | (gKernelArgs.arch_args.cpu_apic_id[i] << 24); in smp_boot_other_cpus()
511 | (gKernelArgs.arch_args.cpu_apic_id[i] << 24); in smp_boot_other_cpus()
526 numStartups = (gKernelArgs.arch_args.cpu_apic_version[i] & 0xf0) in smp_boot_other_cpus()
537 | (gKernelArgs.arch_args.cpu_apic_id[i] << 24); in smp_boot_other_cpus()
570 if (gKernelArgs.arch_args.ioapic_phys != 0) { in smp_add_safemode_menus()
578 if (gKernelArgs.arch_args.apic_phys != 0) { in smp_add_safemode_menus()
629 if (gKernelArgs.num_cpus < 2) in smp_add_safemode_menus()
644 gKernelArgs.num_cpus = 1; in smp_init()
675 gKernelArgs.arch_args.apic_phys = 0; in smp_init()
676 gKernelArgs.arch_args.ioapic_phys = 0; in smp_init()
677 gKernelArgs.num_cpus = 1; in smp_init()