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 13 #include <util/FixedWidthPointer.h> 14 15 16 #define MAX_BOOT_PTABLES 4 17 18 #define _PACKED __attribute__((packed)) 19 20 #define IDT_LIMIT 0x800 21 #define GDT_LIMIT 0x800 22 23 // kernel args 24 typedef struct { 25 // architecture specific 26 uint32 system_time_cv_factor; 27 uint64 cpu_clock_speed; 28 uint32 phys_pgdir; 29 uint64 vir_pgdir; 30 uint32 num_pgtables; 31 uint32 pgtables[MAX_BOOT_PTABLES]; 32 uint64 virtual_end; 33 uint32 phys_idt; 34 uint64 vir_idt; 35 uint32 phys_gdt; 36 uint64 vir_gdt; 37 uint64 page_hole; 38 // smp stuff 39 uint32 apic_time_cv_factor; // apic ticks per second 40 uint32 apic_phys; 41 FixedWidthPointer<void> apic; 42 uint32 ioapic_phys; 43 uint32 cpu_apic_id[MAX_BOOT_CPUS]; 44 uint32 cpu_apic_version[MAX_BOOT_CPUS]; 45 // hpet stuff 46 uint32 hpet_phys; 47 FixedWidthPointer<void> hpet; 48 } _PACKED arch_kernel_args; 49 50 #endif /* KERNEL_ARCH_x86_KERNEL_ARGS_H */ 51