Fix bug :)

This commit is contained in:
apio 2022-10-08 15:03:10 +02:00
parent 533b7c9e71
commit a5daa24fbf

View File

@ -4,6 +4,7 @@
#include "bootboot.h"
#include "log/Log.h"
#include "memory/MemoryManager.h"
#include "misc/utils.h"
#include "std/stdio.h"
#include "std/string.h"
@ -21,7 +22,7 @@ ACPI::SDTHeader* ACPI::get_rsdt_or_xsdt()
cache = (SDTHeader*)MemoryManager::get_unaligned_mapping(physical);
uint64_t offset = (uint64_t)physical % PAGE_SIZE;
uint64_t rsdt_pages = (offset + cache->Length) / PAGE_SIZE;
uint64_t rsdt_pages = Utilities::get_blocks_from_size(PAGE_SIZE, (offset + cache->Length));
if (rsdt_pages > 1)
{