1 /* 2 * Copyright 2002-2005, Axel Dörfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 * 5 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. 6 * Distributed under the terms of the NewOS License. 7 */ 8 #ifndef KERNEL_BOOT_KERNEL_ARGS_H 9 #define KERNEL_BOOT_KERNEL_ARGS_H 10 11 12 #include <SupportDefs.h> 13 14 #include <boot/elf.h> 15 #include <boot/disk_identifier.h> 16 #include <boot/driver_settings.h> 17 18 #include <platform_kernel_args.h> 19 #include <arch_kernel_args.h> 20 21 22 #define CURRENT_KERNEL_ARGS_VERSION 1 23 #define MAX_KERNEL_ARGS_RANGE 8 24 25 typedef struct kernel_args { 26 uint32 kernel_args_size; 27 uint32 version; 28 29 struct preloaded_image kernel_image; 30 struct preloaded_image *preloaded_images; 31 32 uint32 num_physical_memory_ranges; 33 addr_range physical_memory_range[MAX_PHYSICAL_MEMORY_RANGE]; 34 uint32 num_physical_allocated_ranges; 35 addr_range physical_allocated_range[MAX_PHYSICAL_ALLOCATED_RANGE]; 36 uint32 num_virtual_allocated_ranges; 37 addr_range virtual_allocated_range[MAX_VIRTUAL_ALLOCATED_RANGE]; 38 uint32 num_kernel_args_ranges; 39 addr_range kernel_args_range[MAX_KERNEL_ARGS_RANGE]; 40 41 uint32 num_cpus; 42 addr_range cpu_kstack[MAX_BOOT_CPUS]; 43 44 struct { 45 disk_identifier identifier; 46 off_t partition_offset; 47 bool user_selected; 48 bool booted_from_image; 49 bool cd; 50 } boot_disk; 51 52 struct driver_settings_file *driver_settings; 53 54 struct { 55 bool enabled; 56 int32 width; 57 int32 height; 58 int32 depth; 59 addr_range physical_buffer; 60 } frame_buffer; 61 62 platform_kernel_args platform_args; 63 arch_kernel_args arch_args; 64 } kernel_args; 65 66 #endif /* KERNEL_BOOT_KERNEL_ARGS_H */ 67