summaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2009-11-22 19:50:25 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2009-11-22 19:50:25 +0100
commit3f0ec95261c6723ae4ee930ce6299a7562f93906 (patch)
tree9f9f4c2d422caaeb084468585e383913b269d229 /i386
parent567b9088f3d2ce24a5ab283b9a6828595a914895 (diff)
Do not assume that VM_MIN_KERNEL_ADDRESS is 0
* i386/i386/gdt.c (gdt_init): Subtract VM_MIN_KERNEL_ADDRESS from LINEAR_MIN_KERNEL_ADDRESS to avoid assuming the former being 0.
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/gdt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/i386/i386/gdt.c b/i386/i386/gdt.c
index 8484073..845e7c6 100644
--- a/i386/i386/gdt.c
+++ b/i386/i386/gdt.c
@@ -43,12 +43,12 @@ gdt_init()
{
/* Initialize the kernel code and data segment descriptors. */
fill_gdt_descriptor(KERNEL_CS,
- LINEAR_MIN_KERNEL_ADDRESS,
- LINEAR_MAX_KERNEL_ADDRESS - LINEAR_MIN_KERNEL_ADDRESS - 1,
+ LINEAR_MIN_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS,
+ LINEAR_MAX_KERNEL_ADDRESS - (LINEAR_MIN_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) - 1,
ACC_PL_K|ACC_CODE_R, SZ_32);
fill_gdt_descriptor(KERNEL_DS,
- LINEAR_MIN_KERNEL_ADDRESS,
- LINEAR_MAX_KERNEL_ADDRESS - LINEAR_MIN_KERNEL_ADDRESS - 1,
+ LINEAR_MIN_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS,
+ LINEAR_MAX_KERNEL_ADDRESS - (LINEAR_MIN_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) - 1,
ACC_PL_K|ACC_DATA_W, SZ_32);
fill_gdt_descriptor(LINEAR_DS,
0,