blob: 998e1e5fc9ff3b1809f6ca038f98bb71121d5a3e (
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
|
comptime {
asm (@embedFile("boot64.s"));
asm (@embedFile("boot32.s"));
}
const MAGIC = 0xE85250D6;
const ARCHITECTURE = 0;
const EndTag = packed struct {
type: u16 = 0,
flags: u16 = 0,
size: u32 = 8,
};
const MultibootHeader = extern struct {
magic: u32,
architecture: u32,
header_len: u32,
checksum: u32,
endtag: EndTag,
};
export const multiboot2 align(4) linksection(".multiboot") = MultibootHeader{
.magic = MAGIC,
.architecture = ARCHITECTURE,
.header_len = 24,
.checksum = 0x100000000 - (MAGIC + ARCHITECTURE + 24),
.endtag = EndTag{},
};
|