Initialize and fire up non-boot processors */
| 107 | |
| 108 | /* Initialize and fire up non-boot processors */ |
| 109 | void |
| 110 | cpu_mp_start(void) |
| 111 | { |
| 112 | int error, i; |
| 113 | |
| 114 | mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN); |
| 115 | |
| 116 | /* Reserve memory for application processors */ |
| 117 | for(i = 0; i < (mp_ncpus - 1); i++) |
| 118 | dpcpu[i] = (void *)kmem_malloc(DPCPU_SIZE, M_WAITOK | M_ZERO); |
| 119 | |
| 120 | dcache_wbinv_poc_all(); |
| 121 | |
| 122 | /* Initialize boot code and start up processors */ |
| 123 | platform_mp_start_ap(); |
| 124 | |
| 125 | /* Check if ap's started properly */ |
| 126 | error = check_ap(); |
| 127 | if (error) |
| 128 | printf("WARNING: Some AP's failed to start\n"); |
| 129 | else |
| 130 | for (i = 1; i < mp_ncpus; i++) |
| 131 | CPU_SET(i, &all_cpus); |
| 132 | } |
| 133 | |
| 134 | /* Introduce rest of cores to the world */ |
| 135 | void |
no test coverage detected