Moved the kernel_args structure to the new kernel_args.h header file.

stage2.h is now of interest for the stage2 boot loader only.
stage2_struct.h is no longer needed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4959 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-10-07 21:58:48 +00:00
parent f432eca440
commit 79dd9caf61
2 changed files with 60 additions and 29 deletions

View File

@ -0,0 +1,48 @@
/*
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef KERNEL_BOOT_KERNEL_ARGS_H
#define KERNEL_BOOT_KERNEL_ARGS_H
#include <SupportDefs.h>
#include <platform_kernel_args.h>
typedef struct address_range {
uint32 start;
uint32 size;
} addr_range;
typedef struct kernel_args {
uint32 cons_line;
char *str;
addr_range bootdir_addr;
addr_range kernel_seg0_addr;
addr_range kernel_seg1_addr;
addr_range kernel_dynamic_section_addr;
uint32 num_physical_memory_ranges;
addr_range physical_memory_range[MAX_PHYSICAL_MEMORY_RANGE];
uint32 num_physical_allocated_ranges;
addr_range physical_allocated_range[MAX_PHYSICAL_ALLOCATED_RANGE];
uint32 num_virtual_allocated_ranges;
addr_range virtual_allocated_range[MAX_VIRTUAL_ALLOCATED_RANGE];
uint32 num_cpus;
addr_range cpu_kstack[MAX_BOOT_CPUS];
platform_kernel_args platform_args;
struct framebuffer {
int enabled;
int x_size;
int y_size;
int bit_depth;
int already_mapped;
addr_range mapping;
} fb;
} kernel_args;
#endif /* KERNEL_BOOT_KERNEL_ARGS_H */

View File

@ -6,39 +6,22 @@
#ifndef KERNEL_BOOT_STAGE2_H
#define KERNEL_BOOT_STAGE2_H
// this file declares stuff like addr_range, MAX_*, etc.
#include <boot/stage2_struct.h>
#include <arch_stage2.h>
#include <boot/kernel_args.h>
// kernel args
typedef struct kernel_args {
uint32 cons_line;
char *str;
addr_range bootdir_addr;
addr_range kernel_seg0_addr;
addr_range kernel_seg1_addr;
addr_range kernel_dynamic_section_addr;
uint32 num_phys_mem_ranges;
struct stage2_args;
extern struct kernel_args gKernelArgs;
addr_range phys_mem_range[MAX_PHYS_MEM_ADDR_RANGE];
uint32 num_phys_alloc_ranges;
addr_range phys_alloc_range[MAX_PHYS_ALLOC_ADDR_RANGE];
uint32 num_virt_alloc_ranges;
addr_range virt_alloc_range[MAX_VIRT_ALLOC_ADDR_RANGE];
uint32 num_cpus;
addr_range cpu_kstack[MAX_BOOT_CPUS];
arch_kernel_args arch_args;
#ifdef __cplusplus
extern "C" {
#endif
struct framebuffer {
int enabled;
int x_size;
int y_size;
int bit_depth;
int already_mapped;
addr_range mapping;
} fb;
} kernel_args;
extern int main(struct stage2_args *args);
#ifdef __cplusplus
}
#endif
#endif /* KERNEL_BOOT_STAGE2_H */