1/* @title: Bootstages */
2#include <stdint.h>
3#pragma once
4
5enum bootstage : uint8_t {
6 BOOTSTAGE_NONE,
7 BOOTSTAGE_EARLY_FB, /* Console can be printed to */
8
9 BOOTSTAGE_EARLY_ALLOCATORS, /* Early non-topology aware
10 * allocators available */
11
12 BOOTSTAGE_EARLY_DEVICES, /* Early devices (ACPI, LAPIC, HPET) brought up */
13
14 BOOTSTAGE_MID_MP, /* APs exit busy-spin and enter idle thread */
15
16 BOOTSTAGE_MID_TOPOLOGY, /* Topology parsed */
17
18 BOOTSTAGE_MID_ALLOCATORS, /* Allocators are topology aware */
19
20 BOOTSTAGE_LATE, /* Rest of kernel is brought up -- filesystems,
21 * drivers, etc. almost all
22 * features are available in APIs */
23
24 BOOTSTAGE_COMPLETE, /* Complete - enter init */
25
26 BOOTSTAGE_COUNT,
27};
28
29extern const char *bootstage_str[BOOTSTAGE_COUNT];
30
31/* This is a bit goofy, but we use it when global.bootstage can't be used,
32 * often due to header file recursion soup and other happenings */
33enum bootstage bootstage_get();
34void bootstage_advance(enum bootstage new);
35