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/intel/ia32/sys/trap.h
          +++ new/usr/src/uts/intel/ia32/sys/trap.h
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*      Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
  22   22  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T   */
  23   23  /*        All Rights Reserved   */
  24   24  
  25   25  /*
  26   26   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  27   27   * Use is subject to license terms.
       28 + *
       29 + * Copyright 2018 Joyent, Inc.
  28   30   */
  29   31  
  30   32  #ifndef _IA32_SYS_TRAP_H
  31   33  #define _IA32_SYS_TRAP_H
  32   34  
  33   35  #ifdef  __cplusplus
  34   36  extern "C" {
  35   37  #endif
  36   38  
  37   39  /*
↓ open down ↓ 8 lines elided ↑ open up ↑
  46   48  #define T_BOUNDFLT      0x5     /* #br  BOUND insn fault                */
  47   49  #define T_ILLINST       0x6     /* #ud  invalid opcode fault            */
  48   50  #define T_NOEXTFLT      0x7     /* #nm  device not available: x87       */
  49   51  #define T_DBLFLT        0x8     /* #df  double fault                    */
  50   52  #define T_EXTOVRFLT     0x9     /*      [not generated: 386 only]       */
  51   53  #define T_TSSFLT        0xa     /* #ts  invalid TSS fault               */
  52   54  #define T_SEGFLT        0xb     /* #np  segment not present fault       */
  53   55  #define T_STKFLT        0xc     /* #ss  stack fault                     */
  54   56  #define T_GPFLT         0xd     /* #gp  general protection fault        */
  55   57  #define T_PGFLT         0xe     /* #pf  page fault                      */
       58 +#define T_RESVTRAP      0xf     /*      reserved                        */
  56   59  #define T_EXTERRFLT     0x10    /* #mf  x87 FPU error fault             */
  57   60  #define T_ALIGNMENT     0x11    /* #ac  alignment check error           */
  58   61  #define T_MCE           0x12    /* #mc  machine check exception         */
  59   62  #define T_SIMDFPE       0x13    /* #xm  SSE/SSE exception               */
  60   63  #define T_DBGENTR       0x14    /*      debugger entry                  */
       64 +#define T_INVALTRAP     0x1e    /*      invalid                         */
  61   65  #define T_ENDPERR       0x21    /*      emulated extension error flt    */
  62   66  #define T_ENOEXTFLT     0x20    /*      emulated ext not present        */
  63   67  #define T_FASTTRAP      0xd2    /*      fast system call                */
  64   68  #define T_SYSCALLINT    0x91    /*      general system call             */
  65   69  #define T_DTRACE_RET    0x92    /*      DTrace pid return               */
  66   70  #define T_INT80         0x80    /*      int80 handler for linux emulation */
  67   71  #define T_SOFTINT       0x50fd  /*      pseudo softint trap type        */
  68   72  
  69   73  /*
  70   74   * Pseudo traps.
↓ open down ↓ 24 lines elided ↑ open up ↑
  95   99  #define T_FNULL         0       /* Null trap for testing                */
  96  100  #define T_FGETFP        1       /* Get emulated FP context              */
  97  101  #define T_FSETFP        2       /* Set emulated FP context              */
  98  102  #define T_GETHRTIME     3       /* Get high resolution time             */
  99  103  #define T_GETHRVTIME    4       /* Get high resolution virtual time     */
 100  104  #define T_GETHRESTIME   5       /* Get high resolution time             */
 101  105  #define T_GETLGRP       6       /* Get home lgrpid                      */
 102  106  
 103  107  #define T_LASTFAST      6       /* Last valid subfunction               */
 104  108  
      109 +/*
      110 + * Offsets for an interrupt/trap frame.
      111 + */
      112 +#define T_FRAME_ERR     0
      113 +#define T_FRAME_RIP     8
      114 +#define T_FRAME_CS      16
      115 +#define T_FRAME_RFLAGS  24
      116 +#define T_FRAME_RSP     32
      117 +#define T_FRAME_SS      40
      118 +
      119 +#define T_FRAMERET_RIP          0
      120 +#define T_FRAMERET_CS           8
      121 +#define T_FRAMERET_RFLAGS       16
      122 +#define T_FRAMERET_RSP          24
      123 +#define T_FRAMERET_SS           32
      124 +
 105  125  #ifdef  __cplusplus
 106  126  }
 107  127  #endif
 108  128  
 109  129  #endif  /* _IA32_SYS_TRAP_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX