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.


added memory region generated page tables, and removed all the ugliness that was...
[palacios.git] / palacios / include / geekos / defs.h
index 5d9bf89..f76f013 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Misc. kernel definitions
  * Copyright (c) 2001,2004 David H. Hovemeyer <daveho@cs.umd.edu>
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
  * 
  * This is free software.  You are permitted to use,
  * redistribute, and modify it as specified in the file "COPYING".
@@ -22,8 +22,7 @@
 
 
 /*
- * Address where kernel is loaded INITIALLY
- * we move it up in memory soon
+ * Address where kernel is loaded
  */
 #define KERNEL_START_ADDR 0x10000
 
 #define PAGE_SIZE (1<<PAGE_POWER)
 #define PAGE_MASK (~(0xffffffff << PAGE_POWER))
 
+#define KERNEL_THREAD_OBJECT (PAGE_SIZE)
+#define KERNEL_STACK (PAGE_SIZE * 2)
+
 
 
-/* Ultimate Memory Layout
-
-TOP_OF_MEM:    
-        GDT (one page)
-        TSS (one page)
-        IDT (one page)
-        KernelImage
-          VMBootPackage
-             rombios (2nd copy)
-             vmxassist
-             vgabios
-             rombios (1st copy)
-        PageList           (varies - must be an integral number of pages)
-       KernelHeap         (varies - KERNEL_HEAP_SIZE; must be integral number of pages)
-        KernelStack        (one page)
-        KernelThreadObject (one page)
-0+VM_SIZE:
-        VM (including ISA hole)          
-        (KernelImage, GDT, and IDT start down here and are moved up)
-        (VMBoot Package is copied down to the first MB to start the VM boot)
-        (VMXAssist is used to provide real mode emulation for initial VM boot steps)
-0:      
-*/
-
-// This is for a 1 GB Machine
-// The last address (+1) at which physical memory ends
-#define TOP_OF_MEM (0x30000000)
-// How much space to reserve for the VM
-#define VM_SIZE    (0x20000000)
-// Where the VM starts in physical memory
-#define START_OF_VM (0x0)
 // Where we load the vm's kernel image (1MB)
 #define VM_KERNEL_TARGET (0x100000) 
 
 
 
-#define GDT_SIZE PAGE_SIZE
-#define TSS_SIZE PAGE_SIZE
-#define IDT_SIZE PAGE_SIZE
-#define KERNEL_HEAP_SIZE (256*PAGE_SIZE)
-#define KERNEL_STACK_SIZE PAGE_SIZE
-#define KERNEL_THREAD_OBJECT_SIZE PAGE_SIZE
-
-
-
-
-/*
- *  * Keep these up to date with defs.asm.
- */
-#define GDT_LOCATION          (TOP_OF_MEM-GDT_SIZE)
-#define TSS_LOCATION          (GDT_LOCATION-TSS_SIZE)
-#define IDT_LOCATION          (TSS_LOCATION-IDT_SIZE)
-
-
-#define FINAL_KERNEL_START    (IDT_LOCATION-MAX_VMM)
-#define FINAL_KERNEL_END      (FINAL_KERNEL_START+KERNEL_CORE_LENGTH-1)
-#define FINAL_VM_KERNEL_START      (FINAL_KERNEL_START+KERNEL_CORE_LENGTH)
-#define FINAL_VM_KERNEL_END        (FINAL_VM_KERNEL_START+VM_KERNEL_LENGTH-1)
-#define FINAL_VMBOOTSTART     (FINAL_VM_KERNEL_START)
-#define FINAL_VMBOOTEND       (VM_BOOT_PACKAGE_END)
-
-#if (FINAL_VMBOOTEND>IDT_LOCATION)
-#error VMM_MAX is too small!
-#endif
-
-
-#define KERNEL_THREAD_OBJECT  (START_OF_VM+VM_SIZE)
-#define KERNEL_STACK          (KERNEL_THREAD_OBJECT+KERNEL_THREAD_OBJECT_SIZE)
-#define KERNEL_HEAP           (KERNEL_STACK+KERNEL_STACK_SIZE)
-#define KERNEL_PAGELIST       (KERNEL_HEAP+KERNEL_HEAP_SIZE)
-
-
-/*
- * PC memory map
- */
-#define ISA_HOLE_START 0x0A0000
-#define ISA_HOLE_END   0x100000
 
 
 #endif  /* GEEKOS_DEFS_H */