mirror of
https://github.com/tailix/kernel.git
synced 2025-03-03 16:04:28 -05:00
Verify Multiboot 2 does give us memory map
This commit is contained in:
parent
15c3269c38
commit
de9fe77c3b
1 changed files with 6 additions and 0 deletions
|
@ -37,6 +37,12 @@ void main(unsigned long multiboot_magic, unsigned long multiboot_info_base)
|
|||
panic("Can not parse Multiboot 2 info.");
|
||||
}
|
||||
|
||||
const unsigned long multiboot_flags = *(unsigned long*)multiboot_info_base;
|
||||
|
||||
if (!(multiboot_flags & (1 << 6))) {
|
||||
panic("Multiboot 2 doesn't give us memory map.");
|
||||
}
|
||||
|
||||
kinfo.kernel_offset = (unsigned long)&_kernel_offset;
|
||||
kinfo.kernel_size = (unsigned long)&_kernel_size;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue