| 181 | } |
| 182 | |
| 183 | static void |
| 184 | cpu_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 | |
| 214 | SYSINIT(cpu, SI_SUB_CPU, SI_ORDER_FIRST, cpu_startup, NULL); |
| 215 |
nothing calls this directly
no test coverage detected