1 /* 2 ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. 3 ** Distributed under the terms of the NewOS License. 4 */ 5 #ifndef KERNEL_ARCH_x86_KERNEL_ARGS_H 6 #define KERNEL_ARCH_x86_KERNEL_ARGS_H 7 8 #ifndef KERNEL_BOOT_KERNEL_ARGS_H 9 # error This file is included from <boot/kernel_args.h> only 10 #endif 11 12 #define MAX_BOOT_PTABLES 4 13 14 #define _PACKED __attribute__((packed)) 15 16 #define IDT_LIMIT 0x800 17 #define GDT_LIMIT 0x800 18 19 // kernel args 20 typedef struct { 21 // architecture specific 22 uint32 system_time_cv_factor; 23 uint64 cpu_clock_speed; 24 uint32 phys_pgdir; 25 uint32 vir_pgdir; 26 uint32 num_pgtables; 27 uint32 pgtables[MAX_BOOT_PTABLES]; 28 uint32 phys_idt; 29 uint32 vir_idt; 30 uint32 phys_gdt; 31 uint32 vir_gdt; 32 uint32 page_hole; 33 // smp stuff 34 uint32 apic_time_cv_factor; // apic ticks per second 35 uint32 apic_phys; 36 uint32 *apic; 37 uint32 ioapic_phys; 38 uint32 *ioapic; 39 uint32 cpu_apic_id[MAX_BOOT_CPUS]; 40 uint32 cpu_os_id[MAX_BOOT_CPUS]; 41 uint32 cpu_apic_version[MAX_BOOT_CPUS]; 42 } arch_kernel_args; 43 44 #endif /* KERNEL_ARCH_x86_KERNEL_ARGS_H */ 45