xref: /haiku/headers/private/kernel/arch/x86/arch_kernel_args.h (revision 7749d0bb0c358a3279b1b9cc76d8376e900130a5)
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	virtual_end;
29 	uint32	phys_idt;
30 	uint32	vir_idt;
31 	uint32	phys_gdt;
32 	uint32	vir_gdt;
33 	uint32	page_hole;
34 	// smp stuff
35 	uint32	apic_time_cv_factor; // apic ticks per second
36 	uint32	apic_phys;
37 	uint32	*apic;
38 	uint32	ioapic_phys;
39 	uint32	*ioapic;
40 	uint32	cpu_apic_id[MAX_BOOT_CPUS];
41 	uint32	cpu_apic_version[MAX_BOOT_CPUS];
42 	// hpet stuff
43 	uint32	hpet_phys;
44 	uint32	*hpet;
45 } arch_kernel_args;
46 
47 #endif	/* KERNEL_ARCH_x86_KERNEL_ARGS_H */
48