]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/i386/mp_desc.h
xnu-792.21.3.tar.gz
[apple/xnu.git] / osfmk / i386 / mp_desc.h
index 8f591cfcc35dadca681060f99c15a9dbedb1df2a..ca147e689d606cd650ca671f57157b75608637fd 100644 (file)
@@ -83,47 +83,26 @@ __BEGIN_DECLS
  * Note that dbtss could be conditionalized on MACH_KDB, but
  * doing so increases misconfiguration risk.
  */
-typedef struct cpu_desc_table {
-       struct fake_descriptor  idt[IDTSZ] __attribute__ ((aligned (16)));
-       struct fake_descriptor  gdt[GDTSZ] __attribute__ ((aligned (16)));
-       struct i386_tss         ktss       __attribute__ ((aligned (16)));
-       struct i386_tss         dbtss      __attribute__ ((aligned (16)));
-       struct sysenter_stack   sstk;
-} cpu_desc_table_t;
-
-typedef struct cpu_desc_table64 {
-       struct fake_descriptor64 idt[IDTSZ]      __attribute__ ((aligned (16)));
-       struct fake_descriptor  gdt[GDTSZ]       __attribute__ ((aligned (16)));
-       struct x86_64_tss       ktss             __attribute__ ((aligned (16)));
-       struct sysenter_stack   sstk             __attribute__ ((aligned (16)));
-       uint8_t                 dfstk[PAGE_SIZE] __attribute__ ((aligned (16)));
-} cpu_desc_table64_t;
+struct mp_desc_table {
+       struct fake_descriptor  idt[IDTSZ];     /* IDT */
+       struct fake_descriptor  gdt[GDTSZ];     /* GDT */
+       struct fake_descriptor  ldt[LDTSZ];     /* LDT */
+       struct i386_tss         ktss;
+       struct i386_tss         dbtss;
+};
 
 #define        current_gdt()   (current_cpu_datap()->cpu_desc_index.cdi_gdt)
 #define        current_idt()   (current_cpu_datap()->cpu_desc_index.cdi_idt)
 #define        current_ldt()   (current_cpu_datap()->cpu_desc_index.cdi_ldt)
 #define        current_ktss()  (current_cpu_datap()->cpu_desc_index.cdi_ktss)
 #define        current_dbtss() (current_cpu_datap()->cpu_desc_index.cdi_dbtss)
-#define        current_sstk()  (current_cpu_datap()->cpu_desc_index.cdi_sstk)
-
-#define        current_ktss64() ((struct x86_64_tss *) current_ktss())
-#define        current_sstk64() ((addr64_t *) current_sstk())
 
 #define        gdt_desc_p(sel) \
        ((struct real_descriptor *)&current_gdt()[sel_idx(sel)])
 #define        ldt_desc_p(sel) \
        ((struct real_descriptor *)&current_ldt()[sel_idx(sel)])
 
-extern void    cpu_desc_init(
-                       cpu_data_t      *cdp,
-                       boolean_t       is_boot_cpu);
-extern void    cpu_desc_init64(
-                       cpu_data_t      *cdp,
-                       boolean_t       is_boot_cpu);
-extern void    cpu_desc_load64(
-                       cpu_data_t      *cdp);
-extern void    fast_syscall_init(void);
-extern void    fast_syscall_init64(void);
+extern void    mp_desc_init(cpu_data_t *cdp, boolean_t is_boot_cpu);
 
 static inline boolean_t
 valid_user_data_selector(uint16_t selector)