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:
parent
8c6c1ee634
commit
7228ff3b12
1 changed files with 2 additions and 11 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue