/*
- * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2008 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
#include <machine/pmap.h>
#include <device/device_types.h>
+#include <libkern/OSKextLibPrivate.h>
+
#include <mach/vm_param.h>
#include <mach/clock_types.h>
#include <mach/machine.h>
int boot_arg;
unsigned int wncpu;
- if (PE_parse_boot_arg("cpus", &wncpu)) {
+ if (PE_parse_boot_argn("cpus", &wncpu, sizeof (wncpu))) {
if ((wncpu > 0) && (wncpu < MAX_CPUS))
max_ncpus = wncpu;
}
if( PE_get_hotkey( kPEControlKey ))
halt_in_debugger = halt_in_debugger ? 0 : 1;
- if (PE_parse_boot_arg("debug", &boot_arg)) {
+ if (PE_parse_boot_argn("debug", &boot_arg, sizeof (boot_arg))) {
if (boot_arg & DB_HALT) halt_in_debugger=1;
if (boot_arg & DB_PRT) disable_debug_output=FALSE;
if (boot_arg & DB_SLOG) systemLogDiags=TRUE;
if (boot_arg & DB_LOG_PI_SCRN) logPanicDataToScreen=TRUE;
}
- if (!PE_parse_boot_arg("nvram_paniclog", &commit_paniclog_to_nvram))
+ if (!PE_parse_boot_argn("nvram_paniclog", &commit_paniclog_to_nvram, sizeof (commit_paniclog_to_nvram)))
commit_paniclog_to_nvram = 1;
- PE_parse_boot_arg("vmmforce", &lowGlo.lgVMMforcedFeats);
+ PE_parse_boot_argn("vmmforce", &lowGlo.lgVMMforcedFeats, sizeof (lowGlo.lgVMMforcedFeats));
hw_lock_init(&debugger_lock); /* initialize debugger lock */
hw_lock_init(&pbtlock); /* initialize print backtrace lock */
active_debugger =1;
}
#endif /* MACH_KDB */
- if (PE_parse_boot_arg("preempt", &boot_arg)) {
+ if (PE_parse_boot_argn("preempt", &boot_arg, sizeof (boot_arg))) {
default_preemption_rate = boot_arg;
}
- if (PE_parse_boot_arg("unsafe", &boot_arg)) {
+ if (PE_parse_boot_argn("unsafe", &boot_arg, sizeof (boot_arg))) {
max_unsafe_quanta = boot_arg;
}
- if (PE_parse_boot_arg("poll", &boot_arg)) {
+ if (PE_parse_boot_argn("poll", &boot_arg, sizeof (boot_arg))) {
max_poll_quanta = boot_arg;
}
- if (PE_parse_boot_arg("yield", &boot_arg)) {
+ if (PE_parse_boot_argn("yield", &boot_arg, sizeof (boot_arg))) {
sched_poll_yield_shift = boot_arg;
}
}
-void slave_machine_init(void)
+void
+slave_machine_init(__unused void *param)
{
cpu_machine_init(); /* Initialize the processor */
clock_init(); /* Init the clock */
while(pbtcnt); /* Wait for completion */
pbt_exit:
- panic_display_system_configuration();
-
- return;
+ panic_display_system_configuration();
+ return;
}
void
}
kdb_printf("\n");
if(i >= DUMPFRAMES) kdb_printf(" backtrace continues...\n"); /* Say we terminated early */
- if(i) kmod_dump((vm_offset_t *)&bframes[0], i); /* Show what kmods are in trace */
+ if(i) kmod_panic_dump((vm_offset_t *)&bframes[0], i); /* Show what kmods are in trace */
}