ArvernOS
Loading...
Searching...
No Matches
kernel.h File Reference
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for kernel.h:

Functions

void arch_restart ()
 
void arch_poweroff (int exit_code)
 
void arch_halt ()
 
bool arch_is_kernel_address (uintptr_t addr)
 

Function Documentation

◆ arch_halt()

void arch_halt ( )

Shutdowns everything and performs a clean system halt.

◆ arch_is_kernel_address()

bool arch_is_kernel_address ( uintptr_t addr)

Determines whether an address points to kernel code.

Parameters
addran address
Returns
true if the address points to kernel code, false otherwise

It does not have to be perfect, we just have to believe it will be fine.

◆ arch_poweroff()

void arch_poweroff ( int exit_code)

Shutdowns everything and performs a clean system power off.

Parameters
exit_codewhen CONFIG_SEMIHOSTING is set to 1, this value is returned to the emulator. Otherwise, this value is ignored

◆ arch_restart()

void arch_restart ( )

Shutdowns everything and performs a clean reboot.

Todo
Implement this function for AArch32.
Todo
Implement this function for AArch64.