MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cpu_mp_start

Function cpu_mp_start

freebsd/arm/arm/mp_machdep.c:109–132  ·  view source on GitHub ↗

Initialize and fire up non-boot processors */

Source from the content-addressed store, hash-verified

107
108/* Initialize and fire up non-boot processors */
109void
110cpu_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 */
135void

Callers 1

mp_startFunction · 0.50

Calls 5

mtx_initFunction · 0.85
platform_mp_start_apFunction · 0.85
check_apFunction · 0.85
kmem_mallocFunction · 0.50
printfFunction · 0.50

Tested by

no test coverage detected