Print this page
11584 ::xcall would be useful
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>


 135 };
 136 
 137 typedef struct cpu_smt {
 138         lock_t cs_lock;
 139         char cs_pad[56];
 140         struct cpu *cs_sib;
 141         volatile uint64_t cs_intr_depth;
 142         volatile uint64_t cs_state;
 143         volatile uint64_t cs_sibstate;
 144 } cpu_smt_t;
 145 
 146 /*
 147  * This first value, MACHCPU_SIZE is the size of all the members in the cpu_t
 148  * AND struct machcpu, before we get to the mcpu_pad and the kpti area.
 149  * The KPTI is used to contain per-CPU data that is visible in both sets of
 150  * page-tables, and hence must be page-aligned and page-sized. See
 151  * hat_pcp_setup().
 152  *
 153  * There are CTASSERTs in os/intr.c that verify this all works out.
 154  */
 155 #define MACHCPU_SIZE    (1568 + 688)
 156 #define MACHCPU_PAD     (MMU_PAGESIZE - MACHCPU_SIZE)
 157 #define MACHCPU_PAD2    (MMU_PAGESIZE - 16 - 3 * sizeof (struct kpti_frame))
 158 
 159 struct  machcpu {
 160         /*
 161          * x_call fields - used for interprocessor cross calls
 162          */
 163         struct xc_msg   *xc_msgbox;

 164         struct xc_msg   *xc_free;
 165         xc_data_t       xc_data;
 166         uint32_t        xc_wait_cnt;
 167         volatile uint32_t xc_work_cnt;
 168 
 169         int             mcpu_nodeid;            /* node-id */
 170         int             mcpu_pri;               /* CPU priority */
 171 
 172         struct hat      *mcpu_current_hat; /* cpu's current hat */
 173 
 174         struct hat_cpu_info     *mcpu_hat_info;
 175 
 176         volatile ulong_t        mcpu_tlb_info;
 177 
 178         /* i86 hardware table addresses that cannot be shared */
 179 
 180         user_desc_t     *mcpu_gdt;      /* GDT */
 181         gate_desc_t     *mcpu_idt;      /* current IDT */
 182 
 183         tss_t           *mcpu_tss;      /* TSS */




 135 };
 136 
 137 typedef struct cpu_smt {
 138         lock_t cs_lock;
 139         char cs_pad[56];
 140         struct cpu *cs_sib;
 141         volatile uint64_t cs_intr_depth;
 142         volatile uint64_t cs_state;
 143         volatile uint64_t cs_sibstate;
 144 } cpu_smt_t;
 145 
 146 /*
 147  * This first value, MACHCPU_SIZE is the size of all the members in the cpu_t
 148  * AND struct machcpu, before we get to the mcpu_pad and the kpti area.
 149  * The KPTI is used to contain per-CPU data that is visible in both sets of
 150  * page-tables, and hence must be page-aligned and page-sized. See
 151  * hat_pcp_setup().
 152  *
 153  * There are CTASSERTs in os/intr.c that verify this all works out.
 154  */
 155 #define MACHCPU_SIZE    (1568 + 696)
 156 #define MACHCPU_PAD     (MMU_PAGESIZE - MACHCPU_SIZE)
 157 #define MACHCPU_PAD2    (MMU_PAGESIZE - 16 - 3 * sizeof (struct kpti_frame))
 158 
 159 struct  machcpu {
 160         /*
 161          * x_call fields - used for interprocessor cross calls
 162          */
 163         struct xc_msg   *xc_msgbox;
 164         struct xc_msg   *xc_curmsg;
 165         struct xc_msg   *xc_free;
 166         xc_data_t       xc_data;
 167         uint32_t        xc_wait_cnt;
 168         volatile uint32_t xc_work_cnt;
 169 
 170         int             mcpu_nodeid;            /* node-id */
 171         int             mcpu_pri;               /* CPU priority */
 172 
 173         struct hat      *mcpu_current_hat; /* cpu's current hat */
 174 
 175         struct hat_cpu_info     *mcpu_hat_info;
 176 
 177         volatile ulong_t        mcpu_tlb_info;
 178 
 179         /* i86 hardware table addresses that cannot be shared */
 180 
 181         user_desc_t     *mcpu_gdt;      /* GDT */
 182         gate_desc_t     *mcpu_idt;      /* current IDT */
 183 
 184         tss_t           *mcpu_tss;      /* TSS */