summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJames Bottomley <jejb@raven.il.steeleye.com>2002-12-27 23:19:05 -0600
committerJames Bottomley <jejb@raven.il.steeleye.com>2002-12-27 23:19:05 -0600
commit339d617ff03e2cc4326526f6ff395947b41d920b (patch)
tree4222859cc1a7078defad5599d5c4e28ad7ea2976 /include
parentb24fc5b28cb83f3133c5d85114adf84405543599 (diff)
boot with small GDT
Switch to larger operating GDT after moving to protected mode This is necessary to boot on certain subarchs (voyager)
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/desc.h1
-rw-r--r--include/asm-i386/segment.h8
2 files changed, 9 insertions, 0 deletions
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h
index 77f2b1c0ec46..d42e28c1e3fa 100644
--- a/include/asm-i386/desc.h
+++ b/include/asm-i386/desc.h
@@ -16,6 +16,7 @@ extern struct desc_struct cpu_gdt_table[NR_CPUS][GDT_ENTRIES];
struct Xgt_desc_struct {
unsigned short size;
unsigned long address __attribute__((packed));
+ unsigned short pad;
} __attribute__ ((packed));
extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS];
diff --git a/include/asm-i386/segment.h b/include/asm-i386/segment.h
index f6949fb109d9..3f272860a6b3 100644
--- a/include/asm-i386/segment.h
+++ b/include/asm-i386/segment.h
@@ -71,6 +71,14 @@
#define GDT_SIZE (GDT_ENTRIES * 8)
+/* Simple and small GDT entries for booting only */
+
+#define GDT_ENTRY_BOOT_CS 2
+#define __BOOT_CS (GDT_ENTRY_BOOT_CS * 8)
+
+#define GDT_ENTRY_BOOT_DS (GDT_ENTRY_BOOT_CS + 1)
+#define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8)
+
/*
* The interrupt descriptor table has room for 256 idt's,
* the global descriptor table is dependent on the number