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.


moved guest files to kernel image
[palacios.git] / palacios / include / geekos / defs.h
1 /*
2  * Misc. kernel definitions
3  * Copyright (c) 2001,2004 David H. Hovemeyer <daveho@cs.umd.edu>
4  * $Revision: 1.5 $
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
15
16 /*
17  * Kernel code and data segment selectors.
18  * Keep these up to date with defs.asm.
19  */
20 #define KERNEL_CS  (1<<3)
21 #define KERNEL_DS  (2<<3)
22
23
24 /*
25  * Address where kernel is loaded
26  */
27 #define KERNEL_START_ADDR 0x100000
28
29 /*
30  * Kernel and user privilege levels
31  */
32 #define KERNEL_PRIVILEGE 0
33 #define USER_PRIVILEGE 3
34
35
36 /*
37  * Software interrupt for syscalls
38  */
39 #define SYSCALL_INT 0x90
40
41 /*
42  * The windows versions of gcc use slightly different
43  * names for the bss begin and end symbols than the Linux version.
44  */
45 #if defined(GNU_WIN32)
46 #  define BSS_START _bss_start__
47 #  define BSS_END _bss_end__
48 #else
49 #  define BSS_START __bss_start
50 #  define BSS_END end
51 #endif
52
53 /*
54  * x86 has 4096 byte pages
55  */
56 #define PAGE_POWER 12
57 #define PAGE_SIZE (1<<PAGE_POWER)
58 #define PAGE_MASK (~(0xffffffff << PAGE_POWER))
59
60 #define KERNEL_THREAD_OBJECT (PAGE_SIZE)
61 #define KERNEL_STACK (PAGE_SIZE * 2)
62
63
64
65 // Where we load the vm's kernel image (1MB)
66 #define VM_KERNEL_TARGET (0x100000) 
67
68
69
70
71
72 #endif  /* GEEKOS_DEFS_H */