Changes for the ELF loader in the boot loader.

Removed the arch_mmu_alloc() function, added (empty) arch_mmu_free() function.
Added platform prototypes for allocating and freeing a region.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5044 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-10-16 17:55:21 +00:00
parent e44d4929ce
commit b73b3e5a2d
4 changed files with 31 additions and 2 deletions

View File

@ -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 <elf_priv.h>
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 */

View File

@ -17,6 +17,8 @@ typedef struct address_range {
#include <platform_kernel_args.h>
#include <arch_kernel_args.h>
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;

View File

@ -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);

View File

@ -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