]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/model_dep.c
xnu-1504.15.3.tar.gz
[apple/xnu.git] / osfmk / ppc / model_dep.c
index 97f5276f2202b6ca0d35278866daca26e01d8e2f..9eff5b0bb4d2ecc5faf3227822053a7f521c0770 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2007 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2008 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -74,6 +74,8 @@
 #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>
@@ -229,7 +231,7 @@ machine_startup(void)
        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;
        }
@@ -237,7 +239,7 @@ machine_startup(void)
        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; 
@@ -245,10 +247,10 @@ machine_startup(void)
                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 */
@@ -276,16 +278,16 @@ machine_startup(void)
                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;
        }
 
@@ -322,7 +324,8 @@ machine_init(void)
 
 }
 
-void slave_machine_init(void)
+void
+slave_machine_init(__unused void *param)
 {
        cpu_machine_init();                     /* Initialize the processor */
        clock_init();                           /* Init the clock */
@@ -449,9 +452,8 @@ print_backtrace(struct savearea *ssp)
 
        while(pbtcnt);                                                  /* Wait for completion */
 pbt_exit:
-       panic_display_system_configuration();
-
-       return;
+    panic_display_system_configuration();
+    return;
 }
 
 void
@@ -525,7 +527,7 @@ void dump_backtrace(struct savearea *sv, unsigned int stackptr, unsigned int fen
        }
        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 */
        
 }