diff --git a/headers/private/kernel/boot/elf.h b/headers/private/kernel/boot/elf.h new file mode 100644 index 0000000000..d790e646bc --- /dev/null +++ b/headers/private/kernel/boot/elf.h @@ -0,0 +1,21 @@ +/* +** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the OpenBeOS License. +*/ +#ifndef KERNEL_BOOT_ELF_H +#define KERNEL_BOOT_ELF_H + + +#include + + +struct preloaded_image { + struct preloaded_image *next; + char *name; + elf_region text_region; + elf_region data_region; + addr dynamic_section; // pointer to the dynamic section + Elf32_Ehdr elf_header; +}; + +#endif /* KERNEL_BOOT_ELF_H */ diff --git a/headers/private/kernel/boot/kernel_args.h b/headers/private/kernel/boot/kernel_args.h index d5f41ceda6..cebadd3f3e 100644 --- a/headers/private/kernel/boot/kernel_args.h +++ b/headers/private/kernel/boot/kernel_args.h @@ -17,6 +17,8 @@ typedef struct address_range { #include #include +struct preloaded_image; + typedef struct kernel_args { uint32 cons_line; char *str; @@ -25,6 +27,8 @@ typedef struct kernel_args { addr_range kernel_seg1_addr; addr_range kernel_dynamic_section_addr; + struct preloaded_image *preloaded_images; + uint32 num_physical_memory_ranges; addr_range physical_memory_range[MAX_PHYSICAL_MEMORY_RANGE]; uint32 num_physical_allocated_ranges; diff --git a/headers/private/kernel/boot/platform.h b/headers/private/kernel/boot/platform.h index bdeac5405f..dab812d601 100644 --- a/headers/private/kernel/boot/platform.h +++ b/headers/private/kernel/boot/platform.h @@ -24,6 +24,10 @@ extern void dprintf(const char *format, ...); extern void platform_release_heap(struct stage2_args *args, void *base); extern status_t platform_init_heap(struct stage2_args *args, void **_base, void **_top); +/* MMU/memory functions */ +extern status_t platform_allocate_region(void **_virtualAddress, size_t size, uint8 protection); +extern status_t platform_free_region(void *address, size_t size); + /* misc functions */ extern bool platform_user_menu_requested(void); diff --git a/headers/private/kernel/boot/platform/openfirmware/platform_arch.h b/headers/private/kernel/boot/platform/openfirmware/platform_arch.h index eccb46d37a..886137e330 100644 --- a/headers/private/kernel/boot/platform/openfirmware/platform_arch.h +++ b/headers/private/kernel/boot/platform/openfirmware/platform_arch.h @@ -13,8 +13,8 @@ extern "C" { #endif -extern void *arch_mmu_alloc_at(void *address, size_t size, uint8 protection); -extern void *arch_mmu_alloc(size_t size, uint8 protection); +extern void *arch_mmu_allocate(void *address, size_t size, uint8 protection); +extern status_t arch_mmu_free(void *address, size_t size); extern status_t arch_mmu_init(void); #ifdef __cplusplus