AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
init.c File Reference

aarch64: setting up the kernel, from where boot/head.S jumps to, up to kmain(), in the order that docs/kernel/booting.md's table gives (as x86's x86_cpu_init() does). More...

#include <boot/boot.h>
#include <console/earlycon.h>
#include <core/arch.h>
#include <core/kargs.h>
#include <core/printk.h>
#include <cpu/cpu.h>
#include <mm/mm.h>
#include <mm/vm.h>
#include <sys/cpu.h>
#include <sys/lock.h>
#include <platform/virt.h>

Go to the source code of this file.

Macros

#define CPACR_FPEN_TRAP   (1UL << 20)

Functions

void aarch64_init (uintptr_t dtb)
 Sets up the CPU, memory and the platform, then calls kmain().

Variables

struct boot * __kboot
static char bsp_idle_stack [8192]

Detailed Description

aarch64: setting up the kernel, from where boot/head.S jumps to, up to kmain(), in the order that docs/kernel/booting.md's table gives (as x86's x86_cpu_init() does).

Definition in file init.c.

Macro Definition Documentation

◆ CPACR_FPEN_TRAP

#define CPACR_FPEN_TRAP   (1UL << 20)

Definition at line 26 of file init.c.

Referenced by aarch64_init().

Function Documentation

◆ aarch64_init()

void aarch64_init ( uintptr_t dtb)

Sets up the CPU, memory and the platform, then calls kmain().

boot/head.S jumps here once the MMU is on. It doesn't return.

Parameters
dtbthe devicetree's physical address, from the boot loader

Definition at line 34 of file init.c.

References __kboot, aarch64_init(), cpu::arch, bsp_idle_stack, boot::cmdline, CPACR_FPEN_TRAP, cpus, cpus_count, earlycon_init(), earlycon_reinit(), fdt_boot(), cpu::id, arch_cpu::idle_stack, isb, kargs_parse(), kernel_lock(), kmain(), kvmem_setup(), mm_setup(), platform_init(), printk(), read_sysreg, cpu::self, and write_sysreg.

Referenced by aarch64_init().

Variable Documentation

◆ __kboot

◆ bsp_idle_stack

char bsp_idle_stack[8192]
static

Definition at line 22 of file init.c.

Referenced by aarch64_init(), and x86_cpu_init().