Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Release 1.0
[palacios.git] / geekos / include / geekos / defs.h
1 /*
2  * Misc. kernel definitions
3  * Copyright (c) 2001,2004 David H. Hovemeyer <daveho@cs.umd.edu>
4  * $Revision: 1.9 $
5  * 
6  * This is free software.  You are permitted to use,
7  * redistribute, and modify it as specified in the file "COPYING".
8  */
9
10 #ifndef GEEKOS_DEFS_H
11 #define GEEKOS_DEFS_H
12
13
14 /*Zheng 08/01/2008*/
15 #define SYSSEG             0x1000
16 #define COMMAND_LINE_SIZE  1024
17
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" */
22
23 /*
24  * Kernel code and data segment selectors.
25  * Keep these up to date with defs.asm.
26  */
27 #define KERNEL_CS  (1<<3)
28 #define KERNEL_DS  (2<<3)
29
30
31 /*
32  * Address where kernel is loaded
33  */
34 #define KERNEL_START_ADDR 0x100000
35
36 /*
37  * Kernel and user privilege levels
38  */
39 #define KERNEL_PRIVILEGE 0
40 #define USER_PRIVILEGE 3
41
42
43 /*
44  * Software interrupt for syscalls
45  */
46 #define SYSCALL_INT 0x90
47
48 /*
49  * The windows versions of gcc use slightly different
50  * names for the bss begin and end symbols than the Linux version.
51  */
52 #if defined(GNU_WIN32)
53 #  define BSS_START _bss_start__
54 #  define BSS_END _bss_end__
55 #else
56 #  define BSS_START __bss_start
57 #  define BSS_END end
58 #endif
59
60 /*
61  * x86 has 4096 byte pages
62  */
63 #define PAGE_POWER 12
64 #define PAGE_SIZE (1<<PAGE_POWER)
65 #define PAGE_MASK (~(0xffffffff << PAGE_POWER))
66
67 #define KERNEL_THREAD_OBJECT (PAGE_SIZE)
68 #define KERNEL_STACK (PAGE_SIZE * 2)
69
70
71
72 // Where we load the vm's kernel image (1MB)
73 //#define VM_KERNEL_TARGET (0x100000) 
74
75
76
77
78
79 #endif  /* GEEKOS_DEFS_H */