/*
- * Copyright (c) 2003-2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2003-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
extern const char version_variant[];
extern int nx_enabled;
-uint64_t physmap_base, physmap_max;
+/*
+ * Set initial values so that ml_phys_* routines can use the booter's ID mapping
+ * to touch physical space before the kernel's physical aperture exists.
+ */
+uint64_t physmap_base = 0;
+uint64_t physmap_max = 4*GB;
pd_entry_t *KPTphys;
pd_entry_t *IdlePTD;
* Non-bootstrap processors are called with argument boot_args_start NULL.
* These processors switch immediately to the existing kernel page tables.
*/
+__attribute__((noreturn))
void
vstart(vm_offset_t boot_args_start)
{
unsigned int cpus = 0;
boolean_t fidn;
boolean_t IA32e = TRUE;
- char namep[16];
postcode(I386_INIT_ENTRY);
tsc_init();
rtclock_early_init(); /* mach_absolute_time() now functionsl */
- kernel_debug_string_simple("i386_init");
+ kernel_debug_string_early("i386_init");
pstate_trace();
#if CONFIG_MCA
panic_init(); /* Init this in case we need debugger */
/* setup debugging output if one has been chosen */
- kernel_debug_string_simple("PE_init_kprintf");
+ kernel_debug_string_early("PE_init_kprintf");
PE_init_kprintf(FALSE);
- if(PE_parse_boot_argn("-show_pointers", &namep, sizeof (namep)))
- doprnt_hide_pointers = FALSE;
-
- kernel_debug_string_simple("kernel_early_bootstrap");
+ kernel_debug_string_early("kernel_early_bootstrap");
kernel_early_bootstrap();
if (!PE_parse_boot_argn("diag", &dgWork.dgFlags, sizeof (dgWork.dgFlags)))
}
/* setup console output */
- kernel_debug_string_simple("PE_init_printf");
+ kernel_debug_string_early("PE_init_printf");
PE_init_printf(FALSE);
kprintf("version_variant = %s\n", version_variant);
* VM initialization, after this we're using page tables...
* Thn maximum number of cpus must be set beforehand.
*/
- kernel_debug_string_simple("i386_vm_init");
+ kernel_debug_string_early("i386_vm_init");
i386_vm_init(maxmemtouse, IA32e, kernelBootArgs);
/* create the console for verbose or pretty mode */
PE_init_platform(TRUE, kernelBootArgs);
PE_create_console();
- kernel_debug_string_simple("power_management_init");
+ kernel_debug_string_early("power_management_init");
power_management_init();
processor_bootstrap();
thread_bootstrap();
pstate_trace();
- kernel_debug_string_simple("machine_startup");
+ kernel_debug_string_early("machine_startup");
machine_startup();
pstate_trace();
}
#if CONFIG_VMX
/* resume VT operation */
- vmx_resume();
+ vmx_resume(FALSE);
#endif
#if CONFIG_MTRR