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

Function platform_init_ap

freebsd/mips/beri/beri_mp.c:220–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220void
221platform_init_ap(int cpuid)
222{
223 uint32_t status;
224 u_int clock_int_mask;
225
226 KASSERT(cpuid < MAXCPU, ("%s: invalid CPU id %d", __func__, cpuid));
227
228 /* Make sure coprocessors are enabled. */
229 status = mips_rd_status();
230 status |= (MIPS_SR_COP_0_BIT | MIPS_SR_COP_1_BIT);
231#if defined(CPU_CHERI)
232 status |= MIPS_SR_COP_2_BIT;
233#endif
234 mips_wr_status(status);
235
236#if 0
237 register_t hwrena;
238 /* Enable HDWRD instruction in userspace. Also enables statcounters. */
239 hwrena = mips_rd_hwrena();
240 hwrena |= (MIPS_HWRENA_CC | MIPS_HWRENA_CCRES | MIPS_HWRENA_CPUNUM |
241 MIPS_HWRENA_BERI_STATCOUNTERS_MASK);
242 mips_wr_hwrena(hwrena);
243#endif
244
245 /*
246 * Enable per-thread timer.
247 */
248 clock_int_mask = hard_int_mask(5);
249 set_intr_mask(clock_int_mask);
250}
251
252/*
253 * BERI startup conforms to the spin-table start method defined in the

Callers

nothing calls this directly

Calls 1

set_intr_maskFunction · 0.85

Tested by

no test coverage detected