[PATCH 2.4.24] Fix GDT limit in setup.S

From: Coywolf Qi Hunt
Date: Mon Feb 16 2004 - 14:09:20 EST


Hello 2.4.xx hackers,

In setup.S, i feel like that the gdt limit 0x8000 is not proper and it should be 0x800. How came 0x800 into 0x8000 in 2.4.xx code? Is there a story? It shouldn't be a careless typo. 256 gdt entries should be enough and since it's boot gdt, 256 is ok even if the code is run on SMP with 64 cpus.

At least the comment doesn't match the code. Either fix the code or fix the comment. We really needn't so many GDT entries. Let's use the intel segmentation in a most limited way. Below follows a patch fixing the code.

I don't have the latest 2.4.24, but setup.S isn't changed from 2.4.23 to 2.4.24.

Regards, Coywolf

--
Coywolf Qi Hunt
Admin of http://GreatCN.org and http://LoveCN.org

--- arch/i386/boot/setup.S.orig 2003-11-29 02:26:20.000000000 +0800
+++ arch/i386/boot/setup.S 2004-02-17 01:15:42.000000000 +0800
@@ -1093,7 +1093,7 @@
.word 0 # idt limit = 0
.word 0, 0 # idt base = 0L
gdt_48:
- .word 0x8000 # gdt limit=2048,
+ .word 0x800 # gdt limit=2048,
# 256 GDT entries

.word 0, 0 # gdt base (filled in later)