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 16
17
18#define _PACKED __attribute__((packed))
19
20// kernel args
21typedef struct {
22	// architecture specific
23	uint32	system_time_cv_factor;
24	uint64	cpu_clock_speed;
25	uint32	phys_pgdir;
26	uint64	vir_pgdir;
27	uint32	num_pgtables;
28	uint32	pgtables[MAX_BOOT_PTABLES];
29	uint64	virtual_end;
30	uint64	page_hole;
31	// smp stuff
32	uint32	apic_time_cv_factor; // apic ticks per second
33	uint32	apic_phys;
34	FixedWidthPointer<void> apic;
35	uint32	ioapic_phys;
36	uint32	cpu_apic_id[SMP_MAX_CPUS];
37	uint32	cpu_apic_version[SMP_MAX_CPUS];
38	// hpet stuff
39	uint32	hpet_phys;
40	FixedWidthPointer<void> hpet;
41	// needed for UEFI, otherwise kernel acpi support can't find ACPI root
42	FixedWidthPointer<void> acpi_root;
43} _PACKED arch_kernel_args;
44
45#endif	/* KERNEL_ARCH_x86_KERNEL_ARGS_H */
46