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.


WTF??????
[palacios.git] / palacios / src / geekos / gdt.c
index dd0ca5b..d206939 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Initialize kernel GDT.
  * Copyright (c) 2001,2004 David H. Hovemeyer <daveho@cs.umd.edu>
- * $Revision: 1.1 $
+ * $Revision: 1.3 $
  * 
  * This is free software.  You are permitted to use,
  * redistribute, and modify it as specified in the file "COPYING".
@@ -32,8 +32,7 @@ extern void Load_GDTR(ushort_t* limitAndBase);
 /*
  * This is the kernel's global descriptor table.
  */
-struct Segment_Descriptor *s_GDT=(struct Segment_Descriptor *)GDT_LOCATION;
-
+struct Segment_Descriptor s_GDT[NUM_GDT_ENTRIES];
 /*
  * Number of allocated GDT entries.
  */
@@ -139,7 +138,6 @@ void Init_GDT(void)
     struct Segment_Descriptor* desc;
     int i;
 
-    Print("GDT Placed at %x, %d entries\n",GDT_LOCATION,NUM_GDT_ENTRIES);
 
     KASSERT(sizeof(struct Segment_Descriptor) == 8);
 
@@ -170,6 +168,8 @@ void Init_GDT(void)
     );
     KASSERT(Get_Descriptor_Index(desc) == (KERNEL_DS >> 3));
 
+    Print("GDT: Base=0x%.8x, limit=%d\n", (uint_t)gdtBaseAddr,  (uint_t)(sizeof(struct Segment_Descriptor) * NUM_GDT_ENTRIES));
+
     /* Activate the kernel GDT. */
     limitAndBase[0] = sizeof(struct Segment_Descriptor) * NUM_GDT_ENTRIES;
     limitAndBase[1] = gdtBaseAddr & 0xffff;