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

Function cpu_startup

freebsd/arm/arm/machdep.c:183–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183static void
184cpu_startup(void *dummy)
185{
186 struct pcb *pcb = thread0.td_pcb;
187 const unsigned int mbyte = 1024 * 1024;
188
189 identify_arm_cpu();
190
191 vm_ksubmap_init(&kmi);
192
193 /*
194 * Display the RAM layout.
195 */
196 printf("real memory = %ju (%ju MB)\n",
197 (uintmax_t)arm32_ptob(realmem),
198 (uintmax_t)arm32_ptob(realmem) / mbyte);
199 printf("avail memory = %ju (%ju MB)\n",
200 (uintmax_t)arm32_ptob(vm_free_count()),
201 (uintmax_t)arm32_ptob(vm_free_count()) / mbyte);
202 if (bootverbose) {
203 physmem_print_tables();
204 devmap_print_table();
205 }
206
207 bufinit();
208 vm_pager_bufferinit();
209 pcb->pcb_regs.sf_sp = (u_int)thread0.td_kstack +
210 USPACE_SVC_STACK_TOP;
211 pmap_set_pcb_pagedir(kernel_pmap, pcb);
212}
213
214SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL);
215

Callers

nothing calls this directly

Calls 9

identify_arm_cpuFunction · 0.85
vm_ksubmap_initFunction · 0.85
physmem_print_tablesFunction · 0.85
devmap_print_tableFunction · 0.85
bufinitFunction · 0.85
vm_pager_bufferinitFunction · 0.85
pmap_set_pcb_pagedirFunction · 0.85
printfFunction · 0.50
vm_free_countFunction · 0.50

Tested by

no test coverage detected