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:
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
** Copyright 2003, Axel Dörfler, [email protected]. 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 */
|
||||||
@@ -17,6 +17,8 @@ typedef struct address_range {
|
|||||||
#include <platform_kernel_args.h>
|
#include <platform_kernel_args.h>
|
||||||
#include <arch_kernel_args.h>
|
#include <arch_kernel_args.h>
|
||||||
|
|
||||||
|
struct preloaded_image;
|
||||||
|
|
||||||
typedef struct kernel_args {
|
typedef struct kernel_args {
|
||||||
uint32 cons_line;
|
uint32 cons_line;
|
||||||
char *str;
|
char *str;
|
||||||
@@ -25,6 +27,8 @@ typedef struct kernel_args {
|
|||||||
addr_range kernel_seg1_addr;
|
addr_range kernel_seg1_addr;
|
||||||
addr_range kernel_dynamic_section_addr;
|
addr_range kernel_dynamic_section_addr;
|
||||||
|
|
||||||
|
struct preloaded_image *preloaded_images;
|
||||||
|
|
||||||
uint32 num_physical_memory_ranges;
|
uint32 num_physical_memory_ranges;
|
||||||
addr_range physical_memory_range[MAX_PHYSICAL_MEMORY_RANGE];
|
addr_range physical_memory_range[MAX_PHYSICAL_MEMORY_RANGE];
|
||||||
uint32 num_physical_allocated_ranges;
|
uint32 num_physical_allocated_ranges;
|
||||||
|
|||||||
@@ -24,6 +24,10 @@ extern void dprintf(const char *format, ...);
|
|||||||
extern void platform_release_heap(struct stage2_args *args, void *base);
|
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);
|
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 */
|
/* misc functions */
|
||||||
extern bool platform_user_menu_requested(void);
|
extern bool platform_user_menu_requested(void);
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern void *arch_mmu_alloc_at(void *address, size_t size, uint8 protection);
|
extern void *arch_mmu_allocate(void *address, size_t size, uint8 protection);
|
||||||
extern void *arch_mmu_alloc(size_t size, uint8 protection);
|
extern status_t arch_mmu_free(void *address, size_t size);
|
||||||
extern status_t arch_mmu_init(void);
|
extern status_t arch_mmu_init(void);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Reference in New Issue
Block a user