Skip to contentSkip to conversation

x86: Fix GDT limit in start16.S

PATCH New Bin Meng 2 participants 2 messages Oct 16, 2014 x86

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 2/2 x86: Fix GDT limit in start16.S

GDT limit should be one less than an integral multiple of eight.

---
 arch/x86/cpu/start16.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/cpu/start16.S +1 -1
index 8b9b327..6968fda 100644
@@ -70,7 +70,7 @@ idt_ptr:
  * GDT is setup in a safe location in RAM
  */
 gdt_ptr:
-	.word	0x20		/* limit (32 bytes = 4 GDT entries) */
+	.word	0x1f		/* limit (31 bytes = 4 GDT entries - 1) */
 	.long	BOOT_SEG + gdt	/* base */
 
 /* Some CPUs are picky about GDT alignment... */
Signature · 1 line
1.8.2.1
#1 lore raw

PATCH 2/2 x86: Fix GDT limit in start16.S

Quoted 21 lines · Bin Meng

GDT limit should be one less than an integral multiple of eight.

---
 arch/x86/cpu/start16.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/cpu/start16.S +1 -2
index 8b9b327..6968fda 100644
@@ -70,7 +70,7 @@ idt_ptr:
  * GDT is setup in a safe location in RAM
  */
 gdt_ptr:
-       .word   0x20            /* limit (32 bytes = 4 GDT entries) */
+       .word   0x1f            /* limit (31 bytes = 4 GDT entries - 1) */
        .long   BOOT_SEG + gdt  /* base */
 
 /* Some CPUs are picky about GDT alignment... */
--
Quoted 2 lines

1.8.2.1

Regards,
Simon