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".
16 #define COMMAND_LINE_SIZE 1024
18 #define SETUPSECTS 4 /* default nr of setup-sectors */
19 #define SYSSIZE 0x7f00 /* system size: # of 16-byte clicks */
20 #define ROOT_DEV 0 /* ROOT_DEV is now written by "build" */
21 #define SWAP_DEV 0 /* SWAP_DEV is now written by "build" */
24 * Kernel code and data segment selectors.
25 * Keep these up to date with defs.asm.
27 #define KERNEL_CS (1<<3)
28 #define KERNEL_DS (2<<3)
32 * Address where kernel is loaded
34 #define KERNEL_START_ADDR 0x100000
37 * Kernel and user privilege levels
39 #define KERNEL_PRIVILEGE 0
40 #define USER_PRIVILEGE 3
44 * Software interrupt for syscalls
46 #define SYSCALL_INT 0x90
49 * The windows versions of gcc use slightly different
50 * names for the bss begin and end symbols than the Linux version.
52 #if defined(GNU_WIN32)
53 # define BSS_START _bss_start__
54 # define BSS_END _bss_end__
56 # define BSS_START __bss_start
61 * x86 has 4096 byte pages
64 #define PAGE_SIZE (1<<PAGE_POWER)
65 #define PAGE_MASK (~(0xffffffff << PAGE_POWER))
67 #define KERNEL_THREAD_OBJECT (PAGE_SIZE)
68 #define KERNEL_STACK (PAGE_SIZE * 2)
72 // Where we load the vm's kernel image (1MB)
73 //#define VM_KERNEL_TARGET (0x100000)
79 #endif /* GEEKOS_DEFS_H */