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
|
|
|
|
|
|
|
#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;
|
|
|
|
uint32 vir_pgdir;
|
|
|
|
uint32 num_pgtables;
|
|
|
|
uint32 pgtables[MAX_BOOT_PTABLES];
|
2010-03-02 21:13:06 +03:00
|
|
|
uint32 virtual_end;
|
2003-01-31 00:20:33 +03:00
|
|
|
uint32 phys_idt;
|
|
|
|
uint32 vir_idt;
|
|
|
|
uint32 phys_gdt;
|
|
|
|
uint32 vir_gdt;
|
|
|
|
uint32 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;
|
|
|
|
uint32 *apic;
|
|
|
|
uint32 ioapic_phys;
|
|
|
|
uint32 *ioapic;
|
|
|
|
uint32 cpu_apic_id[MAX_BOOT_CPUS];
|
|
|
|
uint32 cpu_apic_version[MAX_BOOT_CPUS];
|
2008-08-22 12:03:25 +04:00
|
|
|
// hpet stuff
|
|
|
|
uint32 hpet_phys;
|
|
|
|
uint32 *hpet;
|
2002-07-09 16:24:59 +04:00
|
|
|
} arch_kernel_args;
|
|
|
|
|
2003-10-08 03:34:59 +04:00
|
|
|
#endif /* KERNEL_ARCH_x86_KERNEL_ARGS_H */
|