Print this page
de-linting of .s files


  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  *
  26  * Copyright 2019 Joyent, Inc.
  27  */
  28 
  29 /*
  30  * Debugger entry and exit for both master and slave CPUs. kdi_idthdl.s contains
  31  * the IDT stubs that drop into here (mainly via kdi_cmnint).
  32  */
  33 
  34 #if defined(__lint)
  35 #include <sys/types.h>
  36 #else
  37 
  38 #include <sys/segments.h>
  39 #include <sys/asm_linkage.h>
  40 #include <sys/controlregs.h>
  41 #include <sys/x86_archext.h>
  42 #include <sys/privregs.h>
  43 #include <sys/machprivregs.h>
  44 #include <sys/kdi_regs.h>
  45 #include <sys/psw.h>
  46 #include <sys/uadmin.h>
  47 #ifdef __xpv
  48 #include <sys/hypervisor.h>
  49 #endif
  50 #include <kdi_assym.h>
  51 #include <assym.h>
  52 
  53 /* clobbers %rdx, %rcx, returns addr in %rax, CPU ID in %rbx */
  54 #define GET_CPUSAVE_ADDR \
  55         movzbq  %gs:CPU_ID, %rbx;               \
  56         movq    %rbx, %rax;                     \
  57         movq    $KRS_SIZE, %rcx;                \


 699 #define SETDREG(name, r)        \
 700         ENTRY_NP(name);         \
 701         movq    %rdi, r;        \
 702         ret;                    \
 703         SET_SIZE(name)
 704 
 705         GETDREG(kdi_getdr0, %dr0)
 706         GETDREG(kdi_getdr1, %dr1)
 707         GETDREG(kdi_getdr2, %dr2)
 708         GETDREG(kdi_getdr3, %dr3)
 709         GETDREG(kdi_getdr6, %dr6)
 710         GETDREG(kdi_getdr7, %dr7)
 711 
 712         SETDREG(kdi_setdr0, %dr0)
 713         SETDREG(kdi_setdr1, %dr1)
 714         SETDREG(kdi_setdr2, %dr2)
 715         SETDREG(kdi_setdr3, %dr3)
 716         SETDREG(kdi_setdr6, %dr6)
 717         SETDREG(kdi_setdr7, %dr7)
 718 
 719 #endif /* !__lint */


  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  *
  26  * Copyright 2019 Joyent, Inc.
  27  */
  28 
  29 /*
  30  * Debugger entry and exit for both master and slave CPUs. kdi_idthdl.s contains
  31  * the IDT stubs that drop into here (mainly via kdi_cmnint).
  32  */
  33 




  34 #include <sys/segments.h>
  35 #include <sys/asm_linkage.h>
  36 #include <sys/controlregs.h>
  37 #include <sys/x86_archext.h>
  38 #include <sys/privregs.h>
  39 #include <sys/machprivregs.h>
  40 #include <sys/kdi_regs.h>
  41 #include <sys/psw.h>
  42 #include <sys/uadmin.h>
  43 #ifdef __xpv
  44 #include <sys/hypervisor.h>
  45 #endif
  46 #include <kdi_assym.h>
  47 #include <assym.h>
  48 
  49 /* clobbers %rdx, %rcx, returns addr in %rax, CPU ID in %rbx */
  50 #define GET_CPUSAVE_ADDR \
  51         movzbq  %gs:CPU_ID, %rbx;               \
  52         movq    %rbx, %rax;                     \
  53         movq    $KRS_SIZE, %rcx;                \


 695 #define SETDREG(name, r)        \
 696         ENTRY_NP(name);         \
 697         movq    %rdi, r;        \
 698         ret;                    \
 699         SET_SIZE(name)
 700 
 701         GETDREG(kdi_getdr0, %dr0)
 702         GETDREG(kdi_getdr1, %dr1)
 703         GETDREG(kdi_getdr2, %dr2)
 704         GETDREG(kdi_getdr3, %dr3)
 705         GETDREG(kdi_getdr6, %dr6)
 706         GETDREG(kdi_getdr7, %dr7)
 707 
 708         SETDREG(kdi_setdr0, %dr0)
 709         SETDREG(kdi_setdr1, %dr1)
 710         SETDREG(kdi_setdr2, %dr2)
 711         SETDREG(kdi_setdr3, %dr3)
 712         SETDREG(kdi_setdr6, %dr6)
 713         SETDREG(kdi_setdr7, %dr7)
 714