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>
|
|
|
|
|
|
|
|
|
2002-07-09 16:24:59 +04:00
|
|
|
#define MAX_BOOT_PTABLES 4
|
|
|
|
|
2002-07-25 00:59:25 +04:00
|
|
|
#define _PACKED __attribute__((packed))
|
|
|
|
|
|
|
|
#define IDT_LIMIT 0x800
|
|
|
|
#define GDT_LIMIT 0x800
|
|
|
|
|
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;
|
2003-01-31 00:20:33 +03:00
|
|
|
uint32 phys_idt;
|
2012-06-26 14:01:23 +04:00
|
|
|
uint64 vir_idt;
|
2003-01-31 00:20:33 +03:00
|
|
|
uint32 phys_gdt;
|
2012-06-26 14:01:23 +04:00
|
|
|
uint64 vir_gdt;
|
|
|
|
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;
|
|
|
|
} _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 */
|