summaryrefslogtreecommitdiff
path: root/i386/i386/ldt.h
diff options
context:
space:
mode:
Diffstat (limited to 'i386/i386/ldt.h')
-rw-r--r--i386/i386/ldt.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/i386/i386/ldt.h b/i386/i386/ldt.h
index f196c74b..1f0d7014 100644
--- a/i386/i386/ldt.h
+++ b/i386/i386/ldt.h
@@ -43,6 +43,9 @@
* User descriptors for Mach - 32-bit flat address space
*/
#define USER_SCALL 0x07 /* system call gate */
+#ifdef __x86_64__
+/* Call gate needs two entries */
+#endif
#define USER_CS 0x17 /* user code segment */
#define USER_DS 0x1f /* user data segment */
@@ -53,12 +56,12 @@
extern struct real_descriptor ldt[LDTSZ];
-/* Fill a segment descriptor in the LDT. */
+/* Fill a 32bit segment descriptor in the LDT. */
#define fill_ldt_descriptor(selector, base, limit, access, sizebits) \
- fill_descriptor(&ldt[selector/8], base, limit, access, sizebits)
+ fill_descriptor(&ldt[sel_idx(selector)], base, limit, access, sizebits)
#define fill_ldt_gate(selector, offset, dest_selector, access, word_count) \
- fill_gate((struct real_gate*)&ldt[selector/8], \
+ fill_gate((struct real_gate*)&ldt[sel_idx(selector)], \
offset, dest_selector, access, word_count)
void ldt_init(void);