2 * Misc. kernel definitions
3 * Copyright (c) 2001,2004 David H. Hovemeyer <daveho@cs.umd.edu>
6 * This is free software. You are permitted to use,
7 * redistribute, and modify it as specified in the file "COPYING".
17 * Kernel code and data segment selectors.
18 * Keep these up to date with defs.asm.
20 #define KERNEL_CS (1<<3)
21 #define KERNEL_DS (2<<3)
25 * Address where kernel is loaded
27 #define KERNEL_START_ADDR 0x10000
30 * Kernel and user privilege levels
32 #define KERNEL_PRIVILEGE 0
33 #define USER_PRIVILEGE 3
37 * Software interrupt for syscalls
39 #define SYSCALL_INT 0x90
42 * The windows versions of gcc use slightly different
43 * names for the bss begin and end symbols than the Linux version.
45 #if defined(GNU_WIN32)
46 # define BSS_START _bss_start__
47 # define BSS_END _bss_end__
49 # define BSS_START __bss_start
54 * x86 has 4096 byte pages
57 #define PAGE_SIZE (1<<PAGE_POWER)
58 #define PAGE_MASK (~(0xffffffff << PAGE_POWER))
60 #define KERNEL_THREAD_OBJECT (PAGE_SIZE)
61 #define KERNEL_STACK (PAGE_SIZE * 2)
65 // Where we load the vm's kernel image (1MB)
66 #define VM_KERNEL_TARGET (0x100000)
72 #endif /* GEEKOS_DEFS_H */