1b2b3ffcdSSimon Schubert /*- 2b2b3ffcdSSimon Schubert * Copyright (c) 1982, 1990 The Regents of the University of California. 3b2b3ffcdSSimon Schubert * Copyright (c) 2008 The DragonFly Project. 4b2b3ffcdSSimon Schubert * All rights reserved. 5b2b3ffcdSSimon Schubert * 6b2b3ffcdSSimon Schubert * This code is derived from software contributed to Berkeley by 7b2b3ffcdSSimon Schubert * William Jolitz. 8b2b3ffcdSSimon Schubert * 9b2b3ffcdSSimon Schubert * Redistribution and use in source and binary forms, with or without 10b2b3ffcdSSimon Schubert * modification, are permitted provided that the following conditions 11b2b3ffcdSSimon Schubert * are met: 12b2b3ffcdSSimon Schubert * 1. Redistributions of source code must retain the above copyright 13b2b3ffcdSSimon Schubert * notice, this list of conditions and the following disclaimer. 14b2b3ffcdSSimon Schubert * 2. Redistributions in binary form must reproduce the above copyright 15b2b3ffcdSSimon Schubert * notice, this list of conditions and the following disclaimer in the 16b2b3ffcdSSimon Schubert * documentation and/or other materials provided with the distribution. 172c64e990Szrj * 3. Neither the name of the University nor the names of its contributors 18b2b3ffcdSSimon Schubert * may be used to endorse or promote products derived from this software 19b2b3ffcdSSimon Schubert * without specific prior written permission. 20b2b3ffcdSSimon Schubert * 21b2b3ffcdSSimon Schubert * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22b2b3ffcdSSimon Schubert * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23b2b3ffcdSSimon Schubert * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24b2b3ffcdSSimon Schubert * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25b2b3ffcdSSimon Schubert * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26b2b3ffcdSSimon Schubert * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27b2b3ffcdSSimon Schubert * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28b2b3ffcdSSimon Schubert * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29b2b3ffcdSSimon Schubert * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30b2b3ffcdSSimon Schubert * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31b2b3ffcdSSimon Schubert * SUCH DAMAGE. 32b2b3ffcdSSimon Schubert * 33b2b3ffcdSSimon Schubert * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91 34b2b3ffcdSSimon Schubert * $FreeBSD: src/sys/i386/i386/genassym.c,v 1.86.2.3 2002/03/03 05:42:49 nyan Exp $ 35b2b3ffcdSSimon Schubert */ 36b2b3ffcdSSimon Schubert 37b2b3ffcdSSimon Schubert #include <sys/param.h> 38b2b3ffcdSSimon Schubert #include <sys/systm.h> 39b2b3ffcdSSimon Schubert #include <sys/assym.h> 40b2b3ffcdSSimon Schubert #include <sys/interrupt.h> 41b2b3ffcdSSimon Schubert #include <sys/buf.h> 42b2b3ffcdSSimon Schubert #include <sys/proc.h> 43b2b3ffcdSSimon Schubert #include <sys/errno.h> 44b2b3ffcdSSimon Schubert #include <sys/mount.h> 45b2b3ffcdSSimon Schubert #include <sys/socket.h> 46b2b3ffcdSSimon Schubert #include <sys/lock.h> 47b2b3ffcdSSimon Schubert #include <sys/resourcevar.h> 48b2b3ffcdSSimon Schubert #include <machine/frame.h> 49b2b3ffcdSSimon Schubert #include <machine/bootinfo.h> 50b2b3ffcdSSimon Schubert #include <machine/tss.h> 51b2b3ffcdSSimon Schubert #include <sys/vmmeter.h> 52b2b3ffcdSSimon Schubert #include <sys/machintr.h> 53b2b3ffcdSSimon Schubert #include <vm/vm.h> 54b2b3ffcdSSimon Schubert #include <vm/vm_param.h> 55b2b3ffcdSSimon Schubert #include <vm/pmap.h> 56b2b3ffcdSSimon Schubert #include <vm/vm_map.h> 57b2b3ffcdSSimon Schubert #include <net/if.h> 58b2b3ffcdSSimon Schubert #include <netinet/in.h> 59b2b3ffcdSSimon Schubert #include <vfs/nfs/nfsv2.h> 60b2b3ffcdSSimon Schubert #include <vfs/nfs/rpcv2.h> 61b2b3ffcdSSimon Schubert #include <vfs/nfs/nfs.h> 62b2b3ffcdSSimon Schubert #include <vfs/nfs/nfsdiskless.h> 63b2b3ffcdSSimon Schubert 64b2b3ffcdSSimon Schubert #include <machine_base/apic/apicreg.h> 65566d27d4SSepherosa Ziehau #include <machine_base/apic/ioapic_abi.h> 66b2b3ffcdSSimon Schubert #include <machine/segments.h> 67b2b3ffcdSSimon Schubert #include <machine/sigframe.h> 68b2b3ffcdSSimon Schubert #include <machine/globaldata.h> 69b2b3ffcdSSimon Schubert #include <machine/specialreg.h> 70b2b3ffcdSSimon Schubert #include <machine/pcb.h> 71c2fb025dSMatthew Dillon #include <machine/pmap.h> 72b2b3ffcdSSimon Schubert 73b2b3ffcdSSimon Schubert ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); 74b2b3ffcdSSimon Schubert ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); 75cc694a4aSMatthew Dillon ASSYM(PM_ACTIVE_LOCK, offsetof(struct pmap, pm_active_lock)); 76b2b3ffcdSSimon Schubert 77b2b3ffcdSSimon Schubert ASSYM(LWP_VMSPACE, offsetof(struct lwp, lwp_vmspace)); 78b2b3ffcdSSimon Schubert ASSYM(V_IPI, offsetof(struct vmmeter, v_ipi)); 79b2b3ffcdSSimon Schubert ASSYM(V_TIMER, offsetof(struct vmmeter, v_timer)); 80b2b3ffcdSSimon Schubert ASSYM(UPAGES, UPAGES); 81b2b3ffcdSSimon Schubert ASSYM(PAGE_SIZE, PAGE_SIZE); 82b2b3ffcdSSimon Schubert ASSYM(NPTEPG, NPTEPG); 83b2b3ffcdSSimon Schubert ASSYM(NPDEPG, NPDEPG); 84b2b3ffcdSSimon Schubert ASSYM(PAGE_SHIFT, PAGE_SHIFT); 85b2b3ffcdSSimon Schubert ASSYM(PAGE_MASK, PAGE_MASK); 86b2b3ffcdSSimon Schubert ASSYM(PDRSHIFT, PDRSHIFT); 87b2b3ffcdSSimon Schubert ASSYM(USRSTACK, USRSTACK); 88b2b3ffcdSSimon Schubert ASSYM(KERNBASE, KERNBASE); 89b2b3ffcdSSimon Schubert 90b2b3ffcdSSimon Schubert ASSYM(MAXCOMLEN, MAXCOMLEN); 91b2b3ffcdSSimon Schubert ASSYM(EFAULT, EFAULT); 92b2b3ffcdSSimon Schubert ASSYM(ENAMETOOLONG, ENAMETOOLONG); 93b2b3ffcdSSimon Schubert ASSYM(VM_MAX_USER_ADDRESS, VM_MAX_USER_ADDRESS); 94b2b3ffcdSSimon Schubert 95b2b3ffcdSSimon Schubert ASSYM(GD_CURTHREAD, offsetof(struct mdglobaldata, mi.gd_curthread)); 96b2b3ffcdSSimon Schubert ASSYM(GD_CNT, offsetof(struct mdglobaldata, mi.gd_cnt)); 97b2b3ffcdSSimon Schubert ASSYM(GD_CPUID, offsetof(struct mdglobaldata, mi.gd_cpuid)); 98c2fb025dSMatthew Dillon ASSYM(GD_CPUMASK, offsetof(struct mdglobaldata, mi.gd_cpumask)); 99e47e3dbaSMatthew Dillon ASSYM(GD_NPOLL, offsetof(struct mdglobaldata, mi.gd_npoll)); 100433c75c3SMatthew Dillon ASSYM(GD_SAMPLE_PC, offsetof(struct mdglobaldata, mi.gd_sample_pc)); 101e32d3244SMatthew Dillon ASSYM(GD_SAMPLE_SP, offsetof(struct mdglobaldata, mi.gd_sample_sp)); 102ee89e80bSMatthew Dillon ASSYM(GD_CPUMASK_SIMPLE, offsetof(struct mdglobaldata, mi.gd_cpumask_simple)); 103ee89e80bSMatthew Dillon ASSYM(GD_CPUMASK_OFFSET, offsetof(struct mdglobaldata, mi.gd_cpumask_offset)); 10430c6fbb5SMatthew Dillon ASSYM(GD_IRESERVED, offsetof(struct mdglobaldata, mi.gd_ireserved[0])); 105b2b3ffcdSSimon Schubert 1064611d87fSMatthew Dillon ASSYM(PCB_CR3_ISO, offsetof(struct pcb, pcb_cr3_iso)); 107b2b3ffcdSSimon Schubert ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3)); 108b2b3ffcdSSimon Schubert ASSYM(PCB_R15, offsetof(struct pcb, pcb_r15)); 109b2b3ffcdSSimon Schubert ASSYM(PCB_R14, offsetof(struct pcb, pcb_r14)); 110b2b3ffcdSSimon Schubert ASSYM(PCB_R13, offsetof(struct pcb, pcb_r13)); 111b2b3ffcdSSimon Schubert ASSYM(PCB_R12, offsetof(struct pcb, pcb_r12)); 112b2b3ffcdSSimon Schubert ASSYM(PCB_RSI, offsetof(struct pcb, pcb_rsi)); 113b2b3ffcdSSimon Schubert ASSYM(PCB_RBP, offsetof(struct pcb, pcb_rbp)); 114b2b3ffcdSSimon Schubert ASSYM(PCB_RSP, offsetof(struct pcb, pcb_rsp)); 115b2b3ffcdSSimon Schubert ASSYM(PCB_RBX, offsetof(struct pcb, pcb_rbx)); 116b2b3ffcdSSimon Schubert ASSYM(PCB_RIP, offsetof(struct pcb, pcb_rip)); 117b2b3ffcdSSimon Schubert ASSYM(TSS_RSP0, offsetof(struct x86_64tss, tss_rsp0)); 118b2b3ffcdSSimon Schubert 119b2b3ffcdSSimon Schubert ASSYM(PCB_DR0, offsetof(struct pcb, pcb_dr0)); 120b2b3ffcdSSimon Schubert ASSYM(PCB_DR1, offsetof(struct pcb, pcb_dr1)); 121b2b3ffcdSSimon Schubert ASSYM(PCB_DR2, offsetof(struct pcb, pcb_dr2)); 122b2b3ffcdSSimon Schubert ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3)); 123b2b3ffcdSSimon Schubert ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6)); 124b2b3ffcdSSimon Schubert ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7)); 1254611d87fSMatthew Dillon 126b2b3ffcdSSimon Schubert ASSYM(PCB_DBREGS, PCB_DBREGS); 1274611d87fSMatthew Dillon ASSYM(PCB_ISOMMU, PCB_ISOMMU); 128375bb03eSMatthew Dillon 129375bb03eSMatthew Dillon #if 0 /* we get this from specialreg.h */ 130375bb03eSMatthew Dillon ASSYM(SPEC_CTRL_IBRS, SPEC_CTRL_IBRS); 131375bb03eSMatthew Dillon ASSYM(SPEC_CTRL_STIBP, SPEC_CTRL_STIBP); 132375bb03eSMatthew Dillon #endif 133375bb03eSMatthew Dillon ASSYM(SPEC_CTRL_DUMMY_IBPB, SPEC_CTRL_DUMMY_IBPB); 134375bb03eSMatthew Dillon ASSYM(SPEC_CTRL_DUMMY_ENABLE, SPEC_CTRL_DUMMY_ENABLE); 135cd89a7ceSMatthew Dillon ASSYM(SPEC_CTRL_MDS_ENABLE, SPEC_CTRL_MDS_ENABLE); 1364611d87fSMatthew Dillon 137b2b3ffcdSSimon Schubert ASSYM(PCB_EXT, offsetof(struct pcb, pcb_ext)); 138b2b3ffcdSSimon Schubert ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); 139b2b3ffcdSSimon Schubert ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); 14093ad6da2SMatthew Dillon ASSYM(PCB_ONFAULT_SP, offsetof(struct pcb, pcb_onfault_sp)); 141b2b3ffcdSSimon Schubert ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase)); 142b2b3ffcdSSimon Schubert ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase)); 143b2b3ffcdSSimon Schubert ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save)); 144b2b3ffcdSSimon Schubert 145b2b3ffcdSSimon Schubert ASSYM(PCB_SIZE, sizeof(struct pcb)); 146b2b3ffcdSSimon Schubert ASSYM(PCB_SAVEFPU_SIZE, sizeof(union savefpu)); 147b2b3ffcdSSimon Schubert 148b2b3ffcdSSimon Schubert ASSYM(TF_R15, offsetof(struct trapframe, tf_r15)); 149b2b3ffcdSSimon Schubert ASSYM(TF_R14, offsetof(struct trapframe, tf_r14)); 150b2b3ffcdSSimon Schubert ASSYM(TF_R13, offsetof(struct trapframe, tf_r13)); 151b2b3ffcdSSimon Schubert ASSYM(TF_R12, offsetof(struct trapframe, tf_r12)); 152b2b3ffcdSSimon Schubert ASSYM(TF_R11, offsetof(struct trapframe, tf_r11)); 153b2b3ffcdSSimon Schubert ASSYM(TF_R10, offsetof(struct trapframe, tf_r10)); 154b2b3ffcdSSimon Schubert ASSYM(TF_R9, offsetof(struct trapframe, tf_r9)); 155b2b3ffcdSSimon Schubert ASSYM(TF_R8, offsetof(struct trapframe, tf_r8)); 156b2b3ffcdSSimon Schubert ASSYM(TF_RDI, offsetof(struct trapframe, tf_rdi)); 157b2b3ffcdSSimon Schubert ASSYM(TF_RSI, offsetof(struct trapframe, tf_rsi)); 158b2b3ffcdSSimon Schubert ASSYM(TF_RBP, offsetof(struct trapframe, tf_rbp)); 159b2b3ffcdSSimon Schubert ASSYM(TF_RBX, offsetof(struct trapframe, tf_rbx)); 160b2b3ffcdSSimon Schubert ASSYM(TF_RDX, offsetof(struct trapframe, tf_rdx)); 161b2b3ffcdSSimon Schubert ASSYM(TF_RCX, offsetof(struct trapframe, tf_rcx)); 162b2b3ffcdSSimon Schubert ASSYM(TF_RAX, offsetof(struct trapframe, tf_rax)); 163b2b3ffcdSSimon Schubert 164b2b3ffcdSSimon Schubert ASSYM(TF_TRAPNO, offsetof(struct trapframe, tf_trapno)); 165b2b3ffcdSSimon Schubert ASSYM(TF_XFLAGS, offsetof(struct trapframe, tf_xflags)); 166b2b3ffcdSSimon Schubert ASSYM(TF_ADDR, offsetof(struct trapframe, tf_addr)); 167b2b3ffcdSSimon Schubert ASSYM(TF_ERR, offsetof(struct trapframe, tf_err)); 168b2b3ffcdSSimon Schubert ASSYM(TF_FLAGS, offsetof(struct trapframe, tf_flags)); 169b2b3ffcdSSimon Schubert 170b2b3ffcdSSimon Schubert ASSYM(TF_RIP, offsetof(struct trapframe, tf_rip)); 171b2b3ffcdSSimon Schubert ASSYM(TF_CS, offsetof(struct trapframe, tf_cs)); 172b2b3ffcdSSimon Schubert ASSYM(TF_RFLAGS, offsetof(struct trapframe, tf_rflags)); 173b2b3ffcdSSimon Schubert ASSYM(TF_RSP, offsetof(struct trapframe, tf_rsp)); 174b2b3ffcdSSimon Schubert ASSYM(TF_SS, offsetof(struct trapframe, tf_ss)); 175b2b3ffcdSSimon Schubert ASSYM(TF_SIZE, sizeof(struct trapframe)); 176b2b3ffcdSSimon Schubert 177b2b3ffcdSSimon Schubert ASSYM(SIGF_HANDLER, offsetof(struct sigframe, sf_ahu.sf_handler)); 178b2b3ffcdSSimon Schubert ASSYM(SIGF_UC, offsetof(struct sigframe, sf_uc)); 179b2b3ffcdSSimon Schubert 180b2b3ffcdSSimon Schubert ASSYM(TD_PROC, offsetof(struct thread, td_proc)); 181b2b3ffcdSSimon Schubert ASSYM(TD_LWP, offsetof(struct thread, td_lwp)); 182b2b3ffcdSSimon Schubert ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); 183b2b3ffcdSSimon Schubert ASSYM(TD_SP, offsetof(struct thread, td_sp)); 184b2b3ffcdSSimon Schubert ASSYM(TD_PRI, offsetof(struct thread, td_pri)); 185f9235b6dSMatthew Dillon ASSYM(TD_CRITCOUNT, offsetof(struct thread, td_critcount)); 186b2b3ffcdSSimon Schubert ASSYM(TD_MACH, offsetof(struct thread, td_mach)); 187b2b3ffcdSSimon Schubert ASSYM(TD_WCHAN, offsetof(struct thread, td_wchan)); 188b2b3ffcdSSimon Schubert ASSYM(TD_NEST_COUNT, offsetof(struct thread, td_nest_count)); 189b2b3ffcdSSimon Schubert ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); 190a86ce0cdSMatthew Dillon ASSYM(TD_TYPE, offsetof(struct thread, td_type)); 191ee89e80bSMatthew Dillon ASSYM(TD_PREEMPTED, offsetof(struct thread, td_preempted)); 192a86ce0cdSMatthew Dillon 193b2b3ffcdSSimon Schubert ASSYM(TD_SAVEFPU, offsetof(struct thread, td_savefpu)); 194b2b3ffcdSSimon Schubert ASSYM(TDF_RUNNING, TDF_RUNNING); 195b2b3ffcdSSimon Schubert ASSYM(TDF_USINGFP, TDF_USINGFP); 196b2b3ffcdSSimon Schubert ASSYM(TDF_KERNELFP, TDF_KERNELFP); 197ee89e80bSMatthew Dillon ASSYM(TDF_PREEMPT_DONE, TDF_PREEMPT_DONE); 198b2b3ffcdSSimon Schubert 199b2b3ffcdSSimon Schubert ASSYM(FIRST_SOFTINT, FIRST_SOFTINT); 200b2b3ffcdSSimon Schubert ASSYM(MDGLOBALDATA_BASEALLOC_PAGES, MDGLOBALDATA_BASEALLOC_PAGES); 201b2b3ffcdSSimon Schubert 202b2b3ffcdSSimon Schubert ASSYM(GD_PRIVATE_TSS, offsetof(struct mdglobaldata, gd_private_tss)); 2039e24b495SMatthew Dillon ASSYM(GD_COMMON_TSS, offsetof(struct privatespace, common_tss)); 2044611d87fSMatthew Dillon ASSYM(GD_TRAMPOLINE, offsetof(struct privatespace, trampoline)); 205c693df0eSMatthew Dillon ASSYM(GD_DEBUG1, offsetof(struct mdglobaldata, mi.gd_debug1)); 206c693df0eSMatthew Dillon ASSYM(GD_DEBUG2, offsetof(struct mdglobaldata, mi.gd_debug2)); 207b2b3ffcdSSimon Schubert ASSYM(GD_USER_FS, offsetof(struct mdglobaldata, gd_user_fs)); 208b2b3ffcdSSimon Schubert ASSYM(GD_USER_GS, offsetof(struct mdglobaldata, gd_user_gs)); 209b2b3ffcdSSimon Schubert ASSYM(GD_INTR_NESTING_LEVEL, offsetof(struct mdglobaldata, mi.gd_intr_nesting_level)); 210b2b3ffcdSSimon Schubert 2114611d87fSMatthew Dillon ASSYM(TR_CR2, offsetof(struct trampframe, tr_cr2)); 2128ed06571SMatthew Dillon ASSYM(TR_RAX, offsetof(struct trampframe, tr_rax)); 2138ed06571SMatthew Dillon ASSYM(TR_RCX, offsetof(struct trampframe, tr_rcx)); 2148ed06571SMatthew Dillon ASSYM(TR_RDX, offsetof(struct trampframe, tr_rdx)); 2154611d87fSMatthew Dillon ASSYM(TR_ERR, offsetof(struct trampframe, tr_err)); 2164611d87fSMatthew Dillon ASSYM(TR_RIP, offsetof(struct trampframe, tr_rip)); 2174611d87fSMatthew Dillon ASSYM(TR_CS, offsetof(struct trampframe, tr_cs)); 2184611d87fSMatthew Dillon ASSYM(TR_RFLAGS, offsetof(struct trampframe, tr_rflags)); 2194611d87fSMatthew Dillon ASSYM(TR_RSP, offsetof(struct trampframe, tr_rsp)); 2204611d87fSMatthew Dillon ASSYM(TR_SS, offsetof(struct trampframe, tr_ss)); 221fc921477SMatthew Dillon ASSYM(TR_PCB_RSP, offsetof(struct trampframe, tr_pcb_rsp)); 222fc921477SMatthew Dillon ASSYM(TR_PCB_FLAGS, offsetof(struct trampframe, tr_pcb_flags)); 223fc921477SMatthew Dillon ASSYM(TR_PCB_CR3_ISO, offsetof(struct trampframe, tr_pcb_cr3_iso)); 224fc921477SMatthew Dillon ASSYM(TR_PCB_CR3, offsetof(struct trampframe, tr_pcb_cr3)); 225375bb03eSMatthew Dillon ASSYM(TR_PCB_SPEC_CTRL, offsetof(struct trampframe, tr_pcb_spec_ctrl[0])); 22685b33048SMatthew Dillon ASSYM(TR_PCB_GS_KERNEL, offsetof(struct trampframe, tr_pcb_gs_kernel)); 22785b33048SMatthew Dillon ASSYM(TR_PCB_GS_SAVED, offsetof(struct trampframe, tr_pcb_gs_saved)); 22885b33048SMatthew Dillon ASSYM(TR_PCB_CR3_SAVED, offsetof(struct trampframe, tr_pcb_cr3_saved)); 2294611d87fSMatthew Dillon 2309611ff20SSepherosa Ziehau ASSYM(GD_IPENDING, offsetof(struct mdglobaldata, gd_ipending)); 231b2b3ffcdSSimon Schubert ASSYM(GD_SPENDING, offsetof(struct mdglobaldata, gd_spending)); 232b2b3ffcdSSimon Schubert ASSYM(GD_COMMON_TSSD, offsetof(struct mdglobaldata, gd_common_tssd)); 233b2b3ffcdSSimon Schubert ASSYM(GD_TSS_GDT, offsetof(struct mdglobaldata, gd_tss_gdt)); 234b2b3ffcdSSimon Schubert ASSYM(GD_NPXTHREAD, offsetof(struct mdglobaldata, gd_npxthread)); 235b2b3ffcdSSimon Schubert ASSYM(GD_FPU_LOCK, offsetof(struct mdglobaldata, gd_fpu_lock)); 236b2b3ffcdSSimon Schubert ASSYM(GD_SAVEFPU, offsetof(struct mdglobaldata, gd_savefpu)); 237da23a592SMatthew Dillon ASSYM(GD_OTHER_CPUS, offsetof(struct mdglobaldata, mi.gd_other_cpus)); 238b2b3ffcdSSimon Schubert ASSYM(GD_SS_EFLAGS, offsetof(struct mdglobaldata, gd_ss_eflags)); 239b2b3ffcdSSimon Schubert ASSYM(GD_REQFLAGS, offsetof(struct mdglobaldata, mi.gd_reqflags)); 240b2b3ffcdSSimon Schubert 241b2b3ffcdSSimon Schubert ASSYM(RQF_IPIQ, RQF_IPIQ); 242b2b3ffcdSSimon Schubert ASSYM(RQF_INTPEND, RQF_INTPEND); 243b2b3ffcdSSimon Schubert ASSYM(RQF_AST_OWEUPC, RQF_AST_OWEUPC); 244b2b3ffcdSSimon Schubert ASSYM(RQF_AST_SIGNAL, RQF_AST_SIGNAL); 245b2b3ffcdSSimon Schubert ASSYM(RQF_AST_USER_RESCHED, RQF_AST_USER_RESCHED); 246b2b3ffcdSSimon Schubert ASSYM(RQF_AST_LWKT_RESCHED, RQF_AST_LWKT_RESCHED); 247*1dc32433SMatthew Dillon ASSYM(RQF_XINVLTLB, RQF_XINVLTLB); 248*1dc32433SMatthew Dillon ASSYM(RQF_HVM_MASK, RQF_HVM_MASK); 249b2b3ffcdSSimon Schubert ASSYM(RQF_TIMER, RQF_TIMER); 250b2b3ffcdSSimon Schubert ASSYM(RQF_AST_MASK, RQF_AST_MASK); 251f2081646SMatthew Dillon ASSYM(RQF_QUICKRET, RQF_QUICKRET); 252b2b3ffcdSSimon Schubert 253b2b3ffcdSSimon Schubert ASSYM(KCSEL, GSEL(GCODE_SEL, SEL_KPL)); 254b2b3ffcdSSimon Schubert ASSYM(KDSEL, GSEL(GDATA_SEL, SEL_KPL)); 255b2b3ffcdSSimon Schubert ASSYM(KUCSEL, GSEL(GUCODE_SEL, SEL_UPL)); 256b2b3ffcdSSimon Schubert ASSYM(KUDSEL, GSEL(GUDATA_SEL, SEL_UPL)); 257b2b3ffcdSSimon Schubert /*ASSYM(SEL_RPL_MASK, SEL_RPL_MASK);*/ 258b2b3ffcdSSimon Schubert 259b2b3ffcdSSimon Schubert ASSYM(MSR_GSBASE, MSR_GSBASE); 260b2b3ffcdSSimon Schubert ASSYM(MSR_KGSBASE, MSR_KGSBASE); 261b2b3ffcdSSimon Schubert ASSYM(MSR_FSBASE, MSR_FSBASE); 262b2b3ffcdSSimon Schubert 26335b2edcbSSepherosa Ziehau ASSYM(MACHINTR_INTREN, offsetof(struct machintr_abi, intr_enable)); 264b2b3ffcdSSimon Schubert 265b2b3ffcdSSimon Schubert ASSYM(TDPRI_INT_SUPPORT, TDPRI_INT_SUPPORT); 266cc694a4aSMatthew Dillon ASSYM(CPULOCK_EXCLBIT, CPULOCK_EXCLBIT); 267cc694a4aSMatthew Dillon ASSYM(CPULOCK_EXCL, CPULOCK_EXCL); 268cc694a4aSMatthew Dillon ASSYM(CPULOCK_INCR, CPULOCK_INCR); 269cc694a4aSMatthew Dillon ASSYM(CPULOCK_CNTMASK, CPULOCK_CNTMASK); 270b2b3ffcdSSimon Schubert 27106c66eb2SMatthew Dillon ASSYM(CPUMASK_ELEMENTS, CPUMASK_ELEMENTS); 27206c66eb2SMatthew Dillon 2735ac5ccd2SSepherosa Ziehau ASSYM(IOAPIC_IRQI_ADDR, offsetof(struct ioapic_irqinfo, io_addr)); 2745ac5ccd2SSepherosa Ziehau ASSYM(IOAPIC_IRQI_IDX, offsetof(struct ioapic_irqinfo, io_idx)); 2755ac5ccd2SSepherosa Ziehau ASSYM(IOAPIC_IRQI_FLAGS, offsetof(struct ioapic_irqinfo, io_flags)); 2765ac5ccd2SSepherosa Ziehau ASSYM(IOAPIC_IRQI_SIZE, sizeof(struct ioapic_irqinfo)); 2775ac5ccd2SSepherosa Ziehau ASSYM(IOAPIC_IRQI_SZSHIFT, IOAPIC_IRQI_SZSHIFT); 2785ac5ccd2SSepherosa Ziehau ASSYM(IOAPIC_IRQI_FLAG_LEVEL, IOAPIC_IRQI_FLAG_LEVEL); 2795ac5ccd2SSepherosa Ziehau ASSYM(IOAPIC_IRQI_FLAG_MASKED, IOAPIC_IRQI_FLAG_MASKED); 280