fix bug in the calculation of the number of gdt entries

Signed-off-by: Stefan Lankes <slankes@eonerc.rwth-aachen.de>
This commit is contained in:
Stefan Lankes 2015-01-04 01:35:39 +01:00
parent 8c6c1ee634
commit 7228ff3b12

View file

@ -110,26 +110,17 @@ typedef struct {
size_t base;
} __attribute__ ((packed)) gdt_ptr_t;
#ifdef CONFIG_LGUEST
// TODO TODO: Just hacked in
#define GDT_ENTRIES 32
#else
#ifdef CONFIG_X86_32
#define GDT_ENTRIES (5+MAX_TASKS)
#define GDT_ENTRIES (5+1)
#else
// a TSS descriptor is twice larger than a code/data descriptor
#define GDT_ENTRIES (5+MAX_TASKS*2)
#define GDT_ENTRIES (5+1*2)
#endif
#if GDT_ENTRIES > 8192
#error Too many GDT entries!
#endif
#endif
/** @brief Installs the global descriptor table
*
* The installation involves the following steps: