From 7228ff3b125e41811f4c9c070713fa095ec838a1 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Sun, 4 Jan 2015 01:35:39 +0100 Subject: [PATCH] fix bug in the calculation of the number of gdt entries Signed-off-by: Stefan Lankes --- arch/x86/include/asm/gdt.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/arch/x86/include/asm/gdt.h b/arch/x86/include/asm/gdt.h index ffdcde9..c2005df 100644 --- a/arch/x86/include/asm/gdt.h +++ b/arch/x86/include/asm/gdt.h @@ -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: