Function init_later

Source
pub fn init_later(cpu_id: usize, arg: usize)
Expand description

Initializes the platform at the later stage for the primary core.

This function should be called after the kernel has done part of its initialization (e.g, logging, memory management), and finalized the rest of platform configuration and initialization.

§Arguments

  • cpu_id is the logical CPU ID (0, 1, …, N-1, N is the number of CPU cores on the platform).
  • arg is passed from the bootloader (typically the device tree blob address).

§Before calling this function

  • Kernel logging is initialized.
  • Fine-grained kernel page table is set up (if applicable).
  • Physical memory allocation is initialized (if applicable).

§After calling this function

  • Interrupt controller is initialized (if applicable).
  • Timer interrupts are enabled (if applicable).
  • Other platform devices are initialized.