Kernel: Parse RSDP from multiboot headers if exists

This commit is contained in:
2024-01-26 00:49:42 +02:00
parent 0408aa9bbc
commit 6bfe833aa5
4 changed files with 51 additions and 33 deletions

View File

@@ -3,6 +3,7 @@
#include <BAN/String.h>
#include <BAN/StringView.h>
#include <BAN/Vector.h>
#include <kernel/RSDP.h>
namespace Kernel
{
@@ -34,7 +35,8 @@ namespace Kernel
struct BootInfo
{
BAN::String command_line;
FramebufferInfo framebuffer;
FramebufferInfo framebuffer {};
RSDP rsdp {};
BAN::Vector<MemoryMapEntry> memory_map_entries;
};

View File

@@ -0,0 +1,23 @@
#pragma once
#include <stdint.h>
namespace Kernel
{
struct RSDP
{
uint8_t signature[8];
uint8_t checksum;
uint8_t oemid[6];
uint8_t revision;
uint32_t rsdt_address;
// only in revision >= 2
uint32_t length;
uint64_t xsdt_address;
uint8_t extended_checksum;
uint8_t reserved[3];
};
}