boot/efi: Do not allow insert_physical_allocated_range to fail
Change-Id: Id10b81ae869b62bf94ace3a9f2482e076a6a6964 Reviewed-on: https://review.haiku-os.org/c/haiku/+/11051 Reviewed-by: waddlesplash <[email protected]> Haiku-Format: Haiku-format Bot <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
5bbd5a82ae
commit
700dc49d83
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <boot/stage2.h>
|
#include <boot/stage2.h>
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -88,7 +89,7 @@ build_physical_allocated_list(size_t memoryMapSize, efi_memory_descriptor* memor
|
|||||||
case EfiLoaderData: {
|
case EfiLoaderData: {
|
||||||
uint64_t base = entry->PhysicalStart;
|
uint64_t base = entry->PhysicalStart;
|
||||||
uint64_t size = entry->NumberOfPages * B_PAGE_SIZE;
|
uint64_t size = entry->NumberOfPages * B_PAGE_SIZE;
|
||||||
insert_physical_allocated_range(base, size);
|
ASSERT_ALWAYS(insert_physical_allocated_range(base, size) == B_OK);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ arch_mmu_post_efi_setup(size_t memory_map_size,
|
|||||||
// LoaderData memory is bootloader allocated memory, possibly
|
// LoaderData memory is bootloader allocated memory, possibly
|
||||||
// containing the kernel or loaded drivers.
|
// containing the kernel or loaded drivers.
|
||||||
if (entry->Type == EfiLoaderData)
|
if (entry->Type == EfiLoaderData)
|
||||||
insert_physical_allocated_range(base, size);
|
ASSERT_ALWAYS(insert_physical_allocated_range(base, size) == B_OK);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EfiACPIReclaimMemory:
|
case EfiACPIReclaimMemory:
|
||||||
|
|||||||
Reference in New Issue
Block a user