Print this page
8956 Implement KPTI
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/ml/genassym.c
          +++ new/usr/src/uts/i86pc/ml/genassym.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
       23 + *
       24 + * Copyright 2018 Joyent, Inc.
  23   25   */
  24   26  
  25   27  #ifndef _GENASSYM
  26   28  #define _GENASSYM
  27   29  #endif
  28   30  
  29   31  #define exit    kern_exit
  30   32  
  31   33  #include <sys/types.h>
  32   34  #include <sys/param.h>
↓ open down ↓ 28 lines elided ↑ open up ↑
  61   63  /*
  62   64   * Proactively discourage anyone from referring to structures or
  63   65   * member offsets in this program.
  64   66   */
  65   67  #define struct  struct...
  66   68  #define OFFSET  OFFSET...
  67   69  
  68   70  int
  69   71  main(int argc, char *argv[])
  70   72  {
  71      -        printf("#define\tT_AST 0x%x\n", T_AST);
  72      -
  73   73          printf("#define\tLOCK_LEVEL 0x%x\n", LOCK_LEVEL);
  74   74          printf("#define\tCLOCK_LEVEL 0x%x\n", CLOCK_LEVEL);
  75   75          printf("#define\tDISP_LEVEL 0x%x\n", DISP_LEVEL);
  76   76          printf("#define\tPIL_MAX 0x%x\n", PIL_MAX);
  77   77          printf("#define\tHIGH_LEVELS 0x%x\n", HIGH_LEVELS);
  78   78          printf("#define\tCPU_INTR_ACTV_HIGH_LEVEL_MASK 0x%x\n",
  79   79              CPU_INTR_ACTV_HIGH_LEVEL_MASK);
  80   80  
  81   81          printf("#define\tPIC_NSEOI 0x%x\n", PIC_NSEOI);
  82   82          printf("#define\tPIC_SEOI_LVL7 0x%x\n", PIC_SEOI_LVL7);
↓ open down ↓ 19 lines elided ↑ open up ↑
 102  102          printf("#define\tS_OTHER 0x%x\n", (int)S_OTHER);
 103  103  
 104  104          printf("#define\tNORMALRETURN 0x%x\n", (int)NORMALRETURN);
 105  105          printf("#define\tLWP_USER 0x%x\n", LWP_USER);
 106  106          printf("#define\tLWP_SYS 0x%x\n", LWP_SYS);
 107  107          printf("#define\tLMS_USER 0x%x\n", LMS_USER);
 108  108          printf("#define\tLMS_SYSTEM 0x%x\n", LMS_SYSTEM);
 109  109  
 110  110          printf("#define\tSSE_MXCSR_EFLAGS 0x%x\n", SSE_MXCSR_EFLAGS);
 111  111  
 112      -        printf("#define\tFP_487 0x%x\n", FP_487);
 113      -        printf("#define\tFP_486 0x%x\n", FP_486);
 114      -        printf("#define\tFPU_CW_INIT 0x%x\n", FPU_CW_INIT);
 115      -        printf("#define\tFPU_EN 0x%x\n", FPU_EN);
 116      -        printf("#define\tFPU_VALID 0x%x\n", FPU_VALID);
 117      -
 118      -        printf("#define\tFP_NO 0x%x\n", FP_NO);
 119      -        printf("#define\tFP_SW 0x%x\n", FP_SW);
 120      -        printf("#define\tFP_HW 0x%x\n", FP_HW);
 121      -        printf("#define\tFP_287 0x%x\n", FP_287);
 122      -        printf("#define\tFP_387 0x%x\n", FP_387);
 123      -        printf("#define\t__FP_SSE 0x%x\n", __FP_SSE);
 124      -
 125      -        printf("#define\tFP_FNSAVE 0x%x\n", FP_FNSAVE);
 126  112          printf("#define\tFP_FXSAVE 0x%x\n", FP_FXSAVE);
 127  113          printf("#define\tFP_XSAVE 0x%x\n", FP_XSAVE);
 128  114  
 129  115          printf("#define\tAV_INT_SPURIOUS 0x%x\n", AV_INT_SPURIOUS);
 130  116  
 131  117          printf("#define\tCPU_READY 0x%x\n", CPU_READY);
 132  118          printf("#define\tCPU_QUIESCED 0x%x\n", CPU_QUIESCED);
 133  119  
 134  120          printf("#define\tMCMD_PORT 0x%x\n", MCMD_PORT);
 135  121          printf("#define\tSCMD_PORT 0x%x\n", SCMD_PORT);
↓ open down ↓ 11 lines elided ↑ open up ↑
 147  133          printf("#define\tSE_32RVAL2 0x%x\n", SE_32RVAL2);
 148  134          printf("#define\tSE_64RVAL 0x%x\n", SE_64RVAL);
 149  135  
 150  136          printf("#define\tMAXSYSARGS 0x%x\n", MAXSYSARGS);
 151  137  
 152  138          /* Hack value just to allow clock to be kicked */
 153  139          printf("#define\tNSEC_PER_CLOCK_TICK 0x%llx\n", NANOSEC / 100);
 154  140  
 155  141          printf("#define\tNSEC_PER_COUNTER_TICK 0x%llx\n", NANOSEC / PIT_HZ);
 156  142  
 157      -        printf("#define\tPITCTR0_PORT 0x%x\n", PITCTR0_PORT);
 158      -        printf("#define\tPITCTL_PORT 0x%x\n", PITCTL_PORT);
 159      -        printf("#define\tPIT_COUNTDOWN 0x%x\n",
 160      -            PIT_C0 | PIT_LOADMODE | PIT_NDIVMODE);
 161      -
 162  143          printf("#define\tNBPW 0x%x\n", NBPW);
 163  144  
 164  145          printf("#define\tDDI_ACCATTR_IO_SPACE 0x%x\n", DDI_ACCATTR_IO_SPACE);
 165  146          printf("#define\tDDI_ACCATTR_DIRECT 0x%x\n", DDI_ACCATTR_DIRECT);
 166  147          printf("#define\tDDI_ACCATTR_CPU_VADDR 0x%x\n", DDI_ACCATTR_CPU_VADDR);
 167  148          printf("#define\tDDI_DEV_AUTOINCR 0x%x\n", DDI_DEV_AUTOINCR);
 168  149  
 169  150          printf("#define\tMMU_STD_PAGESIZE 0x%x\n", (uint_t)MMU_STD_PAGESIZE);
 170  151          printf("#define\tMMU_STD_PAGEMASK 0x%x\n", (uint_t)MMU_STD_PAGEMASK);
 171  152          printf("#define\tFOUR_MEG 0x%x\n", (uint_t)FOUR_MEG);
↓ open down ↓ 21 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX