aboutsummaryrefslogtreecommitdiff
path: root/mirai/boot/sequence/constants/phases.zig
blob: cce112901e72f1aacf0fc142c192ca2a2a758906 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//! Boot Phase Constants

pub const Phase = enum(u8) {
    cpu = 0,
    memory = 1,
    interrupts = 2,
    multicore = 3,
    world = 4,
    drivers = 5,
    filesystem = 6,
    pulse = 7,
    complete = 8,
};

pub const phase_names = [_][]const u8{
    "CPU",
    "Memory",
    "Interrupts",
    "Multicore",
    "World",
    "Drivers",
    "Filesystem",
    "Pulse",
    "Complete",
};

pub fn get_phase_name(phase: Phase) []const u8 {
    const index = @intFromEnum(phase);
    if (index < phase_names.len) {
        return phase_names[index];
    }
    return "Unknown";
}