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

Function platform_start

freebsd/mips/broadcom/bcm_machdep.c:576–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576void
577platform_start(__register_t a0, __register_t a1, __register_t a2,
578 __register_t a3)
579{
580 vm_offset_t kernend;
581 uint64_t platform_counter_freq;
582 int error;
583
584 /* clear the BSS and SBSS segments */
585 kernend = (vm_offset_t)&end;
586 memset(&edata, 0, kernend - (vm_offset_t)(&edata));
587
588 mips_postboot_fixup();
589
590 /* Initialize pcpu stuff */
591 mips_pcpu0_init();
592
593#ifdef CFE
594 /*
595 * Initialize CFE firmware trampolines. This must be done
596 * before any CFE APIs are called, including writing
597 * to the CFE console.
598 *
599 * CFE passes the following values in registers:
600 * a0: firmware handle
601 * a2: firmware entry point
602 * a3: entry point seal
603 */
604 if (a3 == CFE_EPTSEAL)
605 cfe_init(a0, a2);
606#endif
607
608 /* Init BCM platform data */
609 if ((error = bcm_init_platform_data(&bcm_platform_data)))
610 panic("bcm_init_platform_data() failed: %d", error);
611
612 platform_counter_freq = bcm_get_cpufreq(bcm_get_platform());
613
614 /* CP0 ticks every two cycles */
615 mips_timer_early_init(platform_counter_freq / 2);
616
617 cninit();
618
619 mips_init();
620
621 mips_timer_init_params(platform_counter_freq, 1);
622}
623
624/*
625 * CFE-based EARLY_PRINTF support. To use, add the following to the kernel

Callers

nothing calls this directly

Calls 11

memsetFunction · 0.85
mips_postboot_fixupFunction · 0.85
mips_pcpu0_initFunction · 0.85
bcm_init_platform_dataFunction · 0.85
bcm_get_cpufreqFunction · 0.85
bcm_get_platformFunction · 0.85
cninitFunction · 0.85
mips_initFunction · 0.70
panicFunction · 0.50
mips_timer_early_initFunction · 0.50
mips_timer_init_paramsFunction · 0.50

Tested by

no test coverage detected