2002-07-25 00:59:25 +04:00
|
|
|
/*
|
2002-07-09 16:24:59 +04:00
|
|
|
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
|
|
|
** Distributed under the terms of the NewOS License.
|
|
|
|
*/
|
2003-10-08 03:34:59 +04:00
|
|
|
#ifndef KERNEL_ARCH_x86_KERNEL_ARGS_H
|
|
|
|
#define KERNEL_ARCH_x86_KERNEL_ARGS_H
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2003-10-08 03:34:59 +04:00
|
|
|
#ifndef KERNEL_BOOT_KERNEL_ARGS_H
|
|
|
|
# error This file is included from <boot/kernel_args.h> only
|
|
|
|
#endif
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2012-06-21 21:02:23 +04:00
|
|
|
|
|
|
|
#include <util/FixedWidthPointer.h>
|
|
|
|
|
|
|
|
|
2016-04-23 03:05:19 +03:00
|
|
|
#define MAX_BOOT_PTABLES 16
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2002-07-25 00:59:25 +04:00
|
|
|
#define _PACKED __attribute__((packed))
|
|
|
|
|
2002-07-09 16:24:59 +04:00
|
|
|
// kernel args
|
|
|
|
typedef struct {
|
|
|
|
// architecture specific
|
2003-01-31 00:20:33 +03:00
|
|
|
uint32 system_time_cv_factor;
|
2004-11-30 23:57:36 +03:00
|
|
|
uint64 cpu_clock_speed;
|
2003-01-31 00:20:33 +03:00
|
|
|
uint32 phys_pgdir;
|
2012-06-26 14:01:23 +04:00
|
|
|
uint64 vir_pgdir;
|
2003-01-31 00:20:33 +03:00
|
|
|
uint32 num_pgtables;
|
|
|
|
uint32 pgtables[MAX_BOOT_PTABLES];
|
2012-06-26 14:01:23 +04:00
|
|
|
uint64 virtual_end;
|
|
|
|
uint64 page_hole;
|
2002-07-09 16:24:59 +04:00
|
|
|
// smp stuff
|
2003-01-31 00:20:33 +03:00
|
|
|
uint32 apic_time_cv_factor; // apic ticks per second
|
|
|
|
uint32 apic_phys;
|
2012-06-21 21:02:23 +04:00
|
|
|
FixedWidthPointer<void> apic;
|
2003-01-31 00:20:33 +03:00
|
|
|
uint32 ioapic_phys;
|
2013-12-06 22:43:08 +04:00
|
|
|
uint32 cpu_apic_id[SMP_MAX_CPUS];
|
|
|
|
uint32 cpu_apic_version[SMP_MAX_CPUS];
|
2008-08-22 12:03:25 +04:00
|
|
|
// hpet stuff
|
|
|
|
uint32 hpet_phys;
|
2012-06-21 21:02:23 +04:00
|
|
|
FixedWidthPointer<void> hpet;
|
2014-04-24 15:35:40 +04:00
|
|
|
// needed for UEFI, otherwise kernel acpi support can't find ACPI root
|
|
|
|
FixedWidthPointer<void> acpi_root;
|
2012-06-21 21:02:23 +04:00
|
|
|
} _PACKED arch_kernel_args;
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2003-10-08 03:34:59 +04:00
|
|
|
#endif /* KERNEL_ARCH_x86_KERNEL_ARGS_H */
|