The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
kernel.h
Go to the documentation of this file.
1#pragma once
2
5
6#ifdef __x86_64__
7
8/**
9 * kernel entry point from asm64/entry.asm. it reads the limine boot
10 * protocol responses (arch/x86/boot64/limine_boot.c) and calls kernel_main.
11 */
12void cstart(void);
13
14#else
15
16/**
17 * stable kernel entry point invoked from early asm with boot metadata.
18 * @param boot_phys physical address of the boot information: stage2's
19 * boot_info_t, or the multiboot 2 information.
20 * @param magic MULTIBOOT2_BOOT_MAGIC for a multiboot 2 boot, else 0.
21 */
22void cstart(phys_addr_t boot_phys, uint32_t magic);
23
24#endif
25
26/**
27 * entry point for the c kernel after early asm setup.
28 * @param boot pointer to bootloader-provided boot_info_t.
29 * @return does not return.
30 */
31void kernel_main(boot_info_t *boot);
void kernel_main(boot_info_t *boot)
entry point for the c kernel after early asm setup.
Definition kernel.c:225
void cstart(phys_addr_t boot_phys, uint32_t magic)
stable kernel entry point invoked from early asm with boot metadata.
Definition kernel.c:85
unsigned int uint32_t
Definition fb.h:17
uintptr_t phys_addr_t
physical addresses and the conversion between physical and virtual.
Definition phys.h:18
information the bootloader hands to the kernel.
Definition boot_info.h:21