X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fgeekos%2Fgdt.c;h=707e34a2a4ea08d46b22ee2497a32151bbccf7f9;hb=271ad3fd89672d441db3c5ffa673ee649e4ce532;hp=dd0ca5beadd59de602c351f5fb30aeccd84d9b2c;hpb=626595465a2c6987606a6bc697df65130ad8c2d3;p=palacios.git diff --git a/palacios/src/geekos/gdt.c b/palacios/src/geekos/gdt.c index dd0ca5b..707e34a 100644 --- a/palacios/src/geekos/gdt.c +++ b/palacios/src/geekos/gdt.c @@ -1,7 +1,7 @@ /* * Initialize kernel GDT. * Copyright (c) 2001,2004 David H. Hovemeyer - * $Revision: 1.1 $ + * $Revision: 1.4 $ * * This is free software. You are permitted to use, * redistribute, and modify it as specified in the file "COPYING". @@ -14,6 +14,7 @@ #include #include +#include /* * This is defined in lowlevel.asm. @@ -32,8 +33,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. */ @@ -46,11 +46,11 @@ static int s_numAllocated = 0; void DumpGDT() { int i; - Print("GDT Contents:\n"); + PrintBoth("GDT Contents:\n"); for (i=0;i> 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;