Temporary fix for create_preloaded_image_areas. Will be replaced with a typedef later on.
This commit is contained in:
@@ -3540,13 +3540,16 @@ vm_free_unused_boot_loader_range(addr_t start, addr_t size)
|
||||
}
|
||||
|
||||
|
||||
// TODO x86_64: hardcoding elf32 is temporary.
|
||||
static void
|
||||
create_preloaded_image_areas(struct preloaded_elf32_image* image)
|
||||
create_preloaded_image_areas(struct preloaded_image* _image)
|
||||
{
|
||||
#ifdef __x86_64__
|
||||
panic("fix this");
|
||||
// TODO: Make this a typedef somewhere. Will be done when I implement
|
||||
// ELF loading for x86_64.
|
||||
#ifdef B_HAIKU_64_BIT
|
||||
preloaded_elf64_image* image = static_cast<preloaded_elf64_image*>(_image);
|
||||
#else
|
||||
preloaded_elf32_image* image = static_cast<preloaded_elf32_image*>(_image);
|
||||
#endif
|
||||
char name[B_OS_NAME_LENGTH];
|
||||
void* address;
|
||||
int32 length;
|
||||
@@ -3577,7 +3580,6 @@ create_preloaded_image_areas(struct preloaded_elf32_image* image)
|
||||
image->data_region.id = create_area(name, &address, B_EXACT_ADDRESS,
|
||||
PAGE_ALIGN(image->data_region.size), B_ALREADY_WIRED,
|
||||
B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -3850,13 +3852,11 @@ vm_init(kernel_args* args)
|
||||
|
||||
allocate_kernel_args(args);
|
||||
|
||||
create_preloaded_image_areas(static_cast<struct preloaded_elf32_image*>(
|
||||
(void*)args->kernel_image));
|
||||
create_preloaded_image_areas(args->kernel_image);
|
||||
|
||||
// allocate areas for preloaded images
|
||||
for (image = args->preloaded_images; image != NULL; image = image->next)
|
||||
create_preloaded_image_areas(
|
||||
static_cast<struct preloaded_elf32_image*>(image));
|
||||
create_preloaded_image_areas(image);
|
||||
|
||||
// allocate kernel stacks
|
||||
for (i = 0; i < args->num_cpus; i++) {
|
||||
|
||||
Reference in New Issue
Block a user