efi/mmu: ensure sNextVirtualAddress is valid on 32-bit platforms

Change-Id: I1c762410860ac7a27cfc78345de3226e36195aba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2258
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Alexander von Gluck IV 2020-02-21 09:34:50 -06:00 committed by Alex von Gluck IV
parent 04f1baa771
commit 957f468cc1
1 changed files with 8 additions and 1 deletions

View File

@ -11,7 +11,6 @@
#include <boot/addr_range.h>
#include <boot/platform.h>
#include <boot/stage2.h>
#include <kernel/arch/x86/arch_kernel.h>
#include <kernel/kernel.h>
#include "efi_platform.h"
@ -27,7 +26,15 @@ struct allocated_memory_region {
};
#if defined(KERNEL_LOAD_BASE_64_BIT)
static addr_t sNextVirtualAddress = KERNEL_LOAD_BASE_64_BIT + 32 * 1024 * 1024;
#elif defined(KERNEL_LOAD_BASE)
static addr_t sNextVirtualAddress = KERNEL_LOAD_BASE + 32 * 1024 * 1024;
#else
#error Unable to find kernel load base on this architecture!
#endif
static allocated_memory_region *allocated_memory_regions = NULL;